Back to Nx

Remove Experimental Prompt Command

packages/cypress/src/migrations/update-23-0-0/remove-experimental-prompt-command.md

23.0.01.3 KB
Original Source

Remove the experimentalPromptCommand Flag from Cypress Config

Removes the experimentalPromptCommand flag from cypress.config.{ts,js,mjs,cjs} files. The flag was removed in Cypress 15.13.0; cy.prompt is now in beta without configuration. Leaving the flag in place causes Cypress to error at startup.

Sample Code Changes

Remove experimentalPromptCommand from the top level of defineConfig.

Before
ts
import { defineConfig } from 'cypress';

export default defineConfig({
  e2e: { baseUrl: 'http://localhost:4200' },
  experimentalPromptCommand: true,
});
After
ts
import { defineConfig } from 'cypress';

export default defineConfig({
  e2e: { baseUrl: 'http://localhost:4200' },
});

The flag is also removed when nested inside e2e or component.

Before
ts
import { defineConfig } from 'cypress';

export default defineConfig({
  e2e: {
    experimentalPromptCommand: true,
    baseUrl: 'http://localhost:4200',
  },
});
After
ts
import { defineConfig } from 'cypress';

export default defineConfig({
  e2e: {
    baseUrl: 'http://localhost:4200',
  },
});