-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix: (cy.prompt) handle when the prompt is executed by in CT or when the experiment is not enabled #32470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ryanthemanuel
merged 11 commits into
feat/cy-prompt
from
ryanm/fix/handle-experimental-config-better
Sep 16, 2025
Merged
fix: (cy.prompt) handle when the prompt is executed by in CT or when the experiment is not enabled #32470
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2bd7d7a
fix: (cy.prompt) handle when the prompt is executed by in CT or when …
ryanthemanuel 17b5cd9
Update packages/driver/cypress/e2e/commands/prompt/prompt.cy.ts
ryanthemanuel e4cb581
Update packages/driver/cypress/e2e/commands/prompt/prompt.cy.ts
ryanthemanuel c2a1b3b
update name of errors
ryanthemanuel 7ac96da
Merge branch 'feat/cy-prompt' into ryanm/fix/handle-experimental-conf…
ryanthemanuel da0f78e
Bump cache version to 9-15-2025
ryanthemanuel aebb42b
Merge branch 'feat/cy-prompt' into ryanm/fix/handle-experimental-conf…
ryanthemanuel a7ff0f3
update yarn.lock
ryanthemanuel a937a1b
fixes
ryanthemanuel 9bdb0d2
fix snapshot
ryanthemanuel fc0fdb2
fix snapshot
ryanthemanuel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Bump this version to force CI to re-create the cache from scratch. | ||
9-12-2025 | ||
9-15-2025 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
exports['e2e prompt / fails when experimentalPromptCommand is not set'] = ` | ||
|
||
==================================================================================================== | ||
|
||
(Run Starting) | ||
|
||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐ | ||
│ Cypress: 1.2.3 │ | ||
│ Browser: FooBrowser 88 │ | ||
│ Specs: 1 found (prompt.cy.js) │ | ||
│ Searched: cypress/e2e/prompt.cy.js │ | ||
└────────────────────────────────────────────────────────────────────────────────────────────────┘ | ||
|
||
|
||
──────────────────────────────────────────────────────────────────────────────────────────────────── | ||
|
||
Running: prompt.cy.js (1 of 1) | ||
|
||
|
||
prompt | ||
1) should fail when experimentalPromptCommand is not set | ||
|
||
|
||
0 passing | ||
1 failing | ||
|
||
1) prompt | ||
should fail when experimentalPromptCommand is not set: | ||
PromptNotEnabledError: \`cy.prompt\` cannot be called without the \`experimentalPromptCommand\` being set. | ||
|
||
Please set this in your Cypress config file to continue using \`cy.prompt\`. | ||
[stack trace lines] | ||
|
||
|
||
|
||
|
||
(Results) | ||
|
||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐ | ||
│ Tests: 1 │ | ||
│ Passing: 0 │ | ||
│ Failing: 1 │ | ||
│ Pending: 0 │ | ||
│ Skipped: 0 │ | ||
│ Screenshots: 1 │ | ||
│ Video: false │ | ||
│ Duration: X seconds │ | ||
│ Spec Ran: prompt.cy.js │ | ||
└────────────────────────────────────────────────────────────────────────────────────────────────┘ | ||
|
||
|
||
(Screenshots) | ||
|
||
- /XXX/XXX/XXX/cypress/screenshots/prompt.cy.js/prompt -- should fail when experim (1280x720) | ||
entalPromptCommand is not set (failed).png | ||
|
||
|
||
==================================================================================================== | ||
|
||
(Run Finished) | ||
|
||
|
||
Spec Tests Passing Failing Pending Skipped | ||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐ | ||
│ ✖ prompt.cy.js XX:XX 1 - 1 - - │ | ||
└────────────────────────────────────────────────────────────────────────────────────────────────┘ | ||
✖ 1 of 1 failed (100%) XX:XX 1 - 1 - - | ||
|
||
|
||
` |
7 changes: 7 additions & 0 deletions
7
system-tests/projects/experimentalPromptCommand/cypress-disabled-prompt-experiment.config.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const { defineConfig } = require('cypress') | ||
|
||
module.exports = defineConfig({ | ||
e2e: { | ||
supportFile: false, | ||
}, | ||
}) |
5 changes: 5 additions & 0 deletions
5
system-tests/projects/experimentalPromptCommand/cypress/e2e/prompt.cy.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe('prompt', () => { | ||
it('should fail when experimentalPromptCommand is not set', () => { | ||
cy.prompt(['Click the "click me" button']) | ||
}) | ||
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import systemTests from '../lib/system-tests' | ||
|
||
describe('e2e prompt', () => { | ||
systemTests.setup() | ||
|
||
systemTests.it('fails when experimentalPromptCommand is not set', { | ||
browser: 'electron', | ||
project: 'experimentalPromptCommand', | ||
spec: 'prompt.cy.js', | ||
configFile: 'cypress-disabled-prompt-experiment.config.js', | ||
expectedExitCode: 1, | ||
snapshot: true, | ||
}) | ||
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.