@fkui/vue-labs 6.43.1 → 6.45.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/cjs/cypress.cjs.js +0 -244
- package/dist/cjs/cypress.cjs.js.map +3 -3
- package/dist/cjs/index.cjs.js +2276 -5109
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/esm/cypress.esm.js +0 -244
- package/dist/esm/cypress.esm.js.map +3 -3
- package/dist/esm/index.esm.js +2280 -5106
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/types/cypress.d.ts +0 -160
- package/dist/types/index.d.ts +11 -336
- package/dist/types/tsdoc-metadata.json +1 -1
- package/htmlvalidate/elements/elements.js +1 -102
- package/package.json +8 -8
package/dist/cjs/cypress.cjs.js
CHANGED
|
@@ -20,7 +20,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/cypress/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
FTablePageObject: () => FTablePageObject,
|
|
24
23
|
XDummyPageObject: () => XDummyPageObject
|
|
25
24
|
});
|
|
26
25
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -43,247 +42,4 @@ var XDummyPageObject = class {
|
|
|
43
42
|
return cy.get(`${this.selector} h1`);
|
|
44
43
|
}
|
|
45
44
|
};
|
|
46
|
-
|
|
47
|
-
// src/cypress/FTable.pageobject.ts
|
|
48
|
-
var FTablePageObject = class {
|
|
49
|
-
selector;
|
|
50
|
-
selectHeader = ".table-ng__column--selectable";
|
|
51
|
-
columnTitle = ".table-ng__column__title";
|
|
52
|
-
columnDescription = ".table-ng__column__description";
|
|
53
|
-
expandCell = ".table-ng__cell--expand";
|
|
54
|
-
selectCell = ".table-ng__cell--selectable";
|
|
55
|
-
/**
|
|
56
|
-
* @param selector - root element selector for `FTable`, usually `.table-ng`.
|
|
57
|
-
*/
|
|
58
|
-
constructor(selector = ".table-ng") {
|
|
59
|
-
this.selector = selector;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Get root element.
|
|
63
|
-
*
|
|
64
|
-
* @public
|
|
65
|
-
*/
|
|
66
|
-
el() {
|
|
67
|
-
return cy.get(this.selector);
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Get table header cell (`<th>` in `<thead>`).
|
|
71
|
-
*
|
|
72
|
-
* The headers for expandable buttons and selectable checkboxes are included.
|
|
73
|
-
*
|
|
74
|
-
* @public
|
|
75
|
-
* @param col - Column number of header (1-indexed).
|
|
76
|
-
* @returns The header cell element (`<th>`).
|
|
77
|
-
*/
|
|
78
|
-
header(col) {
|
|
79
|
-
const colIndex = String(col - 1);
|
|
80
|
-
return cy.get([this.thead, `th:nth(${colIndex})`].join(" "));
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Get column title from table header.
|
|
84
|
-
*
|
|
85
|
-
* The headers for expandable buttons and selectable checkboxes are included.
|
|
86
|
-
*
|
|
87
|
-
* @public
|
|
88
|
-
* @param col - Column number of header (1-indexed).
|
|
89
|
-
* @returns Column description in header.
|
|
90
|
-
*/
|
|
91
|
-
headerTitle(col) {
|
|
92
|
-
const colIndex = String(col - 1);
|
|
93
|
-
return cy.get(
|
|
94
|
-
[this.thead, `th:nth(${colIndex})`, this.columnTitle].join(" ")
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Get column description from table header.
|
|
99
|
-
*
|
|
100
|
-
* The headers for expandable buttons and selectable checkboxes are included.
|
|
101
|
-
*
|
|
102
|
-
* @public
|
|
103
|
-
* @param col - Column number of header (1-indexed).
|
|
104
|
-
* @returns Column description in header.
|
|
105
|
-
*/
|
|
106
|
-
headerDescription(col) {
|
|
107
|
-
const colIndex = String(col - 1);
|
|
108
|
-
return cy.get(
|
|
109
|
-
[this.thead, `th:nth(${colIndex})`, this.columnDescription].join(
|
|
110
|
-
" "
|
|
111
|
-
)
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Get table cell (typically `<td>` but can be `<th>` if row headers are
|
|
116
|
-
* present).
|
|
117
|
-
*
|
|
118
|
-
* Both row and column are 1-indexed, i.e. 1:1 selects the first cell in the
|
|
119
|
-
* first row.
|
|
120
|
-
*
|
|
121
|
-
* The columns for expandable buttons and selectable checkboxes are included in column count.
|
|
122
|
-
*
|
|
123
|
-
* For expandable rows the row count depend on whenever a row is expanded or
|
|
124
|
-
* not. If the first row is collapsed the second row refers to the next
|
|
125
|
-
* parent row while if the first row is expanded the second row refers to
|
|
126
|
-
* the first expanded row under the first row.
|
|
127
|
-
*
|
|
128
|
-
* @public
|
|
129
|
-
* @param descriptor - Row and column number of cell (1-indexed).
|
|
130
|
-
* @returns The cell element.
|
|
131
|
-
*/
|
|
132
|
-
cell(descriptor) {
|
|
133
|
-
const row = this.bodyRow(descriptor.row);
|
|
134
|
-
const nth = `nth-child(${descriptor.col})`;
|
|
135
|
-
return cy.get([row, `> td:${nth},`, row, `> th:${nth}`].join(" "));
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Get expand button of given row.
|
|
139
|
-
*
|
|
140
|
-
* Only applicable if using an expandable table.
|
|
141
|
-
*
|
|
142
|
-
* @public
|
|
143
|
-
* @param row - Row number for the expand button (1-indexed).
|
|
144
|
-
* @returns Expand button of given row.
|
|
145
|
-
*/
|
|
146
|
-
expandButton(row) {
|
|
147
|
-
return cy.get([this.bodyRow(row), this.expandCell, `button`].join(" "));
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Get checkbox in the table header for selectable column.
|
|
151
|
-
*
|
|
152
|
-
* Only applicable if using a multiselect table.
|
|
153
|
-
*
|
|
154
|
-
* @public
|
|
155
|
-
* @returns Checkbox in selectable column header.
|
|
156
|
-
*/
|
|
157
|
-
selectHeaderInput() {
|
|
158
|
-
return cy.get([this.thead, this.selectHeader, `input`].join(" "));
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Get select input of given row.
|
|
162
|
-
*
|
|
163
|
-
* Only applicable if using a selectable table.
|
|
164
|
-
* Input is a checkbox if using a multiselect table and radio if single.
|
|
165
|
-
*
|
|
166
|
-
* @param row - Row number for the select input (1-indexed).
|
|
167
|
-
* @returns Select input of given row.
|
|
168
|
-
*/
|
|
169
|
-
selectInput(row) {
|
|
170
|
-
return cy.get([this.bodyRow(row), this.selectCell, `input`].join(" "));
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Get the currently open context menu.
|
|
174
|
-
*
|
|
175
|
-
* The context menu must have been opened for this to return an element.
|
|
176
|
-
*
|
|
177
|
-
* @internal
|
|
178
|
-
* @returns The opened context menu element.
|
|
179
|
-
*/
|
|
180
|
-
contextmenu() {
|
|
181
|
-
return cy.get(`ul.contextmenu__list`);
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Get the menu items of the currently open context menu.
|
|
185
|
-
*
|
|
186
|
-
* The context menu must have been opened for this to return an element.
|
|
187
|
-
*
|
|
188
|
-
* @public
|
|
189
|
-
* @returns The context menu items.
|
|
190
|
-
*/
|
|
191
|
-
contextmenuItems() {
|
|
192
|
-
return cy.get(`ul.contextmenu__list .contextmenu__list__item`);
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Get the dropdown from a select cell.
|
|
196
|
-
*
|
|
197
|
-
* Only applicable if using a select cell.
|
|
198
|
-
*
|
|
199
|
-
* Element is teleported and does not use given selector. Method may
|
|
200
|
-
* not work properly if there are several dropdowns open simultaneously.
|
|
201
|
-
*
|
|
202
|
-
* @internal
|
|
203
|
-
* @returns Dropdown for a select cell.
|
|
204
|
-
*/
|
|
205
|
-
selectDropdown() {
|
|
206
|
-
return cy.get(".combobox__listbox");
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Get an option in a select cell dropdown.
|
|
210
|
-
*
|
|
211
|
-
* Only applicable if using a select cell.
|
|
212
|
-
*
|
|
213
|
-
* Element is teleported and does not use given selector. Method may
|
|
214
|
-
* not work properly if there are several dropdowns open simultaneously.
|
|
215
|
-
*
|
|
216
|
-
* @public
|
|
217
|
-
* @param option - option number (1-indexed).
|
|
218
|
-
* @returns Option of given number from a select cell dropdown.
|
|
219
|
-
*/
|
|
220
|
-
selectDropdownOption(option) {
|
|
221
|
-
const index = option - 1;
|
|
222
|
-
return cy.get(
|
|
223
|
-
`.combobox__listbox li.combobox__listbox__option:nth(${index})`
|
|
224
|
-
);
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Get table caption.
|
|
228
|
-
*
|
|
229
|
-
* Only applicable if caption slot is used.
|
|
230
|
-
*
|
|
231
|
-
* @public
|
|
232
|
-
* @returns The table caption.
|
|
233
|
-
*/
|
|
234
|
-
caption() {
|
|
235
|
-
return cy.get(`${this.selector} caption`);
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Get table footer.
|
|
239
|
-
*
|
|
240
|
-
* Only applicable if footer slot is used.
|
|
241
|
-
*
|
|
242
|
-
* @public
|
|
243
|
-
* @returns The table footer.
|
|
244
|
-
*/
|
|
245
|
-
footer() {
|
|
246
|
-
return cy.get(this.tfoot);
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Get current tabbable element in the table.
|
|
250
|
-
*
|
|
251
|
-
* If table is untouched, it is the first cell in the table body (including columns for expandable and selectable).
|
|
252
|
-
* If the cell has an interactable element, it is instead the interactable that is returned and not the cell.
|
|
253
|
-
*
|
|
254
|
-
* @internal
|
|
255
|
-
* @returns The current tabbable element.
|
|
256
|
-
*/
|
|
257
|
-
tabbableElement() {
|
|
258
|
-
return cy.get(`${this.selector} [tabindex=0]`);
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Get all visible rows (`<tr>` in `<tbody>`).
|
|
262
|
-
*
|
|
263
|
-
* Includes expanded rows if table is expandable.
|
|
264
|
-
*
|
|
265
|
-
* @public
|
|
266
|
-
* @returns All visible rows in the table.
|
|
267
|
-
*/
|
|
268
|
-
rows() {
|
|
269
|
-
return cy.get(`${this.tbody} tr`);
|
|
270
|
-
}
|
|
271
|
-
/** @internal */
|
|
272
|
-
bodyRow(row) {
|
|
273
|
-
const rowIndex = String(row - 1);
|
|
274
|
-
return `${this.tbody} tr:nth(${rowIndex})`;
|
|
275
|
-
}
|
|
276
|
-
/** @internal */
|
|
277
|
-
get thead() {
|
|
278
|
-
return `${this.selector} thead`;
|
|
279
|
-
}
|
|
280
|
-
/** @internal */
|
|
281
|
-
get tbody() {
|
|
282
|
-
return `${this.selector} tbody`;
|
|
283
|
-
}
|
|
284
|
-
/** @internal */
|
|
285
|
-
get tfoot() {
|
|
286
|
-
return `${this.selector} tfoot`;
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
45
|
//# sourceMappingURL=cypress.cjs.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/cypress/index.ts", "../../src/cypress/XDummy.pageobject.ts"
|
|
4
|
-
"sourcesContent": ["export { XDummyPageObject } from \"./XDummy.pageobject\";\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA
|
|
3
|
+
"sources": ["../../src/cypress/index.ts", "../../src/cypress/XDummy.pageobject.ts"],
|
|
4
|
+
"sourcesContent": ["export { XDummyPageObject } from \"./XDummy.pageobject\";\n", "import { type BasePageObject, type DefaultCypressChainable } from \"./common\";\n\n/**\n * @public\n */\nexport class XDummyPageObject implements BasePageObject {\n public selector: string;\n public el: () => DefaultCypressChainable;\n\n /**\n * @param selector - the root of the dummy, usually `<dummy class=\"dummy\">...</dummy>`.\n */\n public constructor(selector: string) {\n this.selector = selector;\n this.el = () => cy.get(this.selector);\n }\n\n /**\n * Heading\n */\n public heading(): DefaultCypressChainable {\n return cy.get(`${this.selector} h1`);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,mBAAN,MAAiD;AAAA,EAC7C;AAAA,EACA;AAAA;AAAA;AAAA;AAAA,EAKA,YAAY,UAAkB;AACjC,SAAK,WAAW;AAChB,SAAK,KAAK,MAAM,GAAG,IAAI,KAAK,QAAQ;AAAA,EACxC;AAAA;AAAA;AAAA;AAAA,EAKO,UAAmC;AACtC,WAAO,GAAG,IAAI,GAAG,KAAK,QAAQ,KAAK;AAAA,EACvC;AACJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|