Skip to main content
Glama

Nx MCP Server

Official
by nrwl
array-field.cy.ts1.59 kB
import { clickShowMore, getFieldByName } from '../support/get-elements'; import { schema } from '../support/test-schema'; import { visitGenerateUi } from '../support/visit-generate-ui'; describe('array field', () => { beforeEach(() => visitGenerateUi(schema)); it('should add and remove values by clicking', () => { const fieldName = 'array-field'; clickShowMore(); const field = getFieldByName(fieldName); cy.get(`[data-cy="${fieldName}-field-add-button"]`).as('addButton'); field.type('test'); cy.get('@addButton').click(); field.type('test2'); cy.get('@addButton').click(); 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 = 'array-field'; clickShowMore(); const field = getFieldByName(fieldName); field.focus().type('test{enter}'); field.focus().type('test2{enter}'); 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