cypress 13.3.3 → 13.5.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cypress",
3
- "version": "13.3.3",
3
+ "version": "13.5.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "postinstall": "node index.js --exec install",
@@ -135,12 +135,12 @@
135
135
  },
136
136
  "buildInfo": {
137
137
  "commitBranch": "develop",
138
- "commitSha": "058f3a80b033f16bf57f50ee78f63d8b82e75851",
139
- "commitDate": "2023-10-24T17:54:22.000Z",
138
+ "commitSha": "a23dba19af00516e0ef69fb61d17ec6c4b6b595a",
139
+ "commitDate": "2023-11-08T18:36:09.000Z",
140
140
  "stable": true
141
141
  },
142
142
  "description": "Cypress is a next generation front end testing tool built for the modern web",
143
- "homepage": "https://github.com/cypress-io/cypress",
143
+ "homepage": "https://cypress.io",
144
144
  "license": "MIT",
145
145
  "bugs": {
146
146
  "url": "https://github.com/cypress-io/cypress/issues"
@@ -382,7 +382,7 @@ declare module 'cypress' {
382
382
  * recommend wrapping your config object with `defineConfig()`
383
383
  * @example
384
384
  * module.exports = defineConfig({
385
- * viewportWith: 400
385
+ * viewportWidth: 400
386
386
  * })
387
387
  *
388
388
  * @see ../types/cypress-npm-api.d.ts
@@ -2851,6 +2851,30 @@ declare namespace Cypress {
2851
2851
  certs: PEMCert[] | PFXCert[]
2852
2852
  }
2853
2853
 
2854
+ type RetryStrategyWithModeSpecs = RetryStrategy & {
2855
+ openMode: boolean; // defaults to false
2856
+ runMode: boolean; // defaults to true
2857
+ }
2858
+
2859
+ type RetryStrategy =
2860
+ | RetryStrategyDetectFlakeAndPassOnThresholdType
2861
+ | RetryStrategyDetectFlakeButAlwaysFailType
2862
+
2863
+ interface RetryStrategyDetectFlakeAndPassOnThresholdType {
2864
+ experimentalStrategy: "detect-flake-and-pass-on-threshold"
2865
+ experimentalOptions?: {
2866
+ maxRetries: number; // defaults to 2 if experimentalOptions is not provided, must be a whole number > 0
2867
+ passesRequired: number; // defaults to 2 if experimentalOptions is not provided, must be a whole number > 0 and <= maxRetries
2868
+ }
2869
+ }
2870
+
2871
+ interface RetryStrategyDetectFlakeButAlwaysFailType {
2872
+ experimentalStrategy: "detect-flake-but-always-fail"
2873
+ experimentalOptions?: {
2874
+ maxRetries: number; // defaults to 2 if experimentalOptions is not provided, must be a whole number > 0
2875
+ stopIfAnyPassed: boolean; // defaults to false if experimentalOptions is not provided
2876
+ }
2877
+ }
2854
2878
  interface ResolvedConfigOptions<ComponentDevServerOpts = any> {
2855
2879
  /**
2856
2880
  * Url used as prefix for [cy.visit()](https://on.cypress.io/visit) or [cy.request()](https://on.cypress.io/request) command's url
@@ -3122,7 +3146,7 @@ declare namespace Cypress {
3122
3146
  * To enable test retries only in runMode, set e.g. `{ openMode: null, runMode: 2 }`
3123
3147
  * @default null
3124
3148
  */
3125
- retries: Nullable<number | { runMode?: Nullable<number>, openMode?: Nullable<number> }>
3149
+ retries: Nullable<number | ({ runMode?: Nullable<number>, openMode?: Nullable<number> }) | RetryStrategyWithModeSpecs>
3126
3150
  /**
3127
3151
  * Enables including elements within the shadow DOM when using querying
3128
3152
  * commands (e.g. cy.get(), cy.find()). Can be set globally in cypress.config.{js,ts,mjs,cjs},
@@ -5985,7 +6009,11 @@ declare namespace Cypress {
5985
6009
  (fn: (currentSubject: Subject) => void): Chainable<Subject>
5986
6010
  }
5987
6011
 
5988
- interface BrowserLaunchOptions {
6012
+ interface AfterBrowserLaunchDetails {
6013
+ webSocketDebuggerUrl: string
6014
+ }
6015
+
6016
+ interface BeforeBrowserLaunchOptions {
5989
6017
  extensions: string[]
5990
6018
  preferences: { [key: string]: any }
5991
6019
  args: string[]
@@ -6066,12 +6094,13 @@ declare namespace Cypress {
6066
6094
  }
6067
6095
 
6068
6096
  interface PluginEvents {
6097
+ (action: 'after:browser:launch', fn: (browser: Browser, browserLaunchDetails: AfterBrowserLaunchDetails) => void | Promise<void>): void
6069
6098
  (action: 'after:run', fn: (results: CypressCommandLine.CypressRunResult | CypressCommandLine.CypressFailedRunResult) => void | Promise<void>): void
6070
6099
  (action: 'after:screenshot', fn: (details: ScreenshotDetails) => void | AfterScreenshotReturnObject | Promise<AfterScreenshotReturnObject>): void
6071
6100
  (action: 'after:spec', fn: (spec: Spec, results: CypressCommandLine.RunResult) => void | Promise<void>): void
6072
6101
  (action: 'before:run', fn: (runDetails: BeforeRunDetails) => void | Promise<void>): void
6073
6102
  (action: 'before:spec', fn: (spec: Spec) => void | Promise<void>): void
6074
- (action: 'before:browser:launch', fn: (browser: Browser, browserLaunchOptions: BrowserLaunchOptions) => void | BrowserLaunchOptions | Promise<BrowserLaunchOptions>): void
6103
+ (action: 'before:browser:launch', fn: (browser: Browser, afterBrowserLaunchOptions: BeforeBrowserLaunchOptions) => void | Promise<void> | BeforeBrowserLaunchOptions | Promise<BeforeBrowserLaunchOptions>): void
6075
6104
  (action: 'file:preprocessor', fn: (file: FileObject) => string | Promise<string>): void
6076
6105
  (action: 'dev-server:start', fn: (file: DevServerConfig) => Promise<ResolvedDevServerConfig>): void
6077
6106
  (action: 'task', tasks: Tasks): void