cypress 14.0.2 → 14.1.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 +34 -18
package/package.json
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "cypress",
|
3
|
-
"version": "14.0
|
3
|
+
"version": "14.1.0",
|
4
4
|
"main": "index.js",
|
5
5
|
"scripts": {
|
6
6
|
"postinstall": "node index.js --exec install",
|
7
7
|
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";"
|
8
8
|
},
|
9
9
|
"dependencies": {
|
10
|
-
"@cypress/request": "^3.0.
|
10
|
+
"@cypress/request": "^3.0.7",
|
11
11
|
"@cypress/xvfb": "^1.2.4",
|
12
12
|
"@types/sinonjs__fake-timers": "8.1.1",
|
13
13
|
"@types/sizzle": "^2.3.2",
|
@@ -18,7 +18,7 @@
|
|
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
23
|
"cli-table3": "~0.6.1",
|
24
24
|
"commander": "^6.2.1",
|
@@ -123,8 +123,8 @@
|
|
123
123
|
},
|
124
124
|
"buildInfo": {
|
125
125
|
"commitBranch": "develop",
|
126
|
-
"commitSha": "
|
127
|
-
"commitDate": "2025-02-
|
126
|
+
"commitSha": "7ffd5a33c1044768da0d5c77b65cd0323ca93004",
|
127
|
+
"commitDate": "2025-02-25T17:26:26.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
@@ -756,8 +756,10 @@ declare namespace Cypress {
|
|
756
756
|
getCoordsByPosition(left: number, top: number, xPosition?: string, yPosition?: string): number
|
757
757
|
getElementPositioning(element: JQuery | HTMLElement): ElementPositioning
|
758
758
|
getElementAtPointFromViewport(doc: Document, x: number, y: number): Element | null
|
759
|
-
getElementCoordinatesByPosition(element: JQuery | HTMLElement, position
|
759
|
+
getElementCoordinatesByPosition(element: JQuery | HTMLElement, position?: string): ElementCoordinates
|
760
760
|
getElementCoordinatesByPositionRelativeToXY(element: JQuery | HTMLElement, x: number, y: number): ElementPositioning
|
761
|
+
getHostContenteditable(element: HTMLElement): HTMLElement
|
762
|
+
getSelectionBounds(element: HTMLElement): { start: number, end: number }
|
761
763
|
}
|
762
764
|
|
763
765
|
/**
|
@@ -874,7 +876,7 @@ declare namespace Cypress {
|
|
874
876
|
* // Check first radio element
|
875
877
|
* cy.get('[type="radio"]').first().check()
|
876
878
|
*/
|
877
|
-
check(options?: Partial<
|
879
|
+
check(options?: Partial<CheckClearOptions>): Chainable<Subject>
|
878
880
|
/**
|
879
881
|
* Check checkbox(es) or radio(s). This element must be an `<input>` with type `checkbox` or `radio`.
|
880
882
|
*
|
@@ -885,7 +887,7 @@ declare namespace Cypress {
|
|
885
887
|
* // Check the checkboxes with the values 'ga' and 'ca'
|
886
888
|
* cy.get('[type="checkbox"]').check(['ga', 'ca'])
|
887
889
|
*/
|
888
|
-
check(value: string | string[], options?: Partial<
|
890
|
+
check(value: string | string[], options?: Partial<CheckClearOptions>): Chainable<Subject>
|
889
891
|
|
890
892
|
/**
|
891
893
|
* Get the children of each DOM element within a set of DOM elements.
|
@@ -902,7 +904,7 @@ declare namespace Cypress {
|
|
902
904
|
*
|
903
905
|
* @see https://on.cypress.io/clear
|
904
906
|
*/
|
905
|
-
clear(options?: Partial<
|
907
|
+
clear(options?: Partial<CheckClearOptions>): Chainable<Subject>
|
906
908
|
|
907
909
|
/**
|
908
910
|
* Clear a specific browser cookie for a domain.
|
@@ -1806,7 +1808,7 @@ declare namespace Cypress {
|
|
1806
1808
|
*
|
1807
1809
|
* @see https://on.cypress.io/readfile
|
1808
1810
|
*/
|
1809
|
-
readFile<Contents = any>(filePath: string, options?: Partial<Loggable & Timeoutable>): Chainable<Contents>
|
1811
|
+
readFile<Contents = any>(filePath: string, options?: Partial<ReadFileOptions & Loggable & Timeoutable>): Chainable<Contents>
|
1810
1812
|
/**
|
1811
1813
|
* Read a file with given encoding and yield its contents.
|
1812
1814
|
*
|
@@ -1896,7 +1898,7 @@ declare namespace Cypress {
|
|
1896
1898
|
*
|
1897
1899
|
* @see https://on.cypress.io/root
|
1898
1900
|
*/
|
1899
|
-
root<E extends Node = HTMLHtmlElement>(options?: Partial<
|
1901
|
+
root<E extends Node = HTMLHtmlElement>(options?: Partial<LogTimeoutOptions>): Chainable<JQuery<E>> // can't do better typing unless we ignore the `.within()` case
|
1900
1902
|
|
1901
1903
|
/**
|
1902
1904
|
* Take a screenshot of the application under test and the Cypress Command Log.
|
@@ -1930,7 +1932,7 @@ declare namespace Cypress {
|
|
1930
1932
|
*
|
1931
1933
|
* @see https://on.cypress.io/scrollto
|
1932
1934
|
*/
|
1933
|
-
scrollTo(
|
1935
|
+
scrollTo(positionOrX: PositionType | number | string, options?: Partial<ScrollToOptions>): Chainable<Subject>
|
1934
1936
|
/**
|
1935
1937
|
* Scroll to a specific X,Y position.
|
1936
1938
|
*
|
@@ -1978,6 +1980,18 @@ declare namespace Cypress {
|
|
1978
1980
|
*/
|
1979
1981
|
shadow(): Chainable<Subject>
|
1980
1982
|
|
1983
|
+
/**
|
1984
|
+
* Traverse into an element's shadow root.
|
1985
|
+
*
|
1986
|
+
* @example
|
1987
|
+
* cy.get('my-component')
|
1988
|
+
* .shadow({ timeout: 10000, log: false })
|
1989
|
+
* .find('.my-button')
|
1990
|
+
* .click()
|
1991
|
+
* @see https://on.cypress.io/shadow
|
1992
|
+
*/
|
1993
|
+
shadow(options?: Partial<LogTimeoutOptions>): Chainable<Subject>
|
1994
|
+
|
1981
1995
|
/**
|
1982
1996
|
* Create an assertion. Assertions are automatically retried until they pass or time out.
|
1983
1997
|
*
|
@@ -2326,7 +2340,7 @@ declare namespace Cypress {
|
|
2326
2340
|
* // Uncheck the checkbox with the value of 'ga'
|
2327
2341
|
* cy.get('input[type="checkbox"]').uncheck(['ga'])
|
2328
2342
|
*/
|
2329
|
-
uncheck(options?: Partial<
|
2343
|
+
uncheck(options?: Partial<CheckClearOptions>): Chainable<Subject>
|
2330
2344
|
/**
|
2331
2345
|
* Uncheck specific checkbox.
|
2332
2346
|
*
|
@@ -2335,7 +2349,7 @@ declare namespace Cypress {
|
|
2335
2349
|
* // Uncheck the checkbox with the value of 'ga'
|
2336
2350
|
* cy.get('input[type="checkbox"]').uncheck('ga')
|
2337
2351
|
*/
|
2338
|
-
uncheck(value: string, options?: Partial<
|
2352
|
+
uncheck(value: string, options?: Partial<CheckClearOptions>): Chainable<Subject>
|
2339
2353
|
/**
|
2340
2354
|
* Uncheck specific checkboxes.
|
2341
2355
|
*
|
@@ -2344,7 +2358,7 @@ declare namespace Cypress {
|
|
2344
2358
|
* // Uncheck the checkbox with the value of 'ga', 'ma'
|
2345
2359
|
* cy.get('input[type="checkbox"]').uncheck(['ga', 'ma'])
|
2346
2360
|
*/
|
2347
|
-
uncheck(values: string[], options?: Partial<
|
2361
|
+
uncheck(values: string[], options?: Partial<CheckClearOptions>): Chainable<Subject>
|
2348
2362
|
|
2349
2363
|
/**
|
2350
2364
|
* Get the current URL of the page that is currently active.
|
@@ -2556,6 +2570,8 @@ declare namespace Cypress {
|
|
2556
2570
|
* expect(s).to.have.been.calledOnce
|
2557
2571
|
*/
|
2558
2572
|
withArgs(...args: any[]): Omit<A, 'withArgs'> & Agent<A>
|
2573
|
+
|
2574
|
+
callsFake(func: (...args: any[]) => any): Omit<A, 'withArgs'> & Agent<A>
|
2559
2575
|
}
|
2560
2576
|
|
2561
2577
|
type Agent<T extends sinon.SinonSpy> = SinonSpyAgent<T> & T
|
@@ -2726,14 +2742,9 @@ declare namespace Cypress {
|
|
2726
2742
|
|
2727
2743
|
interface BlurOptions extends Loggable, Timeoutable, Forceable { }
|
2728
2744
|
|
2729
|
-
interface
|
2730
|
-
interval: number
|
2731
|
-
}
|
2732
|
-
|
2733
|
-
interface ClearOptions extends Loggable, Timeoutable, ActionableOptions {
|
2734
|
-
interval: number
|
2735
|
-
}
|
2745
|
+
interface CheckClearOptions extends Loggable, Timeoutable, ActionableOptions { }
|
2736
2746
|
|
2747
|
+
interface LogTimeoutOptions extends Loggable, Timeoutable { }
|
2737
2748
|
/**
|
2738
2749
|
* Object to change the default behavior of .click().
|
2739
2750
|
*/
|
@@ -3695,7 +3706,7 @@ declare namespace Cypress {
|
|
3695
3706
|
*
|
3696
3707
|
* @default 0
|
3697
3708
|
*/
|
3698
|
-
duration: number
|
3709
|
+
duration: number | string
|
3699
3710
|
/**
|
3700
3711
|
* Will scroll with the easing animation
|
3701
3712
|
*
|
@@ -3986,6 +3997,11 @@ declare namespace Cypress {
|
|
3986
3997
|
decode: boolean
|
3987
3998
|
}
|
3988
3999
|
|
4000
|
+
/** Options to change the default behavior of .readFile */
|
4001
|
+
interface ReadFileOptions extends Loggable {
|
4002
|
+
encoding: Encodings
|
4003
|
+
}
|
4004
|
+
|
3989
4005
|
/** Options to change the default behavior of .writeFile */
|
3990
4006
|
interface WriteFileOptions extends Loggable {
|
3991
4007
|
flag: string
|