Skip to content

Commit df047b0

Browse files
ryanthemanuelCopilotAtofStrykerestrada9166mschile
authored
feat: cy.prompt experimental command [Feature Flagged] (#31752)
* Create cy-prompt-development.md * chore: cy prompt infrastructure (#31748) * feat: cy prompt infrastructure * refactor and add tests * refactor * rename experimental config * prompt * fix test * Update cy-prompt-development.md * Update cy-prompt-development.md * PR comments * Update packages/server/lib/cloud/api/cy-prompt/get_cy_prompt_bundle.ts Co-authored-by: Copilot <[email protected]> * PR comments --------- Co-authored-by: Copilot <[email protected]> * fix test * Delete packages/server/lib/cloud/StudioLifecycleManager.ts * Delete packages/server/test/unit/cloud/StudioLifecycleManager_spec.ts * chore: add cdp connection to cy prompt (#31806) * chore: add cdp connection to cy prompt * minor fix * fix type build * try to fix build * Update packages/server/lib/browsers/browser-cri-client.ts Co-authored-by: Bill Glesias <[email protected]> * Update packages/server/lib/browsers/browser-cri-client.ts Co-authored-by: Bill Glesias <[email protected]> * do not support prompt in firefox or webkit * rework timing of lifecycle * refactor * fix tests * troubleshooting * troubleshooting * fix tests * additional troubleshooting * additional troubleshooting * additional troubleshooting * attempt to fix build * add back * debugging * debugging * debugging * debugging * clean up * fix unit tests * rework --------- Co-authored-by: Bill Glesias <[email protected]> * chore: create infrastructure to support backend function in cy.prompt (#31803) * chore: add promptBackend as an additional Cypress-attached function * Update packages/app/src/runner/event-manager.ts * update types * fix types * fix spacing * refactor * additional refactor * fix type build * fix build * refactor * reword messages * fix * debugging * undo debugging * PR comment * fix tests * fix tests * fix tests * fix test * chore: add watcher for cy-prompt development (#31810) * chore: add watcher for cy-prompt development * test caching * fix types * chore: turn on beta deployments for cy-prompt * internal: (cy.prompt) handle errors better in the command definition (#31835) * internal: (cy.prompt) handle errors better in the command definition * internal: (cy.prompt) add timeout and handle loading errors more cleanly * add process environment variable * clean up test * update JSDoc * chore: handle errors (#31854) * chore: handle errors * Fix ts, add test * Fix error title * Fix ts * Fix ts * chores: (cy.prompt) refactor routing to support both app and driver (#31891) * chore: Share error utils with the cloud (#31887) * share error utils with cloud * additional rework * Fix command, add isOpenMode * Add / fix test * fix ts --------- Co-authored-by: Ryan Manuel <[email protected]> * internal: (cy.prompt) add infrastructure to support a Get Code modal (#31904) * chore: (cy.prompt) add infrastructure to support a Get Code modal * fix tests * fix code paths * Update eject button styles * handle errors * update types * Update packages/server/lib/socket-base.ts * Fix cy test * update readme --------- Co-authored-by: estrada9166 <[email protected]> * chore: (cy.prompt) refactor getTestsState to take a runnable id (#31965) * chore: (cy.prompt) refactor getTestsState to take a runnable id * fix tests * minor tweak * chore: (cy.prompt) add manifest for all of the cloud delivered files (#31922) * chore: (cy.prompt) add manifest for all of the cloud delivered files * fix tests and remove environment variables * update strategy * fix build * rework * require manifest * clean up * refactor * refactor * Update packages/server/lib/cloud/cy-prompt/CyPromptLifecycleManager.ts Co-authored-by: Matt Schile <[email protected]> * fix test --------- Co-authored-by: Matt Schile <[email protected]> * feat: add cy prompt more info needed modal (WIP) (#31970) * feat: add cy prompt more info needed modal * Reset promptStore * additional things exposed for more info * rework * fix tests * fix build * fix types * fix types * Update packages/app/src/runner/event-manager.ts Co-authored-by: Copilot <[email protected]> * reefactor * chore: (cy.prompt) rework the file save lifecycle * rework types * add unit tests --------- Co-authored-by: estrada9166 <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: (cy.prompt) ensure that we do not attach a vue ref to the react root in the cy.prompt modals (#32011) * fix: (studio) ensure that we do not attach a vue ref to the react root in the studio panel * fix test * chore: Handle cy-prompt error to the cloud (#32009) Co-authored-by: Ryan Manuel <[email protected]> * chore: display prompt error message (#32016) * add createCloudRequest to cloudApi, handle errors during createCyPromptServer * render the get code button on failure * chore: update types * chore: move CT and browser error to cloud (#32077) * feat: (cy.prompt) give cy.prompt access to recording information (#32110) * feat: (cy.prompt) give cy.prompt access to recording information * undo bad refactor * undo bad refactor * undo bad refactor * rename * fix typo * Update packages/server/test/unit/modes/record_spec.js * Update packages/server/test/unit/modes/record_spec.js * Update packages/server/test/unit/modes/record_spec.js * Update packages/server/test/unit/modes/record_spec.js * Update packages/server/test/unit/modes/record_spec.js * Update cy-prompt-development.md * Update cy-prompt-development.md * Update cy-prompt-development.md * chore: add CYPRESS_INTERNAL_SIMULATE_OPEN_MODE to simulate running Cypress tests in open mode (#32114) * chore: (cy.prompt) ensure to strip out paths from all data when reporting errors in prompt (#32134) * fix: (cy.prompt) ensure to strip out paths from all data when reporting errors in prompt * refactor * update tests * fix logic error with protocol * add event manager to get code * Apply suggestions from code review * fix: (cy.prompt) improve the get project options performance by running promises in parallel (#32196) * fix: (cy.prompt) improve the get project options performance by running promises in parallel * add awaits in test * bump cache * Update packages/server/lib/cloud/studio/StudioLifecycleManager.ts * fix build * chore: cleanup * blank * Update trigger-publish-binary-pipeline.js * Update packages/server/test/unit/socket_spec.js * get rid of environment variable * fix: (cy.prompt) ensure to reset the prompt state when the event manager is torn down (indicating that we're no longer on the runner page) (#32301) * fix: (cy.prompt) ensure to reset the prompt state when the event manager is torn down (indicating that we're no longer on the runner page) * move test * fix lint issue * feat: (cy.prompt) introduce the concept of log collapse state being open/closed by default (#32262) * feat: (cy.prompt) introduce the concept of logs' collapse state being open/closed by default * update tests * rename * PR comments * fix test due to bad merge of develop * chore: Only allow experimentalPromptCommand within e2e config (#32435) * chore: Only allow experimentalPromptCommand within e2e config * Fix config * Update tests * Update test, update types * Fix test and types * fix tests * Add types * Update cli/types/cypress.d.ts Co-authored-by: Ryan Manuel <[email protected]> --------- Co-authored-by: Ryan Manuel <[email protected]> * Update workflows.yml * Add optional cyPromptManagerPromise property * Implement error handling in CyPromptManager Added a new method to handle errors uniformly in CyPromptManager. * Fix indentation in socket_spec.js * fix: (cy.prompt) handle when the prompt is executed by in CT or when the experiment is not enabled (#32470) * fix: (cy.prompt) handle when the prompt is executed by in CT or when the experiment is not enabled * Update packages/driver/cypress/e2e/commands/prompt/prompt.cy.ts * Update packages/driver/cypress/e2e/commands/prompt/prompt.cy.ts * update name of errors * Bump cache version to 9-15-2025 * update yarn.lock * fixes * fix snapshot * fix snapshot * internal: fix get code button to be purple with correct margin (#32504) * feat: (cy.prompt) update the types of prompt (#32529) * fix: move currentMoreInfoNeededModalInfo.onCancel to onClose (#32559) * internal: (cy.prompt) various improvements to error messages and time outs (#32582) * internal: (cy.prompt) various improvements to error messages and timeouts * fix test * remove dead code * Update packages/driver/src/cy/commands/prompt/index.ts * update prompt experiment description * fix build * fix tests * fix tests * fix test * update error message * Update packages/server/lib/experiments.ts Co-authored-by: Tim Griesser <[email protected]> --------- Co-authored-by: Tim Griesser <[email protected]> * internal: (cy.prompt) ensure that get code can properly work with prompts in cy.origin (#32596) * internal: (cy.prompt) ensure that get code can properly work with prompts in cy.origin * additional tests * additional tests * Apply suggestions from code review * code review comment * fix merge * fix merge * Update packages/data-context/graphql/schemaTypes/index.ts * update workflow * blank * persist binaries * chore: display custom link title (#32567) * chore: display custom link title * Add test * Pass docs as second argument of the error * Revert changes * Use openExternal for links --------- Co-authored-by: Jennifer Shehane <[email protected]> * update * internal: (cy.prompt) do not retry on cert failures (#32624) * internal: (cy.prompt) do not retry on cert failures * tests and clean up * additional cleanup and add error message for prompt * fix unit tests * Update report_studio_error.ts * Update packages/network/lib/agent.ts * cursor comment * fix build * fix build * fix test * fix build * fix build * fix build * fix build * fix build * revert * Update packages/driver/src/cypress/error_messages.ts * Update packages/driver/cypress/e2e/commands/prompt/prompt-initialization-error.cy.ts * fix build * cursor comment * add changelog entry * clean up * Update packages/app/src/store/prompt-store.ts * Bump cache version to 10-3-2025 Updated cache version to trigger CI cache recreation. * Revise CHANGELOG for new features and fixes Updated changelog with new features and bug fixes. * index on feat/cy-prompt: 3cbcf6c Bump cache version to 10-3-2025 * index on feat/cy-prompt: 3cbcf6c Bump cache version to 10-3-2025 * index on feat/cy-prompt: 3cbcf6c Bump cache version to 10-3-2025 * blank * fix build --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Bill Glesias <[email protected]> Co-authored-by: Alejandro Estrada <[email protected]> Co-authored-by: Matt Schile <[email protected]> Co-authored-by: Tim Griesser <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]> Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
1 parent b1f61fb commit df047b0

File tree

143 files changed

+5793
-552
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+5793
-552
lines changed

.circleci/cache-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Bump this version to force CI to re-create the cache from scratch.
2-
10-2-2025
2+
10-3-2025

.circleci/src/pipeline/@pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ commands:
118118
name: Set environment variable to determine whether or not to persist artifacts
119119
command: |
120120
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
121-
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "electron-37" ]]; then
121+
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "feat/cy-prompt" ]]; then
122122
export SHOULD_PERSIST_ARTIFACTS=true
123123
fi' >> "$BASH_ENV"
124124
# You must run `setup_should_persist_artifacts` command and be using bash before running this command

