|
1 |
| -/* eslint-disable @typescript-eslint/no-unused-vars */ |
2 | 1 | /// <reference path="./cypress-npm-api.d.ts" />
|
3 | 2 | /// <reference path="./cypress-eventemitter.d.ts" />
|
4 | 3 | /// <reference path="./cypress-type-helpers.d.ts" />
|
@@ -59,6 +58,9 @@ declare namespace Cypress {
|
59 | 58 | interface ObjectLike {
|
60 | 59 | [key: string]: any
|
61 | 60 | }
|
| 61 | + interface PromptOptions { |
| 62 | + excludeFromAI?: Record<string, string> |
| 63 | + } |
62 | 64 | interface Auth {
|
63 | 65 | username: string
|
64 | 66 | password: string
|
@@ -684,22 +686,22 @@ declare namespace Cypress {
|
684 | 686 | Keyboard: {
|
685 | 687 | defaults(options: Partial<KeyboardDefaultsOptions>): void
|
686 | 688 | 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 | + } |
703 | 705 | }
|
704 | 706 |
|
705 | 707 | /**
|
@@ -755,7 +757,7 @@ declare namespace Cypress {
|
755 | 757 | * Trigger action
|
756 | 758 | * @private
|
757 | 759 | */
|
758 |
| - action: <T = (any[] | void) >(action: string, ...args: any[]) => T |
| 760 | + action: <T = (any[] | void)>(action: string, ...args: any[]) => T |
759 | 761 |
|
760 | 762 | /**
|
761 | 763 | * Load files
|
@@ -1849,7 +1851,12 @@ declare namespace Cypress {
|
1849 | 1851 | * @see https://on.cypress.io/prevuntil
|
1850 | 1852 | */
|
1851 | 1853 | 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> |
1853 | 1860 | /**
|
1854 | 1861 | * Read a file and yield its contents.
|
1855 | 1862 | *
|
@@ -2898,27 +2905,27 @@ declare namespace Cypress {
|
2898 | 2905 | }
|
2899 | 2906 |
|
2900 | 2907 | 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 |
2903 | 2910 | }
|
2904 | 2911 |
|
2905 | 2912 | type RetryStrategy =
|
2906 | 2913 | | RetryStrategyDetectFlakeAndPassOnThresholdType
|
2907 | 2914 | | RetryStrategyDetectFlakeButAlwaysFailType
|
2908 | 2915 |
|
2909 | 2916 | interface RetryStrategyDetectFlakeAndPassOnThresholdType {
|
2910 |
| - experimentalStrategy: "detect-flake-and-pass-on-threshold" |
| 2917 | + experimentalStrategy: 'detect-flake-and-pass-on-threshold' |
2911 | 2918 | 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 |
2914 | 2921 | }
|
2915 | 2922 | }
|
2916 | 2923 |
|
2917 | 2924 | interface RetryStrategyDetectFlakeButAlwaysFailType {
|
2918 |
| - experimentalStrategy: "detect-flake-but-always-fail" |
| 2925 | + experimentalStrategy: 'detect-flake-but-always-fail' |
2919 | 2926 | 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 |
2922 | 2929 | }
|
2923 | 2930 | }
|
2924 | 2931 | interface ResolvedConfigOptions<ComponentDevServerOpts = any> {
|
@@ -3140,7 +3147,7 @@ declare namespace Cypress {
|
3140 | 3147 | * @see https://on.cypress.io/experiments#Experimental-CSP-Allow-List
|
3141 | 3148 | * @default false
|
3142 | 3149 | */
|
3143 |
| - experimentalCspAllowList: boolean | experimentalCspAllowedDirectives[], |
| 3150 | + experimentalCspAllowList: boolean | experimentalCspAllowedDirectives[] |
3144 | 3151 | /**
|
3145 | 3152 | * Allows listening to the `before:run`, `after:run`, `before:spec`, and `after:spec` events in the plugins file during interactive mode.
|
3146 | 3153 | * @default false
|
@@ -3272,6 +3279,11 @@ declare namespace Cypress {
|
3272 | 3279 | * @default false
|
3273 | 3280 | */
|
3274 | 3281 | 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 |
3275 | 3287 | }
|
3276 | 3288 |
|
3277 | 3289 | /**
|
|
0 commit comments