@fkui/vue 6.10.0 → 6.11.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.
@@ -1197,24 +1197,6 @@ var FStaticFieldPageObject = class {
1197
1197
  }
1198
1198
  };
1199
1199
 
1200
- // src/cypress/FTableColumn.pageobject.ts
1201
- var FTableColumnPageObject = class {
1202
- constructor(selector, index) {
1203
- this.selector = `${selector}:nth(${index})`;
1204
- this.index = index;
1205
- this.el = () => cy.get(this.selector);
1206
- }
1207
- tableRowBodyContent(position) {
1208
- return cy.get(`${this.selector} td:nth(${position})`);
1209
- }
1210
- tableRowHeaderContent() {
1211
- return cy.get(`${this.selector} th`);
1212
- }
1213
- checkbox() {
1214
- return new FCheckboxFieldPageObject(this.selector);
1215
- }
1216
- };
1217
-
1218
1200
  // src/cypress/FInteractiveTable.pageobject.ts
1219
1201
  var FInteractiveTablePageObject = class {
1220
1202
  /**
@@ -1268,20 +1250,27 @@ var FInteractiveTablePageObject = class {
1268
1250
  return cy.get(`${this.selector} caption`);
1269
1251
  }
1270
1252
  /**
1271
- * Get all table headers (`<th>` in `<thead>`).
1253
+ * Get table header cell (`<th>` in `<thead>`).
1272
1254
  *
1273
- * Includes the headers for checkboxes in selectable rows and markers in expandable rows.
1255
+ * Neither the marker for expandable rows or the checkbox for selectable
1256
+ * rows are included in the column count, i.e. `1` always refers to the
1257
+ * first column with content.
1258
+ *
1259
+ * @public
1260
+ * @param col - column number of header (1-indexed).
1261
+ * @returns The header cell element.
1274
1262
  */
1275
- headersRow() {
1276
- return cy.get(`${this.selector} thead th`);
1263
+ header(col) {
1264
+ const index = col - 1;
1265
+ return cy.get(`${this.selector} thead .table__column:nth(${index})`);
1277
1266
  }
1278
1267
  /**
1279
- * Get all table body rows (`<tr>` in `<tbody>`).
1268
+ * Get all table headers (`<th>` in `<thead>`).
1280
1269
  *
1281
- * Includes expandable rows even if not expanded.
1270
+ * Includes the headers for checkboxes in selectable rows and markers in expandable rows.
1282
1271
  */
1283
- bodyRow() {
1284
- return cy.get(`${this.selector} tbody tr`);
1272
+ headersRow() {
1273
+ return cy.get(`${this.selector} thead th`);
1285
1274
  }
1286
1275
  /**
1287
1276
  * Get row (`<tr>` in `<tbody>`) of given index.
@@ -1294,27 +1283,37 @@ var FInteractiveTablePageObject = class {
1294
1283
  return cy.get(`${this.selector} tbody tr:nth(${index})`);
1295
1284
  }
1296
1285
  /**
1297
- * Get page object for `FTableColumn` with selector targeting the given row number.
1298
- *
1299
- * Index includes the header row (index 0 selects the header row while 1 selects first row in table body).
1300
- * Index ignores expandable rows.
1286
+ * Get all table body rows (`<tr>` in `<tbody>`).
1301
1287
  *
1302
- * @param index - Row number (0-indexed).
1303
- * @returns Page object for `FTableColumn`.
1288
+ * Includes expandable rows even if not expanded.
1304
1289
  */
1305
- columnItem(index) {
1306
- return new FTableColumnPageObject(
1307
- `${this.selector} .table__row`,
1308
- index
1309
- );
1290
+ bodyRow() {
1291
+ return cy.get(`${this.selector} tbody tr`);
1310
1292
  }
1311
1293
  /**
1312
- * Get page object for `FTableColumn` with selector targeting the header row.
1294
+ * Get page object with selector for the checkbox in given row.
1313
1295
  *
1314
- * @returns Page object for `FTableColumn`.
1296
+ * For expandable rows the row count depend on whenever a row is expanded or
1297
+ * not. If the first row is collapsed the second row refers to the next
1298
+ * parent row while if the first row is expanded the second row refers to
1299
+ * the first expanded row under the first row.
1300
+ *
1301
+ * Requires a `selectable` table.
1302
+ *
1303
+ * @public
1304
+ * @param row - Row number (1-indexed).
1305
+ * @returns Page object for `FCheckboxField`.
1315
1306
  */
1316
- headerRowItem() {
1317
- return new FTableColumnPageObject(`${this.selector} .table__row`, 0);
1307
+ checkbox(row) {
1308
+ const index = row - 1;
1309
+ return new FCheckboxFieldPageObject(
1310
+ [
1311
+ this.selector,
1312
+ `tbody`,
1313
+ `tr:not(.table__expandable-row--collapsed):nth(${index})`,
1314
+ `.checkbox`
1315
+ ].join(" ")
1316
+ );
1318
1317
  }
1319
1318
  /**
1320
1319
  * Get sort order icon in given column.
@@ -1340,8 +1339,61 @@ var FInteractiveTablePageObject = class {
1340
1339
  default:
1341
1340
  throw Error("Invalid order");
1342
1341
  }
1343
- const column = this.headerRowItem().tableRowHeaderContent().eq(index);
1344
- return column.find(`svg.${iconName}`);
1342
+ return cy.get(
1343
+ `${this.selector} thead th:nth(${index}) svg.${iconName}`
1344
+ );
1345
+ }
1346
+ /**
1347
+ * Get page object for `FTableColumn` with selector targeting the header row.
1348
+ *
1349
+ * @deprecated Use `header()` instead. Deprecated since v6.11.0.
1350
+ * @returns Page object for `FTableColumn`.
1351
+ */
1352
+ headerRowItem() {
1353
+ return new FTableColumnPageObject(`${this.selector} .table__row`, 0);
1354
+ }
1355
+ /**
1356
+ * Get page object for `FTableColumn` with selector targeting the given row number.
1357
+ *
1358
+ * Index includes the header row (index 0 selects the header row while 1 selects first row in table body).
1359
+ * Index ignores expandable rows.
1360
+ *
1361
+ * @deprecated Use `cell()` for body content and `header()` for header content instead. Deprecated since v6.11.0.
1362
+ * @param index - Row number (0-indexed).
1363
+ * @returns Page object for `FTableColumn`.
1364
+ */
1365
+ columnItem(index) {
1366
+ return new FTableColumnPageObject(
1367
+ `${this.selector} .table__row`,
1368
+ index
1369
+ );
1370
+ }
1371
+ };
1372
+
1373
+ // src/cypress/FTableColumn.pageobject.ts
1374
+ var FTableColumnPageObject = class {
1375
+ constructor(selector, index) {
1376
+ this.selector = `${selector}:nth(${index})`;
1377
+ this.index = index;
1378
+ this.el = () => cy.get(this.selector);
1379
+ }
1380
+ /**
1381
+ * @deprecated Use ´FInteractiveTablePageObject.cell()´ instead. Deprecated since v6.11.0.
1382
+ */
1383
+ tableRowBodyContent(position) {
1384
+ return cy.get(`${this.selector} td:nth(${position})`);
1385
+ }
1386
+ /**
1387
+ * @deprecated Use ´FInteractiveTablePageObject.header()´ instead. Deprecated since v6.11.0.
1388
+ */
1389
+ tableRowHeaderContent() {
1390
+ return cy.get(`${this.selector} th`);
1391
+ }
1392
+ /**
1393
+ * @deprecated Use ´FInteractiveTablePageObject.checkbox()´ instead. Deprecated since v6.11.0.
1394
+ */
1395
+ checkbox() {
1396
+ return new FCheckboxFieldPageObject(this.selector);
1345
1397
  }
1346
1398
  };
1347
1399