cypress 16.1.1 → 16.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/dist/bin/cypress CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
- var cli = require('../cli-BUzHfIQ2.js');
4
+ var cli = require('../cli-AgTnS5LO.js');
5
5
  require('../xvfb-CbW2_YXR.js');
6
6
  require('os');
7
7
  require('bluebird');
@@ -32,7 +32,7 @@ require('commander');
32
32
  require('cli-table3');
33
33
  require('dayjs');
34
34
  require('dayjs/plugin/relativeTime');
35
- require('../spawn-BNsy7yWl.js');
35
+ require('../spawn-DElwyZHC.js');
36
36
  require('child_process');
37
37
  require('listr2');
38
38
  require('readline');
@@ -13,7 +13,7 @@ var dayjs = require('dayjs');
13
13
  var relativeTime = require('dayjs/plugin/relativeTime');
14
14
  var chalk = require('chalk');
15
15
  var Bluebird = require('bluebird');
16
- var spawn = require('./spawn-BNsy7yWl.js');
16
+ var spawn = require('./spawn-DElwyZHC.js');
17
17
  var os = require('os');
18
18
  var listr2 = require('listr2');
19
19
  var timers = require('timers/promises');
@@ -3088,7 +3088,7 @@ const cliModule = {
3088
3088
  .action(function (opts, args) {
3089
3089
  return xvfb.__awaiter(this, void 0, void 0, function* () {
3090
3090
  try {
3091
- const { default: tapModule } = yield Promise.resolve().then(function () { return require('./tap-E19yanov.js'); });
3091
+ const { default: tapModule } = yield Promise.resolve().then(function () { return require('./tap-WHD3nHJC.js'); });
3092
3092
  const code = yield tapModule.start(args || [], _.pick(opts, ['session', 'json', 'timeout']));
3093
3093
  process.exit(code);
3094
3094
  }
package/dist/cli.js CHANGED
@@ -8,8 +8,8 @@ require('commander');
8
8
  require('common-tags');
9
9
  require('log-symbols');
10
10
  require('debug');
11
- var cli = require('./cli-BUzHfIQ2.js');
12
- require('./spawn-BNsy7yWl.js');
11
+ var cli = require('./cli-AgTnS5LO.js');
12
+ require('./spawn-DElwyZHC.js');
13
13
  require('os');
14
14
  require('bluebird');
15
15
  require('@cypress/xvfb');
@@ -3,7 +3,7 @@
3
3
  var xvfb = require('./xvfb-CbW2_YXR.js');
4
4
  var tmp = require('tmp');
5
5
  var fs = require('fs-extra');
6
- var cli$1 = require('./cli-BUzHfIQ2.js');
6
+ var cli$1 = require('./cli-AgTnS5LO.js');
7
7
 
8
8
  /**
9
9
  * Opens Cypress GUI
package/dist/cypress.js CHANGED
@@ -3,8 +3,8 @@
3
3
  require('./xvfb-CbW2_YXR.js');
4
4
  require('tmp');
5
5
  require('fs-extra');
6
- require('./cli-BUzHfIQ2.js');
7
- var cypress = require('./cypress-D0g_F_Y2.js');
6
+ require('./cli-AgTnS5LO.js');
7
+ var cypress = require('./cypress-CdDm9AVa.js');
8
8
  require('os');
9
9
  require('bluebird');
10
10
  require('@cypress/xvfb');
@@ -33,7 +33,7 @@ require('commander');
33
33
  require('cli-table3');
34
34
  require('dayjs');
35
35
  require('dayjs/plugin/relativeTime');
36
- require('./spawn-BNsy7yWl.js');
36
+ require('./spawn-DElwyZHC.js');
37
37
  require('child_process');
38
38
  require('listr2');
39
39
  require('readline');
@@ -6,7 +6,7 @@ require('os');
6
6
  require('child_process');
7
7
  require('path');
8
8
  require('debug');
9
- var spawn = require('../spawn-BNsy7yWl.js');
9
+ var spawn = require('../spawn-DElwyZHC.js');
10
10
  require('readline');
11
11
  require('process');
12
12
  require('stream');
package/dist/index.js CHANGED
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var xvfb = require('./xvfb-CbW2_YXR.js');
6
6
  var minimist = require('minimist');
7
7
  var Debug = require('debug');
8
- var cli$1 = require('./cli-BUzHfIQ2.js');
9
- var spawn = require('./spawn-BNsy7yWl.js');
10
- var cypress = require('./cypress-D0g_F_Y2.js');
8
+ var cli$1 = require('./cli-AgTnS5LO.js');
9
+ var spawn = require('./spawn-DElwyZHC.js');
10
+ var cypress = require('./cypress-CdDm9AVa.js');
11
11
  require('os');
12
12
  require('bluebird');
13
13
  require('@cypress/xvfb');
@@ -546,50 +546,47 @@ function requireFilterTaggedContent () {
546
546
  /**
547
547
  * Processes a single line and routes content based on tag positions.
548
548
  *
549
- * This method handles the complex logic of detecting start and end tags within a line,
550
- * maintaining state across lines, and routing content to the appropriate streams.
551
- * It supports cases where both tags appear on the same line, only one tag appears,
552
- * or no tags appear but the line is part of ongoing tagged content.
549
+ * Tags are consumed left to right, so a line may contain any number of tagged
550
+ * regions in any order, e.g. `<end><start>text\n` when consecutive tagged writes
551
+ * are read as a single chunk. Tagged state carries across lines.
553
552
  *
554
553
  * @param line The line to process
555
554
  */
556
555
  async processLine(line) {
557
- const startPos = line.indexOf(this.startTag);
558
- const endPos = line.lastIndexOf(this.endTag);
559
- if (startPos >= 0 && endPos >= 0) {
560
- // Both tags on same line
561
- if (startPos > 0) {
562
- await this.pass(line.slice(0, startPos));
556
+ let rest = line;
557
+ do {
558
+ const endPos = rest.indexOf(this.endTag);
559
+ if (this.inTaggedContent) {
560
+ if (endPos < 0) {
561
+ await this.writeToWasteStream(rest);
562
+ return;
563
+ }
564
+ if (endPos > 0) {
565
+ await this.writeToWasteStream(rest.slice(0, endPos));
566
+ }
567
+ this.inTaggedContent = false;
568
+ rest = rest.slice(endPos + this.endTag.length);
569
+ continue;
563
570
  }
564
- await this.writeToWasteStream(line.slice(startPos + this.startTag.length, endPos));
565
- if (endPos + this.endTag.length < line.length) {
566
- await this.pass(line.slice(endPos + this.endTag.length));
571
+ const startPos = rest.indexOf(this.startTag);
572
+ // An end tag without a preceding start tag closes content whose start was not seen
573
+ if (endPos >= 0 && (startPos < 0 || endPos < startPos)) {
574
+ if (endPos > 0) {
575
+ await this.writeToWasteStream(rest.slice(0, endPos));
576
+ }
577
+ rest = rest.slice(endPos + this.endTag.length);
578
+ continue;
579
+ }
580
+ if (startPos < 0) {
581
+ await this.pass(rest);
582
+ return;
567
583
  }
568
- }
569
- else if (startPos >= 0) {
570
- // Start tag found
571
584
  if (startPos > 0) {
572
- await this.pass(line.slice(0, startPos));
585
+ await this.pass(rest.slice(0, startPos));
573
586
  }
574
- await this.writeToWasteStream(line.slice(startPos + this.startTag.length));
575
587
  this.inTaggedContent = true;
576
- }
577
- else if (endPos >= 0) {
578
- // End tag found
579
- await this.writeToWasteStream(line.slice(0, endPos));
580
- if (endPos + this.endTag.length < line.length) {
581
- await this.pass(line.slice(endPos + this.endTag.length));
582
- }
583
- this.inTaggedContent = false;
584
- }
585
- else if (this.inTaggedContent) {
586
- // Currently in tagged content
587
- await this.writeToWasteStream(line);
588
- }
589
- else {
590
- // Not in tagged content
591
- await this.pass(line);
592
- }
588
+ rest = rest.slice(startPos + this.startTag.length);
589
+ } while (rest.length > 0);
593
590
  }
594
591
  async writeToWasteStream(line, encoding) {
595
592
  var _a;
@@ -4,7 +4,7 @@ var xvfb = require('./xvfb-CbW2_YXR.js');
4
4
  var Debug = require('debug');
5
5
  var commander = require('commander');
6
6
  var path = require('path');
7
- var cli = require('./cli-BUzHfIQ2.js');
7
+ var cli = require('./cli-AgTnS5LO.js');
8
8
  var CRI = require('chrome-remote-interface');
9
9
  var chalk = require('chalk');
10
10
  var crypto = require('crypto');
@@ -33,7 +33,7 @@ require('untildify');
33
33
  require('cli-table3');
34
34
  require('dayjs');
35
35
  require('dayjs/plugin/relativeTime');
36
- require('./spawn-BNsy7yWl.js');
36
+ require('./spawn-DElwyZHC.js');
37
37
  require('child_process');
38
38
  require('listr2');
39
39
  require('readline');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cypress",
3
- "version": "16.1.1",
3
+ "version": "16.2.0",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "postinstall": "node dist/index.js --exec install",
@@ -132,8 +132,8 @@
132
132
  },
133
133
  "buildInfo": {
134
134
  "commitBranch": "develop",
135
- "commitSha": "727c47ba3b3b44f025a7b5c2b050bee4e7313e26",
136
- "commitDate": "2026-09-28T20:25:50.000Z",
135
+ "commitSha": "db52e1e7720c445afdffac740185bcf2b08a9b8c",
136
+ "commitDate": "2026-10-13T23:53:50.000Z",
137
137
  "stable": true
138
138
  },
139
139
  "description": "Cypress is a next generation front end testing tool built for the modern web",
@@ -0,0 +1,343 @@
1
+ // Disable automatic exports.
2
+ export {};
3
+
4
+ interface MapLike<Key, Value> {
5
+ entries: () => Array<[Key, Value]>;
6
+ get: (key: Key) => Value | undefined;
7
+ has: (key: Key) => boolean;
8
+ keys: () => Key[];
9
+ values: () => Value[];
10
+ }
11
+
12
+ // index.js
13
+ export type ARIARoleDefinitionKey = ARIAAbstractRole | ARIARole | ARIADPubRole;
14
+
15
+ export const aria: MapLike<ARIAProperty, ARIAPropertyDefinition>;
16
+ export interface DOMDefinition {
17
+ reserved?: boolean | undefined;
18
+ interactive?: boolean | undefined;
19
+ }
20
+ export const dom: MapLike<string, DOMDefinition>;
21
+ export const elementRoles: MapLike<ARIARoleRelationConcept, Set<ARIARoleDefinitionKey>>;
22
+ export const roles: MapLike<ARIARoleDefinitionKey, ARIARoleDefinition>;
23
+ export const roleElements: MapLike<ARIARoleDefinitionKey, Set<ARIARoleRelationConcept>>;
24
+
25
+ // types
26
+ export type ARIAAbstractRole =
27
+ | "command"
28
+ | "composite"
29
+ | "input"
30
+ | "landmark"
31
+ | "range"
32
+ | "roletype"
33
+ | "section"
34
+ | "sectionhead"
35
+ | "select"
36
+ | "structure"
37
+ | "widget"
38
+ | "window";
39
+
40
+ export type ARIAWidgetRole =
41
+ | "button"
42
+ | "checkbox"
43
+ | "gridcell"
44
+ | "link"
45
+ | "menuitem"
46
+ | "menuitemcheckbox"
47
+ | "menuitemradio"
48
+ | "option"
49
+ | "progressbar"
50
+ | "radio"
51
+ | "scrollbar"
52
+ | "searchbox"
53
+ | "slider"
54
+ | "spinbutton"
55
+ | "switch"
56
+ | "tab"
57
+ | "tabpanel"
58
+ | "textbox"
59
+ | "treeitem";
60
+
61
+ export type ARIACompositeWidgetRole =
62
+ | "combobox"
63
+ | "grid"
64
+ | "listbox"
65
+ | "menu"
66
+ | "menubar"
67
+ | "radiogroup"
68
+ | "tablist"
69
+ | "tree"
70
+ | "treegrid";
71
+
72
+ export type ARIADocumentStructureRole =
73
+ | "application"
74
+ | "article"
75
+ | "blockquote"
76
+ | "caption"
77
+ | "cell"
78
+ | "columnheader"
79
+ | "definition"
80
+ | "deletion"
81
+ | "directory"
82
+ | "document"
83
+ | "emphasis"
84
+ | "feed"
85
+ | "figure"
86
+ | "generic"
87
+ | "group"
88
+ | "heading"
89
+ | "img"
90
+ | "insertion"
91
+ | "list"
92
+ | "listitem"
93
+ | "math"
94
+ | "meter"
95
+ | "none"
96
+ | "note"
97
+ | "paragraph"
98
+ | "presentation"
99
+ | "row"
100
+ | "rowgroup"
101
+ | "rowheader"
102
+ | "separator"
103
+ | "strong"
104
+ | "subscript"
105
+ | "superscript"
106
+ | "table"
107
+ | "term"
108
+ | "time"
109
+ | "toolbar"
110
+ | "tooltip";
111
+
112
+ export type ARIALandmarkRole =
113
+ | "banner"
114
+ | "complementary"
115
+ | "contentinfo"
116
+ | "form"
117
+ | "main"
118
+ | "navigation"
119
+ | "region"
120
+ | "search";
121
+
122
+ export type ARIALiveRegionRole = "alert" | "log" | "marquee" | "status" | "timer";
123
+
124
+ export type ARIAWindowRole = "alertdialog" | "dialog";
125
+
126
+ export type ARIAUncategorizedRole = "code";
127
+
128
+ export type ARIADPubRole =
129
+ | "doc-abstract"
130
+ | "doc-acknowledgments"
131
+ | "doc-afterword"
132
+ | "doc-appendix"
133
+ | "doc-backlink"
134
+ | "doc-biblioentry"
135
+ | "doc-bibliography"
136
+ | "doc-biblioref"
137
+ | "doc-chapter"
138
+ | "doc-colophon"
139
+ | "doc-conclusion"
140
+ | "doc-cover"
141
+ | "doc-credit"
142
+ | "doc-credits"
143
+ | "doc-dedication"
144
+ | "doc-endnote"
145
+ | "doc-endnotes"
146
+ | "doc-epigraph"
147
+ | "doc-epilogue"
148
+ | "doc-errata"
149
+ | "doc-example"
150
+ | "doc-footnote"
151
+ | "doc-foreword"
152
+ | "doc-glossary"
153
+ | "doc-glossref"
154
+ | "doc-index"
155
+ | "doc-introduction"
156
+ | "doc-noteref"
157
+ | "doc-notice"
158
+ | "doc-pagebreak"
159
+ | "doc-pagelist"
160
+ | "doc-part"
161
+ | "doc-preface"
162
+ | "doc-prologue"
163
+ | "doc-pullquote"
164
+ | "doc-qna"
165
+ | "doc-subtitle"
166
+ | "doc-tip"
167
+ | "doc-toc";
168
+
169
+ export type ARIARole =
170
+ | ARIAWidgetRole
171
+ | ARIACompositeWidgetRole
172
+ | ARIADocumentStructureRole
173
+ | ARIALandmarkRole
174
+ | ARIALiveRegionRole
175
+ | ARIAWindowRole
176
+ | ARIAUncategorizedRole;
177
+
178
+ export interface ARIARoleDefinition {
179
+ /* Abstract roles may not be used in HTML. */
180
+ abstract: boolean;
181
+ /* The concepts in related domains that inform behavior mappings. */
182
+ baseConcepts: ARIARoleRelation[];
183
+ /* Child presentational roles strip child nodes of roles and flatten the
184
+ * content to text. */
185
+ childrenPresentational: boolean;
186
+ /* aria-* properties and states disallowed on this role. */
187
+ prohibitedProps: ARIAPropertyMap;
188
+ /* aria-* properties and states allowed on this role. */
189
+ props: ARIAPropertyMap;
190
+ /* The concepts in related domains that inform behavior mappings. */
191
+ relatedConcepts: ARIARoleRelation[];
192
+ /* aria-* properties and states required on this role. */
193
+ requiredProps: ARIAPropertyMap;
194
+ /* An array or super class "stacks." Each stack contains a LIFO list of
195
+ * strings correspond to a super class in the inheritance chain of this
196
+ * role. Roles may have more than one inheritance chain, which is why
197
+ * this property is an array of arrays and not a single array. */
198
+ superClass: Array<Array<ARIAAbstractRole | ARIARole | ARIADPubRole>>;
199
+ }
200
+
201
+ export type ARIAState =
202
+ | "aria-busy"
203
+ | "aria-checked"
204
+ | "aria-disabled"
205
+ | "aria-expanded"
206
+ | "aria-grabbed"
207
+ | "aria-hidden"
208
+ | "aria-invalid"
209
+ | "aria-pressed"
210
+ | "aria-selected";
211
+
212
+ export type ARIAProperty =
213
+ | "aria-activedescendant"
214
+ | "aria-atomic"
215
+ | "aria-autocomplete"
216
+ | "aria-colcount"
217
+ | "aria-colindex"
218
+ | "aria-colspan"
219
+ | "aria-controls"
220
+ | "aria-current"
221
+ | "aria-describedby"
222
+ | "aria-details"
223
+ | "aria-dropeffect"
224
+ | "aria-errormessage"
225
+ | "aria-flowto"
226
+ | "aria-haspopup"
227
+ | "aria-keyshortcuts"
228
+ | "aria-label"
229
+ | "aria-labelledby"
230
+ | "aria-level"
231
+ | "aria-live"
232
+ | "aria-modal"
233
+ | "aria-multiline"
234
+ | "aria-multiselectable"
235
+ | "aria-orientation"
236
+ | "aria-owns"
237
+ | "aria-placeholder"
238
+ | "aria-posinset"
239
+ | "aria-readonly"
240
+ | "aria-relevant"
241
+ | "aria-required"
242
+ | "aria-roledescription"
243
+ | "aria-rowcount"
244
+ | "aria-rowindex"
245
+ | "aria-rowspan"
246
+ | "aria-setsize"
247
+ | "aria-sort"
248
+ | "aria-valuemax"
249
+ | "aria-valuemin"
250
+ | "aria-valuenow"
251
+ | "aria-valuetext"
252
+ | ARIAState;
253
+
254
+ export interface ARIAPropertyMap {
255
+ "aria-busy"?: unknown | undefined;
256
+ "aria-checked"?: unknown | undefined;
257
+ "aria-disabled"?: unknown | undefined;
258
+ "aria-expanded"?: unknown | undefined;
259
+ "aria-grabbed"?: unknown | undefined;
260
+ "aria-hidden"?: unknown | undefined;
261
+ "aria-invalid"?: unknown | undefined;
262
+ "aria-pressed"?: unknown | undefined;
263
+ "aria-selected"?: unknown | undefined;
264
+ "aria-activedescendant"?: unknown | undefined;
265
+ "aria-atomic"?: unknown | undefined;
266
+ "aria-autocomplete"?: unknown | undefined;
267
+ "aria-colcount"?: unknown | undefined;
268
+ "aria-colindex"?: unknown | undefined;
269
+ "aria-colspan"?: unknown | undefined;
270
+ "aria-controls"?: unknown | undefined;
271
+ "aria-current"?: ARIAPropertyCurrent | null | undefined;
272
+ "aria-describedat"?: unknown | undefined;
273
+ "aria-describedby"?: unknown | undefined;
274
+ "aria-details"?: unknown | undefined;
275
+ "aria-dropeffect"?: unknown | undefined;
276
+ "aria-errormessage"?: unknown | undefined;
277
+ "aria-flowto"?: unknown | undefined;
278
+ "aria-haspopup"?: unknown | undefined;
279
+ "aria-keyshortcuts"?: unknown | undefined;
280
+ "aria-label"?: unknown | undefined;
281
+ "aria-labelledby"?: unknown | undefined;
282
+ "aria-level"?: unknown | undefined;
283
+ "aria-live"?: unknown | undefined;
284
+ "aria-modal"?: unknown | undefined;
285
+ "aria-multiline"?: unknown | undefined;
286
+ "aria-multiselectable"?: unknown | undefined;
287
+ "aria-orientation"?: unknown | undefined;
288
+ "aria-owns"?: unknown | undefined;
289
+ "aria-placeholder"?: unknown | undefined;
290
+ "aria-posinset"?: unknown | undefined;
291
+ "aria-readonly"?: unknown | undefined;
292
+ "aria-relevant"?: unknown | undefined;
293
+ "aria-required"?: unknown | undefined;
294
+ "aria-roledescription"?: unknown | undefined;
295
+ "aria-rowcount"?: unknown | undefined;
296
+ "aria-rowindex"?: unknown | undefined;
297
+ "aria-rowspan"?: unknown | undefined;
298
+ "aria-setsize"?: unknown | undefined;
299
+ "aria-sort"?: unknown | undefined;
300
+ "aria-valuemax"?: unknown | undefined;
301
+ "aria-valuemin"?: unknown | undefined;
302
+ "aria-valuenow"?: unknown | undefined;
303
+ "aria-valuetext"?: unknown | undefined;
304
+ }
305
+
306
+ export interface ARIAPropertyDefinition {
307
+ type: "string" | "id" | "idlist" | "integer" | "number" | "boolean" | "token" | "tokenlist" | "tristate";
308
+ values?: Array<string | boolean> | undefined;
309
+ allowundefined?: boolean | undefined;
310
+ }
311
+
312
+ export type ARIAPropertyCurrent = "page" | "step" | "location" | "date" | "time" | "true" | "false" | true | false;
313
+
314
+ export interface ARIARoleRelation {
315
+ module?: string | undefined;
316
+ concept?: ARIARoleRelationConcept | undefined;
317
+ }
318
+
319
+ /* The concept in a related domain that informs behavior mappings.
320
+ * Related domains include: HTML, "Device Independence Delivery Unit", XForms,
321
+ * and ARIA to name a few. */
322
+ export interface ARIARoleRelationConcept {
323
+ name: string;
324
+ attributes?: ARIARoleRelationConceptAttribute[] | undefined;
325
+ // These constraints are drawn from the mapping between ARIA and HTML:
326
+ // https://www.w3.org/TR/html-aria
327
+ constraints?:
328
+ | Array<
329
+ | "direct descendant of document"
330
+ | "direct descendant of ol, ul or menu"
331
+ | "direct descendant of details element with the open attribute defined"
332
+ | "descendant of table"
333
+ >
334
+ | undefined;
335
+ }
336
+
337
+ export interface ARIARoleRelationConceptAttribute {
338
+ name: string;
339
+ value?: string | number | undefined;
340
+ // These constraints are drawn from the mapping between ARIA and HTML:
341
+ // https://www.w3.org/TR/html-aria
342
+ constraints?: Array<"unset" | ">1"> | undefined;
343
+ }
@@ -79,6 +79,14 @@ declare namespace Cypress {
79
79
  (task: 'net', eventName: string, frame: any): Promise<void>
80
80
  }
81
81
 
82
+ /**
83
+ * Trigger action
84
+ * @private
85
+ */
86
+ interface ActionTrigger {
87
+ <T = (any[] | void)>(action: string, ...args: any[]): T
88
+ }
89
+
82
90
  type BrowserName = 'electron' | 'chrome' | 'chromium' | 'firefox' | 'edge' | string
83
91
 
84
92
  type BrowserChannel = 'stable' | 'canary' | 'beta' | 'dev' | 'nightly' | string
@@ -296,6 +304,25 @@ declare namespace Cypress {
296
304
  */
297
305
  type AUTWindow = Window & typeof globalThis & ApplicationWindow
298
306
 
307
+ /**
308
+ * The object yielded by `cy.location()`, describing the current URL of the Application Under Test (AUT).
309
+ * It is a plain object, not the AUT's `window.location`, so it has no methods such as `assign()` or `reload()`.
310
+ *
311
+ * @see https://on.cypress.io/location
312
+ */
313
+ interface AUTLocation {
314
+ hash: string
315
+ host: string
316
+ hostname: string
317
+ href: string
318
+ origin: string
319
+ pathname: string
320
+ port: string
321
+ protocol: string
322
+ search: string
323
+ searchParams: URLSearchParams
324
+ }
325
+
299
326
  /**
300
327
  * The interface for user-defined properties in Window object under test.
301
328
  */
@@ -757,7 +784,7 @@ declare namespace Cypress {
757
784
  * Trigger action
758
785
  * @private
759
786
  */
760
- action: <T = (any[] | void)>(action: string, ...args: any[]) => T
787
+ action: ActionTrigger
761
788
 
762
789
  /**
763
790
  * Load files
@@ -1359,7 +1386,7 @@ declare namespace Cypress {
1359
1386
  * @param {Number} index A number indicating the index to find the element at within an array of elements. A negative number counts index from the end of the list.
1360
1387
  * @example
1361
1388
  * cy.get('tbody>tr').eq(0) // Yield first 'tr' in 'tbody'
1362
- * cy.get('ul>li').eq('4') // Yield fifth 'li' in 'ul'
1389
+ * cy.get('ul>li').eq(4) // Yield fifth 'li' in 'ul'
1363
1390
  * cy.get('li').eq(-2) // Yields second from last 'li' element
1364
1391
  */
1365
1392
  eq<E extends Node = HTMLElement>(index: number, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<E>>
@@ -1481,6 +1508,30 @@ declare namespace Cypress {
1481
1508
  */
1482
1509
  get<E extends Node = HTMLElement>(selector: string, options?: Partial<Loggable & Timeoutable & Withinable & Shadow>): Chainable<JQuery<E>>
1483
1510
 
1511
+ /**
1512
+ * Get every element with the given ARIA role, optionally narrowed to
1513
+ * those whose accessible name matches `name`. Elements hidden from the
1514
+ * accessibility tree are skipped unless `hidden` is `true`.
1515
+ *
1516
+ * For a role that HTML has an element for, only that element matches by
1517
+ * default: `'button'` finds a `<button>`, not a `<div role="button">`.
1518
+ * Pass `native: false` to also match elements that get the role from a
1519
+ * `role` attribute.
1520
+ *
1521
+ * Chained off an element, it searches that element's descendants.
1522
+ *
1523
+ * @see https://on.cypress.io/getbyrole
1524
+ * @example
1525
+ * // A native <button>, never a <div role="button">
1526
+ * cy.getByRole('button', { name: 'Save' }).click()
1527
+ * // Widgets that HTML has no element for
1528
+ * cy.getByRole('tab', { name: 'Billing' }).click()
1529
+ * cy.get('nav').getByRole('menuitem', { name: /delete/i })
1530
+ * // A dialog rendered as <div role="dialog"> by a component library
1531
+ * cy.getByRole('dialog', { name: 'Settings', native: false })
1532
+ */
1533
+ getByRole<E extends Node = HTMLElement>(role: import('./aria-query').ARIARole | (string & {}), options?: Partial<GetByRoleOptions>): Chainable<JQuery<E>>
1534
+
1484
1535
  /**
1485
1536
  * Get a browser cookie by its name.
1486
1537
  *
@@ -1576,15 +1627,15 @@ declare namespace Cypress {
1576
1627
  last<E extends Node = HTMLElement>(options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<E>>
1577
1628
 
1578
1629
  /**
1579
- * Get the global `window.location` object of the page that is currently active.
1630
+ * Yield a plain object describing the current URL of the application under test.
1580
1631
  *
1581
1632
  * @see https://on.cypress.io/location
1582
1633
  * @example
1583
1634
  * cy.location() // Get location object
1584
1635
  */
1585
- location(options?: Partial<Loggable & Timeoutable>): Chainable<Location>
1636
+ location(options?: Partial<Loggable & Timeoutable>): Chainable<AUTLocation>
1586
1637
  /**
1587
- * Get a part of the global `window.location` object of the page that is currently active.
1638
+ * Yield one property of a plain object describing the current URL of the application under test.
1588
1639
  *
1589
1640
  * @see https://on.cypress.io/location
1590
1641
  * @example
@@ -1593,7 +1644,7 @@ declare namespace Cypress {
1593
1644
  * // Assert on the href of the location
1594
1645
  * cy.location('href').should('contain', '/tag/tutorials')
1595
1646
  */
1596
- location<K extends keyof Location>(key: K, options?: Partial<Loggable & Timeoutable>): Chainable<Location[K]>
1647
+ location<K extends keyof AUTLocation>(key: K, options?: Partial<Loggable & Timeoutable>): Chainable<AUTLocation[K]>
1597
1648
 
1598
1649
  /**
1599
1650
  * Print a message to the Cypress Command Log.
@@ -1621,7 +1672,7 @@ declare namespace Cypress {
1621
1672
  *
1622
1673
  * @see https://on.cypress.io/next
1623
1674
  * @example
1624
- * cy.get('nav a:first').next('.menu-item)
1675
+ * cy.get('nav a:first').next('.menu-item')
1625
1676
  */
1626
1677
  next<E extends Node = HTMLElement>(selector: string, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<E>>
1627
1678
 
@@ -2793,6 +2844,41 @@ declare namespace Cypress {
2793
2844
  timeout: number
2794
2845
  }
2795
2846
 
2847
+ interface GetByRoleOptions extends Loggable, Timeoutable, Shadow {
2848
+ /**
2849
+ * Only match elements whose accessible name matches: the text a screen
2850
+ * reader announces for the element, taken from its label, its content,
2851
+ * `aria-label` or `aria-labelledby`. A string must match the whole name, a
2852
+ * regular expression is tested against it, and a function is called with
2853
+ * the name and the element.
2854
+ */
2855
+ name: string | number | RegExp | ((name: string, element: Element | null) => boolean)
2856
+ /**
2857
+ * Include elements that are hidden from the accessibility tree, such as
2858
+ * those with `aria-hidden="true"`, `display: none` or `visibility: hidden`.
2859
+ *
2860
+ * @default false
2861
+ */
2862
+ hidden: boolean
2863
+ /**
2864
+ * Only match elements whose tag gives them the role, like `<button>`,
2865
+ * skipping elements that only have it through a `role` attribute, like
2866
+ * `<div role="button">`. Set it to `false` to match both.
2867
+ *
2868
+ * Some widely used patterns get their role from a `role` attribute even
2869
+ * though HTML has an element for it, so they need `native: false`: an
2870
+ * `<input role="combobox">` (the native combobox is a `<select>` or an
2871
+ * `<input list>`) and an `<svg role="img">` (the native one is an `<img>`).
2872
+ *
2873
+ * Roles that HTML has no element for, such as `tab` or `menuitem`, can
2874
+ * only come from a `role` attribute, so they are always matched that way.
2875
+ * Passing `native: true` with one of those roles throws.
2876
+ *
2877
+ * @default true for roles that HTML has an element for
2878
+ */
2879
+ native: boolean
2880
+ }
2881
+
2796
2882
  /**
2797
2883
  * Options that check case sensitivity
2798
2884
  */