.circleci/src/pipeline/workflows/@main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ linux-x64:
55
- equal: [ develop, << pipeline.git.branch >> ]
66
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
77
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
8-
- equal: [ 'electron-37', << pipeline.git.branch >> ]
8+
- equal: [ 'feat/cy-prompt', << pipeline.git.branch >> ]
99
- matches:
1010
pattern: /^release\/\d+\.\d+\.\d+$/
1111
value: << pipeline.git.branch >>
@@ -309,7 +309,7 @@ linux-x64:
309309
- /^release\/\d+\.\d+\.\d+$/
310310
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
311311
- 'update-v8-snapshot-cache-on-develop'
312-
- 'chore/refactor_cli_to_ts'
312+
- 'feat/cy-prompt'
313313
context: test-runner:npm-release
314314
requires:
315315
- ready-to-release

cli/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ _Released 10/7/2025 (PENDING)_
77

88
- Cypress Studio is now available by default. You no longer have to set the `experimentalStudio` flag. Addresses [#30997](https://github.com/cypress-io/cypress/issues/30997). Addressed in [#32571](https://github.com/cypress-io/cypress/pull/32571).
99
- Added the `--posix-exit-codes` flag for the `run` command. When this flag is passed, Cypress will exit with 1 if any tests fail, rather than the number of failed tests. Addresses [#32605](https://github.com/cypress-io/cypress/issues/32605) and [#24695](https://github.com/cypress-io/cypress/issues/24695). Addressed in [#32609](https://github.com/cypress-io/cypress/pull/32609).
10+
- `cy.prompt` is now a reserved Cypress command, currently gated behind a feature flag that requires an invite from Cypress. This means any custom commands named 'prompt' will no longer work. Stay tuned for updates on when this feature will become more widely available. Addresses [#31826](https://github.com/cypress-io/cypress/issues/31826).
1011

1112
**Bugfixes:**
1213

cli/types/cypress.d.ts

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-unused-vars */
21
/// <reference path="./cypress-npm-api.d.ts" />
32
/// <reference path="./cypress-eventemitter.d.ts" />
43
/// <reference path="./cypress-type-helpers.d.ts" />
@@ -59,6 +58,9 @@ declare namespace Cypress {
5958
interface ObjectLike {
6059
[key: string]: any
6160
}
61+
interface PromptOptions {
62+
excludeFromAI?: Record<string, string>
63+
}
6264
interface Auth {
6365
username: string
6466
password: string
@@ -684,22 +686,22 @@ declare namespace Cypress {
684686
Keyboard: {
685687
defaults(options: Partial<KeyboardDefaultsOptions>): void
686688
Keys: {
687-
DOWN: 'ArrowDown',
688-
LEFT: 'ArrowLeft',
689-
RIGHT: 'ArrowRight',
690-
UP: 'ArrowUp',
691-
END: 'End',
692-
HOME: 'Home',
693-
PAGEDOWN: 'PageDown',
694-
PAGEUP: 'PageUp',
695-
ENTER: 'Enter',
696-
TAB: 'Tab',
697-
BACKSPACE: 'Backspace',
698-
SPACE: 'Space',
699-
DELETE: 'Delete',
700-
INSERT: 'Insert',
701-
ESC: 'Escape',
702-
},
689+
DOWN: 'ArrowDown'
690+
LEFT: 'ArrowLeft'
691+
RIGHT: 'ArrowRight'
692+
UP: 'ArrowUp'
693+
END: 'End'
694+
HOME: 'Home'
695+
PAGEDOWN: 'PageDown'
696+
PAGEUP: 'PageUp'
697+
ENTER: 'Enter'
698+
TAB: 'Tab'
699+
BACKSPACE: 'Backspace'
700+
SPACE: 'Space'
701+
DELETE: 'Delete'
702+
INSERT: 'Insert'
703+
ESC: 'Escape'
704+
}
703705
}
704706

705707
/**
@@ -755,7 +757,7 @@ declare namespace Cypress {
755757
* Trigger action
756758
* @private
757759
*/
758-
action: <T = (any[] | void) >(action: string, ...args: any[]) => T
760+
action: <T = (any[] | void)>(action: string, ...args: any[]) => T
759761

760762
/**
761763
* Load files
@@ -1849,7 +1851,12 @@ declare namespace Cypress {
18491851
* @see https://on.cypress.io/prevuntil
18501852
*/
18511853
prevUntil<E extends Node = HTMLElement>(element: E | JQuery<E>, filter?: string, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<E>>
1852-
1854+
/**
1855+
* An AI-powered command that generates Cypress commands from natural language test steps.
1856+
*
1857+
* @see https://on.cypress.io/prompt
1858+
*/
1859+
prompt<T>(steps: string[], options?: PromptOptions): Chainable<T>
18531860
/**
18541861
* Read a file and yield its contents.
18551862
*
@@ -2898,27 +2905,27 @@ declare namespace Cypress {
28982905
}
28992906

29002907
type RetryStrategyWithModeSpecs = RetryStrategy & {
2901-
openMode: boolean; // defaults to false
2902-
runMode: boolean; // defaults to true
2908+
openMode: boolean // defaults to false
2909+
runMode: boolean // defaults to true
29032910
}
29042911

29052912
type RetryStrategy =
29062913
| RetryStrategyDetectFlakeAndPassOnThresholdType
29072914
| RetryStrategyDetectFlakeButAlwaysFailType
29082915

29092916
interface RetryStrategyDetectFlakeAndPassOnThresholdType {
2910-
experimentalStrategy: "detect-flake-and-pass-on-threshold"
2917+
experimentalStrategy: 'detect-flake-and-pass-on-threshold'
29112918
experimentalOptions?: {
2912-
maxRetries: number; // defaults to 2 if experimentalOptions is not provided, must be a whole number > 0
2913-
passesRequired: number; // defaults to 2 if experimentalOptions is not provided, must be a whole number > 0 and <= maxRetries
2919+
maxRetries: number // defaults to 2 if experimentalOptions is not provided, must be a whole number > 0
2920+
passesRequired: number // defaults to 2 if experimentalOptions is not provided, must be a whole number > 0 and <= maxRetries
29142921
}
29152922
}
29162923

29172924
interface RetryStrategyDetectFlakeButAlwaysFailType {
2918-
experimentalStrategy: "detect-flake-but-always-fail"
2925+
experimentalStrategy: 'detect-flake-but-always-fail'
29192926
experimentalOptions?: {
2920-
maxRetries: number; // defaults to 2 if experimentalOptions is not provided, must be a whole number > 0
2921-
stopIfAnyPassed: boolean; // defaults to false if experimentalOptions is not provided
2927+
maxRetries: number // defaults to 2 if experimentalOptions is not provided, must be a whole number > 0
2928+
stopIfAnyPassed: boolean // defaults to false if experimentalOptions is not provided
29222929
}
29232930
}
29242931
interface ResolvedConfigOptions<ComponentDevServerOpts = any> {
@@ -3140,7 +3147,7 @@ declare namespace Cypress {
31403147
* @see https://on.cypress.io/experiments#Experimental-CSP-Allow-List
31413148
* @default false
31423149
*/
3143-
experimentalCspAllowList: boolean | experimentalCspAllowedDirectives[],
3150+
experimentalCspAllowList: boolean | experimentalCspAllowedDirectives[]
31443151
/**
31453152
* Allows listening to the `before:run`, `after:run`, `before:spec`, and `after:spec` events in the plugins file during interactive mode.
31463153
* @default false
@@ -3272,6 +3279,11 @@ declare namespace Cypress {
32723279
* @default false
32733280
*/
32743281
experimentalOriginDependencies?: boolean
3282+
/**
3283+
* Enables support for `cy.prompt`, an AI-powered command that turns natural language steps into executable Cypress test code.
3284+
* @default false
3285+
*/
3286+
experimentalPromptCommand?: boolean
32753287
}
32763288

32773289
/**

guides/cy-prompt-development.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# `cy.prompt` Development
2+
3+
In production, the code used to facilitate the prompt command will be retrieved from the Cloud.
4+
5+
To run against locally developed `cy.prompt`:
6+
7+
- Clone the `cypress-services` repo
8+
- Run `yarn && yarn all`
9+
- Run `yarn watch` in `app/packages/cy-prompt`
10+
- Set:
11+
- `CYPRESS_INTERNAL_ENV=<environment>` (e.g. `staging` or `production` if you want to hit those deployments of `cypress-services` or `development` if you want to hit a locally running version of `cypress-services`)
12+
- `CYPRESS_LOCAL_CY_PROMPT_PATH` to the path to the `cypress-services/app/packages/cy-prompt/dist/development` directory
13+
14+
To run against a deployed version of `cy.prompt`:
15+
16+
- Set:
17+
- `CYPRESS_INTERNAL_ENV=<environment>` (e.g. `staging` or `production` if you want to hit those deployments of `cypress-services` or `development` if you want to hit a locally running version of `cypress-services`)
18+
19+
Regardless of running against local or deployed `cy.prompt`:
20+
21+
- Clone the `cypress` repo
22+
- Run `yarn`
23+
- Run `yarn cypress:open`
24+
- Log In to the Cloud via the App
25+
- Open a project that has `experimentalPromptCommand: true` set in the config of the `cypress.config.js|ts` file within `e2e`. Ensure the project has the feature flag `cy-prompt` enabled.
26+
27+
To run against a deployed version of `cy.prompt`:
28+
29+
- Set:
30+
- `CYPRESS_INTERNAL_ENV=<environment>` (e.g. `staging` or `production` if you want to hit those deployments of `cypress-services` or `development` if you want to hit a locally running version of `cypress-services`)
31+
32+
## Types
33+
34+
The prompt bundle provides the types for the `app`, `driver`, and `server` interfaces that are used within the Cypress code. To incorporate the types into the code base, run:
35+
36+
```sh
37+
yarn gulp downloadPromptTypes
38+
```
39+
40+
or to reference a local `cypress_services` repo:
41+
42+
```sh
43+
CYPRESS_LOCAL_CY_PROMPT_PATH=<path-to-cypress-services/app/cy-prompt/dist/development-directory> yarn gulp downloadPromptTypes
44+
```
45+
46+
## Testing
47+
48+
### Unit/Component Testing
49+
50+
The code that supports cloud `cy.prompt` and lives in the `cypress` monorepo is unit, integration, and e2e tested in a similar fashion to the rest of the code in the repo. See the [contributing guide](https://github.com/cypress-io/cypress/blob/ad353fcc0f7fdc51b8e624a2a1ef4e76ef9400a0/CONTRIBUTING.md?plain=1#L366) for more specifics.
51+
52+
The code that supports cloud `cy.prompt` and lives in the `cypress-services` monorepo has unit tests that live alongside the code in that monorepo.

packages/app/cypress/e2e/runner/event-manager.cy.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,21 @@ describe('event-manager', () => {
5050
cy.wrap(() => eventManager.reporterBus.listeners('runner:next').length).invoke('call').should('equal', 1)
5151
})
5252
})
53+
54+
it('should reset the prompt store', () => {
55+
loadSpec({
56+
filePath: 'hooks/basic.cy.js',
57+
passCount: 2,
58+
})
59+
60+
cy.window().then((win) => {
61+
const eventManager = win.getEventManager()
62+
63+
cy.spy(eventManager['promptStore'], 'resetState').as('resetState')
64+
})
65+
66+
cy.visitApp(`specs`)
67+
68+
cy.get('@resetState').should('have.been.calledOnce')
69+
})
5370
})
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<template>
2+
<div class="max-h-[700px] w-[912px] overflow-auto bg-gray-1000 rounded mx-auto ring-[#9095AD40] ring-4 relative">
3+
<div class="px-[24px] py-[12px] flex items-center justify-between border-b border-gray-900">
4+
<div class="flex items-center gap-2">
5+
<span class="text-white text-sm">cy.prompt</span>
6+
<div class="w-[32px] h-[1px] bg-gray-900" />
7+
<span class="text-gray-300 text-sm">Get code</span>
8+
</div>
9+
<IconActionDeleteLarge
10+
stroke-color="gray-400"
11+
class="cursor-pointer"
12+
data-cy="close-modal-button"
13+
@click="onClose"
14+
/>
15+
</div>
16+
<div
17+
class="flex flex-col items-center justify-center h-[272px] p-[24px] gap-[24px]"
18+
data-cy="error-message"
19+
>
20+
<IconTechnologyDashboardFail
21+
size="48"
22+
stroke-color="gray-500"
23+
fill-color="gray-900"
24+
/>
25+
<div class="flex flex-col gap-[4px] text-center">
26+
<span class="text-white">Something went wrong</span>
27+
<span class="text-gray-200 text-sm">
28+
There was a problem with loading the prompt code. Our team has been
29+
notified. If the problem persists, please try again later.
30+
</span>
31+
</div>
32+
</div>
33+
34+
<div class="px-[24px] py-[12px] mt-[12px] border-t border-gray-900 bg-gray-950">
35+
<Button
36+
data-cy="close-modal-button"
37+
@click="onClose"
38+
>
39+
Close
40+
</Button>
41+
</div>
42+
</div>
43+
</template>
44+
45+
<script setup lang="ts">
46+
import {
47+
IconActionDeleteLarge,
48+
IconTechnologyDashboardFail,
49+
} from '@cypress-design/vue-icon'
50+
import Button from '@cypress-design/vue-button'
51+
52+
defineProps<{
53+
onClose: () => void
54+
}>()
55+
</script>

0 commit comments

Comments
 (0)