Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
multiselect-field.cy.ts1.51 kB
import { clickShowMore, getFieldByName } from '../support/get-elements'; import { schema } from '../support/test-schema'; import { visitGenerateUi } from '../support/visit-generate-ui'; describe('multiselect field', () => { beforeEach(() => visitGenerateUi(schema)); it('should add and remove values by clicking', () => { const fieldName = 'multiselect-field'; clickShowMore(); const field = getFieldByName(fieldName); field.select('option1'); field.select('option2'); cy.get(`[data-cy="${fieldName}-field-item"]`).as('items'); cy.get('@items').should('have.length', 2); cy.get(`[data-cy="${fieldName}-field-remove-button"]`).as('removeButtons'); cy.get('@removeButtons').should('have.length', 2); cy.get('@removeButtons').first().click(); cy.get('@removeButtons').first().click(); cy.get('@items').should('have.length', 0); }); it('should add and remove values with keyboard', () => { const fieldName = 'multiselect-field'; clickShowMore(); const field = getFieldByName(fieldName); // navigating with keydown doesnt work in cypress? field.select('option1'); field.select('option2'); cy.get(`[data-cy="${fieldName}-field-item"]`).as('items'); cy.get('@items').should('have.length', 2); cy.get('@items').first().focus(); cy.get('@items').first().type('{enter}'); cy.get('@items').first().focus(); cy.get('@items').first().type('{enter}'); cy.get('@items').should('have.length', 0); }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nrwl/nx-console'

If you have feedback or need assistance with the MCP directory API, please join our Discord server