cypress 14.0.3 → 14.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/types/cypress.d.ts +45 -18
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cypress",
|
3
|
-
"version": "14.0
|
3
|
+
"version": "14.2.0",
|
4
4
|
"main": "index.js",
|
5
5
|
"scripts": {
|
6
6
|
"postinstall": "node index.js --exec install",
|
@@ -18,9 +18,9 @@
|
|
18
18
|
"cachedir": "^2.3.0",
|
19
19
|
"chalk": "^4.1.0",
|
20
20
|
"check-more-types": "^2.24.0",
|
21
|
-
"ci-info": "^4.
|
21
|
+
"ci-info": "^4.1.0",
|
22
22
|
"cli-cursor": "^3.1.0",
|
23
|
-
"cli-table3": "~0.6.
|
23
|
+
"cli-table3": "~0.6.5",
|
24
24
|
"commander": "^6.2.1",
|
25
25
|
"common-tags": "^1.8.0",
|
26
26
|
"dayjs": "^1.10.4",
|
@@ -123,8 +123,8 @@
|
|
123
123
|
},
|
124
124
|
"buildInfo": {
|
125
125
|
"commitBranch": "develop",
|
126
|
-
"commitSha": "
|
127
|
-
"commitDate": "2025-
|
126
|
+
"commitSha": "27d8fb0468696b97693dc7e0afa1ff4c84527516",
|
127
|
+
"commitDate": "2025-03-12T17:13:58.000Z",
|
128
128
|
"stable": true
|
129
129
|
},
|
130
130
|
"description": "Cypress is a next generation front end testing tool built for the modern web",
|
package/types/cypress.d.ts
CHANGED
@@ -570,6 +570,14 @@ declare namespace Cypress {
|
|
570
570
|
*/
|
571
571
|
log(options: Partial<LogConfig>): Log
|
572
572
|
|
573
|
+
/**
|
574
|
+
* Stop the Cypress App on the current machine while tests are running
|
575
|
+
* @see https://on.cypress.io/cypress-stop
|
576
|
+
* @example
|
577
|
+
* Cypress.stop()
|
578
|
+
*/
|
579
|
+
stop(): void
|
580
|
+
|
573
581
|
Commands: {
|
574
582
|
/**
|
575
583
|
* Add a custom command
|
@@ -756,8 +764,10 @@ declare namespace Cypress {
|
|
756
764
|
getCoordsByPosition(left: number, top: number, xPosition?: string, yPosition?: string): number
|
757
765
|
getElementPositioning(element: JQuery | HTMLElement): ElementPositioning
|
758
766
|
getElementAtPointFromViewport(doc: Document, x: number, y: number): Element | null
|
759
|
-
getElementCoordinatesByPosition(element: JQuery | HTMLElement, position
|
767
|
+
getElementCoordinatesByPosition(element: JQuery | HTMLElement, position?: string): ElementCoordinates
|
760
768
|
getElementCoordinatesByPositionRelativeToXY(element: JQuery | HTMLElement, x: number, y: number): ElementPositioning
|
769
|
+
getHostContenteditable(element: HTMLElement): HTMLElement
|
770
|
+
getSelectionBounds(element: HTMLElement): { start: number, end: number }
|
761
771
|
}
|
762
772
|
|
763
773
|
/**
|
@@ -874,7 +884,7 @@ declare namespace Cypress {
|
|
874
884
|
* // Check first radio element
|
875
885
|
* cy.get('[type="radio"]').first().check()
|
876
886
|
*/
|
877
|
-
check(options?: Partial<
|
887
|
+
check(options?: Partial<CheckClearOptions>): Chainable<Subject>
|
878
888
|
/**
|
879
889
|
* Check checkbox(es) or radio(s). This element must be an `<input>` with type `checkbox` or `radio`.
|
880
890
|
*
|
@@ -885,7 +895,7 @@ declare namespace Cypress {
|
|
885
895
|
* // Check the checkboxes with the values 'ga' and 'ca'
|
886
896
|
* cy.get('[type="checkbox"]').check(['ga', 'ca'])
|
887
897
|
*/
|
888
|
-
check(value: string | string[], options?: Partial<
|
898
|
+
check(value: string | string[], options?: Partial<CheckClearOptions>): Chainable<Subject>
|
889
899
|
|
890
900
|
/**
|
891
901
|
* Get the children of each DOM element within a set of DOM elements.
|
@@ -902,7 +912,7 @@ declare namespace Cypress {
|
|
902
912
|
*
|
903
913
|
* @see https://on.cypress.io/clear
|
904
914
|
*/
|
905
|
-
clear(options?: Partial<
|
915
|
+
clear(options?: Partial<CheckClearOptions>): Chainable<Subject>
|
906
916
|
|
907
917
|
/**
|
908
918
|
* Clear a specific browser cookie for a domain.
|
@@ -1806,7 +1816,7 @@ declare namespace Cypress {
|
|
1806
1816
|
*
|
1807
1817
|
* @see https://on.cypress.io/readfile
|
1808
1818
|
*/
|
1809
|
-
readFile<Contents = any>(filePath: string, options?: Partial<Loggable & Timeoutable>): Chainable<Contents>
|
1819
|
+
readFile<Contents = any>(filePath: string, options?: Partial<ReadFileOptions & Loggable & Timeoutable>): Chainable<Contents>
|
1810
1820
|
/**
|
1811
1821
|
* Read a file with given encoding and yield its contents.
|
1812
1822
|
*
|
@@ -1896,7 +1906,7 @@ declare namespace Cypress {
|
|
1896
1906
|
*
|
1897
1907
|
* @see https://on.cypress.io/root
|
1898
1908
|
*/
|
1899
|
-
root<E extends Node = HTMLHtmlElement>(options?: Partial<
|
1909
|
+
root<E extends Node = HTMLHtmlElement>(options?: Partial<LogTimeoutOptions>): Chainable<JQuery<E>> // can't do better typing unless we ignore the `.within()` case
|
1900
1910
|
|
1901
1911
|
/**
|
1902
1912
|
* Take a screenshot of the application under test and the Cypress Command Log.
|
@@ -1930,7 +1940,7 @@ declare namespace Cypress {
|
|
1930
1940
|
*
|
1931
1941
|
* @see https://on.cypress.io/scrollto
|
1932
1942
|
*/
|
1933
|
-
scrollTo(
|
1943
|
+
scrollTo(positionOrX: PositionType | number | string, options?: Partial<ScrollToOptions>): Chainable<Subject>
|
1934
1944
|
/**
|
1935
1945
|
* Scroll to a specific X,Y position.
|
1936
1946
|
*
|
@@ -1978,6 +1988,18 @@ declare namespace Cypress {
|
|
1978
1988
|
*/
|
1979
1989
|
shadow(): Chainable<Subject>
|
1980
1990
|
|
1991
|
+
/**
|
1992
|
+
* Traverse into an element's shadow root.
|
1993
|
+
*
|
1994
|
+
* @example
|
1995
|
+
* cy.get('my-component')
|
1996
|
+
* .shadow({ timeout: 10000, log: false })
|
1997
|
+
* .find('.my-button')
|
1998
|
+
* .click()
|
1999
|
+
* @see https://on.cypress.io/shadow
|
2000
|
+
*/
|
2001
|
+
shadow(options?: Partial<LogTimeoutOptions>): Chainable<Subject>
|
2002
|
+
|
1981
2003
|
/**
|
1982
2004
|
* Create an assertion. Assertions are automatically retried until they pass or time out.
|
1983
2005
|
*
|
@@ -2326,7 +2348,7 @@ declare namespace Cypress {
|
|
2326
2348
|
* // Uncheck the checkbox with the value of 'ga'
|
2327
2349
|
* cy.get('input[type="checkbox"]').uncheck(['ga'])
|
2328
2350
|
*/
|
2329
|
-
uncheck(options?: Partial<
|
2351
|
+
uncheck(options?: Partial<CheckClearOptions>): Chainable<Subject>
|
2330
2352
|
/**
|
2331
2353
|
* Uncheck specific checkbox.
|
2332
2354
|
*
|
@@ -2335,7 +2357,7 @@ declare namespace Cypress {
|
|
2335
2357
|
* // Uncheck the checkbox with the value of 'ga'
|
2336
2358
|
* cy.get('input[type="checkbox"]').uncheck('ga')
|
2337
2359
|
*/
|
2338
|
-
uncheck(value: string, options?: Partial<
|
2360
|
+
uncheck(value: string, options?: Partial<CheckClearOptions>): Chainable<Subject>
|
2339
2361
|
/**
|
2340
2362
|
* Uncheck specific checkboxes.
|
2341
2363
|
*
|
@@ -2344,7 +2366,7 @@ declare namespace Cypress {
|
|
2344
2366
|
* // Uncheck the checkbox with the value of 'ga', 'ma'
|
2345
2367
|
* cy.get('input[type="checkbox"]').uncheck(['ga', 'ma'])
|
2346
2368
|
*/
|
2347
|
-
uncheck(values: string[], options?: Partial<
|
2369
|
+
uncheck(values: string[], options?: Partial<CheckClearOptions>): Chainable<Subject>
|
2348
2370
|
|
2349
2371
|
/**
|
2350
2372
|
* Get the current URL of the page that is currently active.
|
@@ -2556,6 +2578,10 @@ declare namespace Cypress {
|
|
2556
2578
|
* expect(s).to.have.been.calledOnce
|
2557
2579
|
*/
|
2558
2580
|
withArgs(...args: any[]): Omit<A, 'withArgs'> & Agent<A>
|
2581
|
+
|
2582
|
+
callsFake(func: (...args: any[]) => any): Agent<A>
|
2583
|
+
|
2584
|
+
callThroughWithNew(): Agent<A>
|
2559
2585
|
}
|
2560
2586
|
|
2561
2587
|
type Agent<T extends sinon.SinonSpy> = SinonSpyAgent<T> & T
|
@@ -2726,14 +2752,9 @@ declare namespace Cypress {
|
|
2726
2752
|
|
2727
2753
|
interface BlurOptions extends Loggable, Timeoutable, Forceable { }
|
2728
2754
|
|
2729
|
-
interface
|
2730
|
-
interval: number
|
2731
|
-
}
|
2732
|
-
|
2733
|
-
interface ClearOptions extends Loggable, Timeoutable, ActionableOptions {
|
2734
|
-
interval: number
|
2735
|
-
}
|
2755
|
+
interface CheckClearOptions extends Loggable, Timeoutable, ActionableOptions { }
|
2736
2756
|
|
2757
|
+
interface LogTimeoutOptions extends Loggable, Timeoutable { }
|
2737
2758
|
/**
|
2738
2759
|
* Object to change the default behavior of .click().
|
2739
2760
|
*/
|
@@ -3695,7 +3716,7 @@ declare namespace Cypress {
|
|
3695
3716
|
*
|
3696
3717
|
* @default 0
|
3697
3718
|
*/
|
3698
|
-
duration: number
|
3719
|
+
duration: number | string
|
3699
3720
|
/**
|
3700
3721
|
* Will scroll with the easing animation
|
3701
3722
|
*
|
@@ -3986,6 +4007,11 @@ declare namespace Cypress {
|
|
3986
4007
|
decode: boolean
|
3987
4008
|
}
|
3988
4009
|
|
4010
|
+
/** Options to change the default behavior of .readFile */
|
4011
|
+
interface ReadFileOptions extends Loggable {
|
4012
|
+
encoding: Encodings
|
4013
|
+
}
|
4014
|
+
|
3989
4015
|
/** Options to change the default behavior of .writeFile */
|
3990
4016
|
interface WriteFileOptions extends Loggable {
|
3991
4017
|
flag: string
|
@@ -6430,6 +6456,7 @@ declare namespace Cypress {
|
|
6430
6456
|
}
|
6431
6457
|
|
6432
6458
|
interface Log {
|
6459
|
+
id: string
|
6433
6460
|
end(): Log
|
6434
6461
|
error(error: Error): Log
|
6435
6462
|
finish(): void
|