cypress 8.1.0 → 8.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/types/cypress.d.ts +27 -0
- package/types/net-stubbing.ts +3 -1
package/package.json
CHANGED
package/types/cypress.d.ts
CHANGED
@@ -258,6 +258,14 @@ declare namespace Cypress {
|
|
258
258
|
*/
|
259
259
|
spec: Spec
|
260
260
|
|
261
|
+
/**
|
262
|
+
* Currently executing test runnable instance.
|
263
|
+
*/
|
264
|
+
currentTest: {
|
265
|
+
title: string,
|
266
|
+
titlePath: string[]
|
267
|
+
}
|
268
|
+
|
261
269
|
/**
|
262
270
|
* Information about the browser currently running the tests
|
263
271
|
*/
|
@@ -557,6 +565,10 @@ declare namespace Cypress {
|
|
557
565
|
onSpecWindow: (window: Window, specList: string[] | Array<() => Promise<void>>) => void
|
558
566
|
}
|
559
567
|
|
568
|
+
interface SessionOptions {
|
569
|
+
validate?: () => false|void
|
570
|
+
}
|
571
|
+
|
560
572
|
type CanReturnChainable = void | Chainable | Promise<unknown>
|
561
573
|
type ThenReturn<S, R> =
|
562
574
|
R extends void ? Chainable<S> :
|
@@ -952,6 +964,15 @@ declare namespace Cypress {
|
|
952
964
|
*/
|
953
965
|
debug(options?: Partial<Loggable>): Chainable<Subject>
|
954
966
|
|
967
|
+
/**
|
968
|
+
* Save/Restore browser Cookies, LocalStorage, and SessionStorage data resulting from the supplied `setup` function.
|
969
|
+
*
|
970
|
+
* Only available if the `experimentalSessionSupport` config option is enabled.
|
971
|
+
*
|
972
|
+
* @see https://on.cypress.io/session
|
973
|
+
*/
|
974
|
+
session(id: string|object, setup?: SessionOptions['validate'], options?: SessionOptions): Chainable<null>
|
975
|
+
|
955
976
|
/**
|
956
977
|
* Get the window.document of the page that is currently active.
|
957
978
|
*
|
@@ -2653,6 +2674,11 @@ declare namespace Cypress {
|
|
2653
2674
|
* @default 'top'
|
2654
2675
|
*/
|
2655
2676
|
scrollBehavior: scrollBehaviorOptions
|
2677
|
+
/**
|
2678
|
+
* Enable experimental session support. See https://on.cypress.io/session
|
2679
|
+
* @default false
|
2680
|
+
*/
|
2681
|
+
experimentalSessionSupport: boolean
|
2656
2682
|
/**
|
2657
2683
|
* Allows listening to the `before:run`, `after:run`, `before:spec`, and `after:spec` events in the plugins file during interactive mode.
|
2658
2684
|
* @default false
|
@@ -5509,6 +5535,7 @@ declare namespace Cypress {
|
|
5509
5535
|
|
5510
5536
|
interface Log {
|
5511
5537
|
end(): Log
|
5538
|
+
error(error: Error): Log
|
5512
5539
|
finish(): void
|
5513
5540
|
get<K extends keyof LogConfig>(attr: K): LogConfig[K]
|
5514
5541
|
get(): LogConfig
|
package/types/net-stubbing.ts
CHANGED
@@ -267,9 +267,11 @@ interface RequestEvents {
|
|
267
267
|
*/
|
268
268
|
export interface Interception {
|
269
269
|
id: string
|
270
|
+
/* @internal */
|
271
|
+
browserRequestId?: string
|
270
272
|
routeId: string
|
271
273
|
/* @internal */
|
272
|
-
|
274
|
+
setLogFlag: (flag: 'spied' | 'stubbed' | 'reqModified' | 'resModified') => void
|
273
275
|
request: CyHttpMessages.IncomingRequest
|
274
276
|
/**
|
275
277
|
* Was `cy.wait()` used to wait on this request?
|