cypress 16.1.1 → 16.2.1
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/angular/angular/dist/index.js +6 -7
- package/angular/angular/package.json +7 -22
- package/angular/dist/index.js +6 -7
- package/angular/package.json +7 -22
- package/dist/bin/cypress +2 -2
- package/dist/{cli-BUzHfIQ2.js → cli-DoJnc1F1.js} +6 -5
- package/dist/cli.js +2 -2
- package/dist/{cypress-D0g_F_Y2.js → cypress-BTgp4zGi.js} +1 -1
- package/dist/cypress.js +3 -3
- package/dist/exec/spawn.js +1 -1
- package/dist/index.js +3 -3
- package/dist/{spawn-BNsy7yWl.js → spawn-zPuxj7Kz.js} +34 -37
- package/dist/{tap-E19yanov.js → tap-D2mHgoNE.js} +2 -2
- package/mount-utils/dist/index.js +0 -1
- package/mount-utils/mount-utils/dist/index.js +0 -1
- package/mount-utils/mount-utils/package.json +14 -14
- package/mount-utils/package.json +14 -14
- package/package.json +4 -4
- package/react/dist/cypress-react.cjs.js +5 -6
- package/react/dist/cypress-react.esm-bundler.js +5 -6
- package/react/package.json +26 -46
- package/react/react/dist/cypress-react.cjs.js +5 -6
- package/react/react/dist/cypress-react.esm-bundler.js +5 -6
- package/react/react/package.json +26 -46
- package/svelte/dist/cypress-svelte.cjs.js +0 -1
- package/svelte/dist/cypress-svelte.esm-bundler.js +0 -1
- package/svelte/package.json +24 -22
- package/svelte/svelte/dist/cypress-svelte.cjs.js +0 -1
- package/svelte/svelte/dist/cypress-svelte.esm-bundler.js +0 -1
- package/svelte/svelte/package.json +24 -22
- package/types/aria-query/index.d.ts +343 -0
- package/types/cy-chai.d.ts +99 -2
- package/types/cypress.d.ts +301 -49
- package/vue/dist/cypress-vue.cjs.js +1 -2
- package/vue/dist/cypress-vue.esm-bundler.js +1 -2
- package/vue/package.json +35 -42
- package/vue/vue/dist/cypress-vue.cjs.js +1 -2
- package/vue/vue/dist/cypress-vue.esm-bundler.js +1 -2
- package/vue/vue/package.json +35 -42
|
@@ -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
|
+
}
|
package/types/cy-chai.d.ts
CHANGED
|
@@ -3,9 +3,36 @@
|
|
|
3
3
|
/// <reference path="./chai/index.d.ts" />
|
|
4
4
|
declare namespace Chai {
|
|
5
5
|
interface Include {
|
|
6
|
+
/**
|
|
7
|
+
* Assert that the HTML of the first element of the selection contains the given HTML, using `.html()`.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* expect($('#result')).to.contain.html('<em>John Doe</em>')
|
|
11
|
+
* @see http://chaijs.com/plugins/chai-jquery/#htmlhtml
|
|
12
|
+
*/
|
|
6
13
|
html(html: string): Assertion
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Assert that the text of the selection contains the given text, using `.text()`.
|
|
17
|
+
* A number is compared against the text as a string.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* expect($('#result')).to.contain.text('John')
|
|
21
|
+
* expect($('#count')).to.contain.text(12)
|
|
22
|
+
* @see http://chaijs.com/plugins/chai-jquery/#texttext
|
|
23
|
+
*/
|
|
24
|
+
text(text: string | number): Assertion
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Assert that the value of the first element of the selection contains the given value, using `.val()`.
|
|
28
|
+
* A number is compared against the value as a string. Elements whose value is a number,
|
|
29
|
+
* such as `<progress>`, `<meter>`, and `<li>`, never partially match.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* expect($('input')).to.contain.value('red')
|
|
33
|
+
* @see http://chaijs.com/plugins/chai-jquery/#valuevalue
|
|
34
|
+
*/
|
|
35
|
+
value(value: string | number): Assertion
|
|
9
36
|
|
|
10
37
|
/**
|
|
11
38
|
* Asserts that the target contains one of the values in the given list.
|
|
@@ -69,5 +96,75 @@ declare namespace Chai {
|
|
|
69
96
|
* @see http://chaijs.com/api/bdd/#method_most
|
|
70
97
|
*/
|
|
71
98
|
lessThanOrEqual: NumberComparer
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Assert that the first element of the selection has the given attribute, using `.attr()`.
|
|
102
|
+
* Optionally, assert a particular value as well. A number is compared against the attribute's string value.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* expect($('#result')).to.have.attr('role', 'menu')
|
|
106
|
+
* expect($('#result')).to.have.attr('tabindex', 0)
|
|
107
|
+
* @see http://chaijs.com/plugins/chai-jquery/#attrname-value
|
|
108
|
+
*/
|
|
109
|
+
attr(name: string, value?: string | number): Assertion
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Assert that the first element of the selection has the given data value, using `.data()`.
|
|
113
|
+
* jQuery parses numeric, boolean, and `null` `data-*` attributes into those types, and the value is compared with `===`,
|
|
114
|
+
* so an object or array parsed from JSON never matches.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* expect($('#result')).to.have.data('foo', 'bar')
|
|
118
|
+
* expect($('#result')).to.have.data('count', 3)
|
|
119
|
+
* @see http://chaijs.com/plugins/chai-jquery/#dataname-value
|
|
120
|
+
*/
|
|
121
|
+
data(name: string, value?: string | number | boolean | null): Assertion
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Assert that the first element of the selection has the given id, using `.prop('id')`.
|
|
125
|
+
* A number is compared against the id as a string.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* expect($('#result')).to.have.id('result')
|
|
129
|
+
* expect($('#456')).to.have.id(456)
|
|
130
|
+
* @see http://chaijs.com/plugins/chai-jquery/#idid
|
|
131
|
+
*/
|
|
132
|
+
id(id: string | number): Assertion
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Assert that the text of the selection equals the given text, using `.text()`.
|
|
136
|
+
* A number is compared against the text as a string.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* expect($('#result')).to.have.text('pending')
|
|
140
|
+
* expect($('#count')).to.have.text(123)
|
|
141
|
+
* @see http://chaijs.com/plugins/chai-jquery/#texttext
|
|
142
|
+
*/
|
|
143
|
+
text(text: string | number): Assertion
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Assert that the first element of the selection has the given value, using `.val()`.
|
|
147
|
+
* A number is compared against the value as a string, except for elements whose value is a number: `<progress>`, `<meter>`, and `<li>`.
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* expect($('input')).to.have.value('red')
|
|
151
|
+
* expect($('progress')).to.have.value(0.72)
|
|
152
|
+
* @see http://chaijs.com/plugins/chai-jquery/#valuevalue
|
|
153
|
+
*/
|
|
154
|
+
value(value: string | number): Assertion
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
interface Match {
|
|
158
|
+
/**
|
|
159
|
+
* Assert that the selection matches the given element, elements, jQuery object, or predicate, using `.is()`.
|
|
160
|
+
* The subject must be a DOM element or jQuery object; any other subject accepts only a regular expression,
|
|
161
|
+
* and a regular expression never matches a DOM element or jQuery object.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* expect($('#result')).to.match($('.menu'))
|
|
165
|
+
* expect($('#result')).to.match((index, element) => element.id === 'result')
|
|
166
|
+
* @see http://chaijs.com/plugins/chai-jquery/#matchselector
|
|
167
|
+
*/
|
|
168
|
+
(selector: Cypress.JQueryMatchable): Assertion
|
|
72
169
|
}
|
|
73
170
|
}
|