cypress 6.4.0 → 6.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/cli.js +11 -1
- package/lib/exec/run.js +9 -1
- package/lib/exec/xvfb.js +4 -3
- package/lib/tasks/install.js +1 -1
- package/lib/util.js +1 -1
- package/package.json +3 -2
- package/types/chai/index.d.ts +13 -3
- package/types/cy-http.d.ts +13 -0
- package/types/cypress-global-vars.d.ts +0 -2
- package/types/cypress.d.ts +79 -34
- package/types/sinon/index.d.ts +204 -140
- package/types/sinon/ts3.1/index.d.ts +0 -1703
package/lib/cli.js
CHANGED
@@ -143,7 +143,7 @@ const descriptions = {
|
|
143
143
|
tag: 'named tag(s) for recorded runs in the Cypress Dashboard',
|
144
144
|
version: 'prints Cypress version'
|
145
145
|
};
|
146
|
-
const knownCommands = ['cache', 'help', '-h', '--help', 'install', 'open', 'open-ct', 'run', 'verify', '-v', '--version', 'version', 'info'];
|
146
|
+
const knownCommands = ['cache', 'help', '-h', '--help', 'install', 'open', 'open-ct', 'run', 'run-ct', 'verify', '-v', '--version', 'version', 'info'];
|
147
147
|
|
148
148
|
const text = description => {
|
149
149
|
if (!descriptions[description]) {
|
@@ -332,6 +332,16 @@ module.exports = {
|
|
332
332
|
isComponentTesting: true
|
333
333
|
}).catch(util.logErrorExit1);
|
334
334
|
});
|
335
|
+
program // TODO make this command public once CT will be merged completely
|
336
|
+
.command('run-ct', {
|
337
|
+
hidden: true
|
338
|
+
}).usage('[options]').description('Runs all Cypress Component Testing suites').option('-b, --browser <browser-name-or-path>', text('browserRunMode')).option('--ci-build-id <id>', text('ciBuildId')).option('-c, --config <config>', text('config')).option('-C, --config-file <config-file>', text('configFile')).option('-e, --env <env>', text('env')).option('--group <name>', text('group')).option('-k, --key <record-key>', text('key')).option('--headed', text('headed')).option('--headless', text('headless')).option('--no-exit', text('exit')).option('--parallel', text('parallel')).option('-p, --port <port>', text('port')).option('-P, --project <project-path>', text('project')).option('-q, --quiet', text('quiet')).option('--record [bool]', text('record'), coerceFalse).option('-r, --reporter <reporter>', text('reporter')).option('-o, --reporter-options <reporter-options>', text('reporterOptions')).option('-s, --spec <spec>', text('spec')).option('-t, --tag <tag>', text('tag')).option('--dev', text('dev'), coerceFalse).action(opts => {
|
339
|
+
debug('running Cypress run-ct');
|
340
|
+
|
341
|
+
require('./exec/run').start(util.parseOpts(opts), {
|
342
|
+
isComponentTesting: true
|
343
|
+
}).then(util.exit).catch(util.logErrorExit1);
|
344
|
+
});
|
335
345
|
program.command('open').usage('[options]').description('Opens Cypress in the interactive GUI.').option('-b, --browser <browser-path>', text('browserOpenMode')).option('-c, --config <config>', text('config')).option('-C, --config-file <config-file>', text('configFile')).option('-d, --detached [bool]', text('detached'), coerceFalse).option('-e, --env <env>', text('env')).option('--global', text('global')).option('-p, --port <port>', text('port')).option('-P, --project <project-path>', text('project')).option('--dev', text('dev'), coerceFalse).action(opts => {
|
336
346
|
debug('opening Cypress');
|
337
347
|
|
package/lib/exec/run.js
CHANGED
@@ -174,7 +174,11 @@ module.exports = {
|
|
174
174
|
isValidProject,
|
175
175
|
|
176
176
|
// resolves with the number of failed tests
|
177
|
-
start(options = {}
|
177
|
+
start(options = {}, {
|
178
|
+
isComponentTesting
|
179
|
+
} = {
|
180
|
+
isComponentTesting: false
|
181
|
+
}) {
|
178
182
|
_.defaults(options, {
|
179
183
|
key: null,
|
180
184
|
spec: null,
|
@@ -196,6 +200,10 @@ module.exports = {
|
|
196
200
|
throw err;
|
197
201
|
}
|
198
202
|
|
203
|
+
if (isComponentTesting) {
|
204
|
+
args.push('--componentTesting');
|
205
|
+
}
|
206
|
+
|
199
207
|
debug('run to spawn.start args %j', args);
|
200
208
|
return spawn.start(args, {
|
201
209
|
dev: options.dev
|
package/lib/exec/xvfb.js
CHANGED
@@ -10,9 +10,7 @@ const {
|
|
10
10
|
stripIndent
|
11
11
|
} = require('common-tags');
|
12
12
|
|
13
|
-
const
|
14
|
-
|
15
|
-
const debugXvfb = require('debug')('cypress:xvfb');
|
13
|
+
const Debug = require('debug');
|
16
14
|
|
17
15
|
const {
|
18
16
|
throwFormErrorText,
|
@@ -21,6 +19,9 @@ const {
|
|
21
19
|
|
22
20
|
const util = require('../util');
|
23
21
|
|
22
|
+
const debug = Debug('cypress:cli');
|
23
|
+
const debugXvfb = Debug('cypress:xvfb');
|
24
|
+
debug.Debug = debugXvfb.Debug = Debug;
|
24
25
|
const xvfbOptions = {
|
25
26
|
timeout: 30000,
|
26
27
|
// milliseconds
|
package/lib/tasks/install.js
CHANGED
@@ -173,7 +173,7 @@ const downloadAndUnzip = ({
|
|
173
173
|
throttle: 100,
|
174
174
|
onProgress: null
|
175
175
|
};
|
176
|
-
const downloadDestination = path.join(downloadDir,
|
176
|
+
const downloadDestination = path.join(downloadDir, `cypress-${process.pid}.zip`);
|
177
177
|
const rendererOptions = getRendererOptions(); // let the user know what version of cypress we're downloading!
|
178
178
|
|
179
179
|
logger.log(`Installing Cypress ${chalk.gray(`(version: ${version})`)}`);
|
package/lib/util.js
CHANGED
@@ -212,7 +212,7 @@ const dequote = str => {
|
|
212
212
|
};
|
213
213
|
|
214
214
|
const parseOpts = opts => {
|
215
|
-
opts = _.pick(opts, 'browser', 'cachePath', 'cacheList', 'cacheClear', 'cachePrune', 'ciBuildId', 'componentTesting', 'config', 'configFile', 'cypressVersion', 'destination', 'detached', 'dev', 'exit', 'env', 'force', 'global', 'group', 'headed', 'headless', 'key', 'path', 'parallel', 'port', 'project', 'quiet', 'reporter', 'reporterOptions', 'record', 'spec', 'tag');
|
215
|
+
opts = _.pick(opts, 'browser', 'cachePath', 'cacheList', 'cacheClear', 'cachePrune', 'ciBuildId', 'componentTesting', 'config', 'configFile', 'cypressVersion', 'destination', 'detached', 'dev', 'exit', 'env', 'force', 'global', 'group', 'headed', 'headless', 'key', 'path', 'parallel', 'port', 'project', 'quiet', 'reporter', 'reporterOptions', 'record', 'runProject', 'spec', 'tag');
|
216
216
|
|
217
217
|
if (opts.exit) {
|
218
218
|
opts = _.omit(opts, 'exit');
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cypress",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.5.0",
|
4
4
|
"main": "index.js",
|
5
5
|
"scripts": {
|
6
6
|
"postinstall": "node index.js --exec install",
|
@@ -10,6 +10,7 @@
|
|
10
10
|
"@cypress/listr-verbose-renderer": "^0.4.1",
|
11
11
|
"@cypress/request": "^2.88.5",
|
12
12
|
"@cypress/xvfb": "^1.2.4",
|
13
|
+
"@types/node": "12.12.50",
|
13
14
|
"@types/sinonjs__fake-timers": "^6.0.1",
|
14
15
|
"@types/sizzle": "^2.3.2",
|
15
16
|
"arch": "^2.1.2",
|
@@ -22,7 +23,7 @@
|
|
22
23
|
"commander": "^5.1.0",
|
23
24
|
"common-tags": "^1.8.0",
|
24
25
|
"dayjs": "^1.9.3",
|
25
|
-
"debug": "
|
26
|
+
"debug": "4.3.2",
|
26
27
|
"eventemitter2": "^6.4.2",
|
27
28
|
"execa": "^4.0.2",
|
28
29
|
"executable": "^4.1.1",
|
package/types/chai/index.d.ts
CHANGED
@@ -67,7 +67,7 @@ declare namespace Chai {
|
|
67
67
|
getOwnEnumerableProperties(obj: object): Array<string | symbol>;
|
68
68
|
getMessage(errorLike: Error | string): string;
|
69
69
|
getMessage(obj: any, args: AssertionArgs): string;
|
70
|
-
inspect(obj: any, showHidden?: boolean, depth?: number, colors?: boolean):
|
70
|
+
inspect(obj: any, showHidden?: boolean, depth?: number, colors?: boolean): string;
|
71
71
|
isProxyEnabled(): boolean;
|
72
72
|
objDisplay(obj: object): void;
|
73
73
|
proxify(obj: object, nonChainableMethodName: string): object;
|
@@ -202,6 +202,7 @@ declare namespace Chai {
|
|
202
202
|
empty: Assertion;
|
203
203
|
arguments: Assertion;
|
204
204
|
Arguments: Assertion;
|
205
|
+
finite: Assertion;
|
205
206
|
equal: Equal;
|
206
207
|
equals: Equal;
|
207
208
|
eq: Equal;
|
@@ -310,7 +311,7 @@ declare namespace Chai {
|
|
310
311
|
property: Property;
|
311
312
|
}
|
312
313
|
|
313
|
-
interface Deep {
|
314
|
+
interface Deep extends KeyFilter {
|
314
315
|
equal: Equal;
|
315
316
|
equals: Equal;
|
316
317
|
eq: Equal;
|
@@ -319,7 +320,6 @@ declare namespace Chai {
|
|
319
320
|
contain: Include;
|
320
321
|
contains: Include;
|
321
322
|
property: Property;
|
322
|
-
members: Members;
|
323
323
|
ordered: Ordered;
|
324
324
|
nested: Nested;
|
325
325
|
own: Own;
|
@@ -762,6 +762,16 @@ declare namespace Chai {
|
|
762
762
|
*/
|
763
763
|
isNotNumber<T>(value: T, message?: string): void;
|
764
764
|
|
765
|
+
/**
|
766
|
+
* Asserts that value is a finite number.
|
767
|
+
* Unlike `.isNumber`, this will fail for `NaN` and `Infinity`.
|
768
|
+
*
|
769
|
+
* @type T Type of value
|
770
|
+
* @param value Actual value
|
771
|
+
* @param message Message to display on error.
|
772
|
+
*/
|
773
|
+
isFinite<T>(value: T, message?: string): void;
|
774
|
+
|
765
775
|
/**
|
766
776
|
* Asserts that value is a boolean.
|
767
777
|
*
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* This file should be deleted as soon as the serever
|
3
|
+
* TODO: delete this file when ResolvedDevServerConfig.server is converted to closeServer
|
4
|
+
*/
|
5
|
+
|
6
|
+
/// <reference types="node" />
|
7
|
+
import * as cyUtilsHttp from 'http'
|
8
|
+
export = cyUtilsHttp
|
9
|
+
/**
|
10
|
+
* namespace created to bridge nodeJs.http typings so that
|
11
|
+
* we can type http Server in CT
|
12
|
+
*/
|
13
|
+
export as namespace cyUtilsHttp
|
package/types/cypress.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
/// <reference path="./cypress-npm-api.d.ts" />
|
2
|
+
/// <reference path="./cypress-eventemitter.d.ts" />
|
2
3
|
|
3
4
|
declare namespace Cypress {
|
4
5
|
type FileContents = string | any[] | object
|
@@ -5131,6 +5132,21 @@ declare namespace Cypress {
|
|
5131
5132
|
tag?: string
|
5132
5133
|
}
|
5133
5134
|
|
5135
|
+
interface DevServerOptions {
|
5136
|
+
specs: Spec[]
|
5137
|
+
config: {
|
5138
|
+
supportFile?: string
|
5139
|
+
projectRoot: string
|
5140
|
+
webpackDevServerPublicPathRoute: string
|
5141
|
+
},
|
5142
|
+
devServerEvents: NodeJS.EventEmitter,
|
5143
|
+
}
|
5144
|
+
|
5145
|
+
interface ResolvedDevServerConfig {
|
5146
|
+
port: number
|
5147
|
+
close: (done?: () => any) => void
|
5148
|
+
}
|
5149
|
+
|
5134
5150
|
interface PluginEvents {
|
5135
5151
|
(action: 'after:run', fn: (results: CypressCommandLine.CypressRunResult | CypressCommandLine.CypressFailedRunResult) => void | Promise<void>): void
|
5136
5152
|
(action: 'after:screenshot', fn: (details: ScreenshotDetails) => void | AfterScreenshotReturnObject | Promise<AfterScreenshotReturnObject>): void
|
@@ -5139,6 +5155,7 @@ declare namespace Cypress {
|
|
5139
5155
|
(action: 'before:spec', fn: (spec: Spec) => void | Promise<void>): void
|
5140
5156
|
(action: 'before:browser:launch', fn: (browser: Browser, browserLaunchOptions: BrowserLaunchOptions) => void | BrowserLaunchOptions | Promise<BrowserLaunchOptions>): void
|
5141
5157
|
(action: 'file:preprocessor', fn: (file: FileObject) => string | Promise<string>): void
|
5158
|
+
(action: 'dev-server:start', fn: (file: DevServerOptions) => Promise<ResolvedDevServerConfig>): void
|
5142
5159
|
(action: 'task', tasks: Tasks): void
|
5143
5160
|
}
|
5144
5161
|
|
@@ -5178,7 +5195,7 @@ declare namespace Cypress {
|
|
5178
5195
|
})
|
5179
5196
|
```
|
5180
5197
|
*/
|
5181
|
-
(action: 'uncaught:exception', fn: (error: Error, runnable: Mocha.Runnable) => false | void):
|
5198
|
+
(action: 'uncaught:exception', fn: (error: Error, runnable: Mocha.Runnable) => false | void): Cypress
|
5182
5199
|
/**
|
5183
5200
|
* Fires when your app calls the global `window.confirm()` method.
|
5184
5201
|
* Cypress will auto accept confirmations. Return `false` from this event and the confirmation will be canceled.
|
@@ -5191,7 +5208,7 @@ declare namespace Cypress {
|
|
5191
5208
|
})
|
5192
5209
|
```
|
5193
5210
|
*/
|
5194
|
-
(action: 'window:confirm', fn: ((text: string) => false | void) | SinonSpyAgent<sinon.SinonSpy> | SinonSpyAgent<sinon.SinonStub>):
|
5211
|
+
(action: 'window:confirm', fn: ((text: string) => false | void) | SinonSpyAgent<sinon.SinonSpy> | SinonSpyAgent<sinon.SinonStub>): Cypress
|
5195
5212
|
/**
|
5196
5213
|
* Fires when your app calls the global `window.alert()` method.
|
5197
5214
|
* Cypress will auto accept alerts. You cannot change this behavior.
|
@@ -5208,91 +5225,117 @@ declare namespace Cypress {
|
|
5208
5225
|
```
|
5209
5226
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5210
5227
|
*/
|
5211
|
-
(action: 'window:alert', fn: ((text: string) => void) | SinonSpyAgent<sinon.SinonSpy> | SinonSpyAgent<sinon.SinonStub>):
|
5228
|
+
(action: 'window:alert', fn: ((text: string) => void) | SinonSpyAgent<sinon.SinonSpy> | SinonSpyAgent<sinon.SinonStub>): Cypress
|
5212
5229
|
/**
|
5213
|
-
* Fires as the page begins to load, but before any of your applications JavaScript has executed.
|
5230
|
+
* Fires as the page begins to load, but before any of your applications JavaScript has executed.
|
5231
|
+
* This fires at the exact same time as `cy.visit()` `onBeforeLoad` callback.
|
5232
|
+
* Useful to modify the window on a page transition.
|
5214
5233
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5215
5234
|
*/
|
5216
|
-
(action: 'window:before:load', fn: (win: AUTWindow) => void):
|
5235
|
+
(action: 'window:before:load', fn: (win: AUTWindow) => void): Cypress
|
5217
5236
|
/**
|
5218
|
-
* Fires after all your resources have finished loading after a page transition.
|
5237
|
+
* Fires after all your resources have finished loading after a page transition.
|
5238
|
+
* This fires at the exact same time as a `cy.visit()` `onLoad` callback.
|
5219
5239
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5220
5240
|
*/
|
5221
|
-
(action: 'window:load', fn: (win: AUTWindow) => void):
|
5241
|
+
(action: 'window:load', fn: (win: AUTWindow) => void): Cypress
|
5222
5242
|
/**
|
5223
|
-
* Fires when your application is about to navigate away.
|
5243
|
+
* Fires when your application is about to navigate away.
|
5244
|
+
* The real event object is provided to you.
|
5245
|
+
* Your app may have set a `returnValue` on the event, which is useful to assert on.
|
5224
5246
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5225
5247
|
*/
|
5226
|
-
(action: 'window:before:unload', fn: (event: BeforeUnloadEvent) => void):
|
5248
|
+
(action: 'window:before:unload', fn: (event: BeforeUnloadEvent) => void): Cypress
|
5227
5249
|
/**
|
5228
|
-
* Fires when your application is has unloaded and is navigating away.
|
5250
|
+
* Fires when your application is has unloaded and is navigating away.
|
5251
|
+
* The real event object is provided to you. This event is not cancelable.
|
5229
5252
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5230
5253
|
*/
|
5231
|
-
(action: 'window:unload', fn: (event: Event) => void):
|
5254
|
+
(action: 'window:unload', fn: (event: Event) => void): Cypress
|
5232
5255
|
/**
|
5233
5256
|
* Fires whenever Cypress detects that your application's URL has changed.
|
5234
5257
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5235
5258
|
*/
|
5236
|
-
(action: 'url:changed', fn: (url: string) => void):
|
5259
|
+
(action: 'url:changed', fn: (url: string) => void): Cypress
|
5237
5260
|
/**
|
5238
|
-
* Fires when the test has failed. It is technically possible to prevent the test
|
5261
|
+
* Fires when the test has failed. It is technically possible to prevent the test
|
5262
|
+
* from actually failing by binding to this event and invoking an async `done` callback.
|
5263
|
+
* However this is **strongly discouraged**. Tests should never legitimately fail.
|
5264
|
+
* This event exists because it's extremely useful for debugging purposes.
|
5239
5265
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5240
5266
|
*/
|
5241
|
-
(action: 'fail', fn: (error: Error, mocha: Mocha.Runnable) => void):
|
5267
|
+
(action: 'fail', fn: (error: Error, mocha: Mocha.Runnable) => void): Cypress
|
5242
5268
|
/**
|
5243
|
-
* Fires whenever the viewport changes via a `cy.viewport()` or naturally when
|
5269
|
+
* Fires whenever the viewport changes via a `cy.viewport()` or naturally when
|
5270
|
+
* Cypress resets the viewport to the default between tests. Useful for debugging purposes.
|
5244
5271
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5245
5272
|
*/
|
5246
|
-
(action: 'viewport:changed', fn: (viewport: Viewport) => void):
|
5273
|
+
(action: 'viewport:changed', fn: (viewport: Viewport) => void): Cypress
|
5247
5274
|
/**
|
5248
|
-
* Fires whenever **Cypress** is scrolling your application.
|
5275
|
+
* Fires whenever **Cypress** is scrolling your application.
|
5276
|
+
* This event is fired when Cypress is {% url 'waiting for and calculating
|
5277
|
+
* actionability' interacting-with-elements %}. It will scroll to 'uncover'
|
5278
|
+
* elements currently being covered. This event is extremely useful to debug why
|
5279
|
+
* Cypress may think an element is not interactive.
|
5249
5280
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5250
5281
|
*/
|
5251
|
-
(action: 'scrolled', fn: ($el: JQuery) => void):
|
5282
|
+
(action: 'scrolled', fn: ($el: JQuery) => void): Cypress
|
5252
5283
|
/**
|
5253
|
-
* Fires when a cy command is first invoked and enqueued to be run later.
|
5284
|
+
* Fires when a cy command is first invoked and enqueued to be run later.
|
5285
|
+
* Useful for debugging purposes if you're confused about the order in which commands will execute.
|
5254
5286
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5255
5287
|
*/
|
5256
|
-
(action: 'command:enqueued', fn: (command: EnqueuedCommand) => void):
|
5288
|
+
(action: 'command:enqueued', fn: (command: EnqueuedCommand) => void): Cypress
|
5257
5289
|
/**
|
5258
|
-
* Fires when cy begins actually running and executing your command.
|
5290
|
+
* Fires when cy begins actually running and executing your command.
|
5291
|
+
* Useful for debugging and understanding how the command queue is async.
|
5259
5292
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5260
5293
|
*/
|
5261
|
-
(action: 'command:start', fn: (command: CommandQueue) => void):
|
5294
|
+
(action: 'command:start', fn: (command: CommandQueue) => void): Cypress
|
5262
5295
|
/**
|
5263
|
-
* Fires when cy finishes running and executing your command.
|
5296
|
+
* Fires when cy finishes running and executing your command.
|
5297
|
+
* Useful for debugging and understanding how commands are handled.
|
5264
5298
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5265
5299
|
*/
|
5266
|
-
(action: 'command:end', fn: (command: CommandQueue) => void):
|
5300
|
+
(action: 'command:end', fn: (command: CommandQueue) => void): Cypress
|
5267
5301
|
/**
|
5268
|
-
* Fires whenever a command begins its retrying routines.
|
5302
|
+
* Fires whenever a command begins its retrying routines.
|
5303
|
+
* This is called on the trailing edge after Cypress has internally
|
5304
|
+
* waited for the retry interval. Useful to understand **why** a command is retrying,
|
5305
|
+
* and generally includes the actual error causing the retry to happen.
|
5306
|
+
* When commands fail the final error is the one that actually bubbles up to fail the test.
|
5307
|
+
* This event is essentially to debug why Cypress is failing.
|
5269
5308
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5270
5309
|
*/
|
5271
|
-
(action: 'command:retry', fn: (command: CommandQueue) => void):
|
5310
|
+
(action: 'command:retry', fn: (command: CommandQueue) => void): Cypress
|
5272
5311
|
/**
|
5273
|
-
* Fires whenever a command emits this event so it can be displayed in the Command Log.
|
5312
|
+
* Fires whenever a command emits this event so it can be displayed in the Command Log.
|
5313
|
+
* Useful to see how internal cypress commands utilize the {% url 'Cypress.log()' cypress-log %} API.
|
5274
5314
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5275
5315
|
*/
|
5276
|
-
(action: 'log:added', fn: (log: any, interactive: boolean) => void):
|
5316
|
+
(action: 'log:added', fn: (log: any, interactive: boolean) => void): Cypress
|
5277
5317
|
/**
|
5278
|
-
* Fires whenever a command's attributes changes.
|
5318
|
+
* Fires whenever a command's attributes changes.
|
5319
|
+
* This event is debounced to prevent it from firing too quickly and too often.
|
5320
|
+
* Useful to see how internal cypress commands utilize the {% url 'Cypress.log()' cypress-log %} API.
|
5279
5321
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5280
5322
|
*/
|
5281
|
-
(action: 'log:changed', fn: (log: any, interactive: boolean) => void):
|
5323
|
+
(action: 'log:changed', fn: (log: any, interactive: boolean) => void): Cypress
|
5282
5324
|
/**
|
5283
5325
|
* Fires before the test and all **before** and **beforeEach** hooks run.
|
5284
5326
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5285
5327
|
*/
|
5286
|
-
(action: 'test:before:run', fn: (attributes: ObjectLike, test: Mocha.Test) => void):
|
5328
|
+
(action: 'test:before:run', fn: (attributes: ObjectLike, test: Mocha.Test) => void): Cypress
|
5287
5329
|
/**
|
5288
|
-
* Fires before the test and all **before** and **beforeEach** hooks run.
|
5330
|
+
* Fires before the test and all **before** and **beforeEach** hooks run.
|
5331
|
+
* If a `Promise` is returned, it will be awaited before proceeding.
|
5289
5332
|
*/
|
5290
|
-
(action: 'test:before:run:async', fn: (attributes: ObjectLike, test: Mocha.Test) => void | Promise<any>):
|
5333
|
+
(action: 'test:before:run:async', fn: (attributes: ObjectLike, test: Mocha.Test) => void | Promise<any>): Cypress
|
5291
5334
|
/**
|
5292
5335
|
* Fires after the test and all **afterEach** and **after** hooks run.
|
5293
5336
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
5294
5337
|
*/
|
5295
|
-
(action: 'test:after:run', fn: (attributes: ObjectLike, test: Mocha.Test) => void):
|
5338
|
+
(action: 'test:after:run', fn: (attributes: ObjectLike, test: Mocha.Test) => void): Cypress
|
5296
5339
|
}
|
5297
5340
|
|
5298
5341
|
// $CommandQueue from `command_queue.coffee` - a lot to type. Might be more useful if it was written in TS
|
@@ -5381,6 +5424,8 @@ declare namespace Cypress {
|
|
5381
5424
|
/** Override *name* for display purposes only */
|
5382
5425
|
displayName: string
|
5383
5426
|
message: any
|
5427
|
+
/** Set to false if you want to control the finishing of the command in the log yourself */
|
5428
|
+
autoEnd: boolean
|
5384
5429
|
/** Return an object that will be printed in the dev tools console */
|
5385
5430
|
consoleProps(): ObjectLike
|
5386
5431
|
}
|