@fkui/vue 6.38.0 → 6.40.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.
@@ -272,7 +272,7 @@ var FErrorListPageObject = class {
272
272
  getLinkByName(error) {
273
273
  let link = () => cy.get(`${this.selector} ${error}`);
274
274
  return cy.get(`${this.selector} a`).each((el) => {
275
- if (el.get(0).innerText.trim() === error) {
275
+ if (el.get(0).textContent.trim() === error) {
276
276
  link = () => el.get(0);
277
277
  }
278
278
  }).then(() => {
@@ -282,7 +282,7 @@ var FErrorListPageObject = class {
282
282
  hasError(error) {
283
283
  let hasSelectedError = false;
284
284
  return cy.get(`${this.selector} li`).each((el) => {
285
- if (el.get(0).innerText.trim() === error) {
285
+ if (el.get(0).textContent.trim() === error) {
286
286
  hasSelectedError = true;
287
287
  }
288
288
  }).then(() => {
@@ -390,6 +390,58 @@ var FDetailsPanelPageObject = class _FDetailsPanelPageObject {
390
390
  }
391
391
  };
392
392
 
393
+ // src/cypress/FDefinitionList.pageobject.ts
394
+ var FDefinitionListPageObject = class {
395
+ /**
396
+ * The root of the component.
397
+ *
398
+ * @param selector - The selector
399
+ */
400
+ selector;
401
+ /**
402
+ * @param selector - The selector.
403
+ */
404
+ constructor(selector) {
405
+ this.selector = selector;
406
+ }
407
+ /**
408
+ * Gets the page object element.
409
+ *
410
+ * @returns The page object element.
411
+ */
412
+ el() {
413
+ return cy.get(this.selector);
414
+ }
415
+ /**
416
+ * Gets the definition value.
417
+ *
418
+ * @param index - Index of definition in definition list.
419
+ * @returns The definition value.
420
+ */
421
+ definition(index) {
422
+ return cy.get(
423
+ `${this.selector} .definition-list__definition:nth(${index})`
424
+ );
425
+ }
426
+ /**
427
+ * Gets the number of definitions.
428
+ *
429
+ * @returns The number of definitions.
430
+ */
431
+ numberOfDefinitions() {
432
+ return cy.get(`${this.selector} .definition-list__term`).its("length");
433
+ }
434
+ /**
435
+ * Gets the term of a definition.
436
+ *
437
+ * @param index - Index of definition in definition list.
438
+ * @returns The term of the definition.
439
+ */
440
+ term(index) {
441
+ return cy.get(`${this.selector} .definition-list__term:nth(${index})`);
442
+ }
443
+ };
444
+
393
445
  // src/cypress/FExpandablePanel.pageobject.ts
394
446
  var FExpandablePanelPageObject = class {
395
447
  selector;
@@ -420,7 +472,7 @@ var FExpandablePanelPageObject = class {
420
472
  let nrOfNotifications = 0;
421
473
  this.notificationIcon().invoke("text").then(
422
474
  (text) => text.replace(/(\d+)/, (match, matchGroup1) => {
423
- nrOfNotifications = parseInt(matchGroup1, 10);
475
+ nrOfNotifications = Number.parseInt(matchGroup1, 10);
424
476
  return matchGroup1;
425
477
  })
426
478
  );
@@ -562,7 +614,7 @@ var FProgressbarPageObject = class {
562
614
  */
563
615
  value() {
564
616
  return this.progressMeter().then((el) => {
565
- return parseInt(el[0].ariaValueNow ?? "0", 10);
617
+ return Number.parseInt(el[0].ariaValueNow ?? "0", 10);
566
618
  });
567
619
  }
568
620
  };
@@ -1025,7 +1077,7 @@ var FOutputFieldPageobject = class {
1025
1077
  }
1026
1078
  };
1027
1079
 
1028
- // src/cypress/Input.ts
1080
+ // src/cypress/input.ts
1029
1081
  var Input = class {
1030
1082
  selector;
1031
1083
  inputSelector;
@@ -1290,7 +1342,7 @@ var FSelectFieldPageObject = class {
1290
1342
  listOfOptions() {
1291
1343
  const listItem = [];
1292
1344
  return cy.get(`${this.selector} select option`).not('[disabled="disabled"]').each((el) => {
1293
- return listItem.push(el.get(0).innerText.trim());
1345
+ return listItem.push(el.get(0).textContent.trim());
1294
1346
  }).then(() => listItem);
1295
1347
  }
1296
1348
  /**
@@ -1519,7 +1571,7 @@ var FInteractiveTablePageObject = class {
1519
1571
  iconName = "f-icon-sort";
1520
1572
  break;
1521
1573
  default:
1522
- throw Error("Invalid order");
1574
+ throw new Error("Invalid order");
1523
1575
  }
1524
1576
  return cy.get(
1525
1577
  `${this.selector} thead th:nth(${String(index)}) svg.${iconName}`
@@ -1892,11 +1944,15 @@ var CalendarPageObject = class {
1892
1944
  this.navigationBar.text().then((el) => {
1893
1945
  let currYear = 2023;
1894
1946
  let currentMonth = 0;
1895
- el.text().replace(/(\w+)\s+(\d+)/, (match, p1, p2) => {
1896
- currentMonth = monthList.findIndex((month) => month === p1);
1897
- currYear = parseInt(p2, 10);
1898
- return String(currYear);
1899
- });
1947
+ el.text().replace(
1948
+ /* eslint-disable-next-line sonarjs/slow-regex -- technical debt */
1949
+ /(\w+)\s+(\d+)/,
1950
+ (match, p1, p2) => {
1951
+ currentMonth = monthList.indexOf(p1);
1952
+ currYear = Number.parseInt(p2, 10);
1953
+ return String(currYear);
1954
+ }
1955
+ );
1900
1956
  const yearDiff = Math.abs(currYear - targetYear);
1901
1957
  const monthDiff = Math.abs(currentMonth - targetMonth);
1902
1958
  let diffInMonths = currYear > targetYear ? yearDiff * -12 : yearDiff * 12;
@@ -2213,6 +2269,7 @@ export {
2213
2269
  FContextMenuPageObject,
2214
2270
  FCrudDatasetPageObject,
2215
2271
  FDatepickerFieldPageobject,
2272
+ FDefinitionListPageObject,
2216
2273
  FDetailsPanelPageObject,
2217
2274
  FDialogueTreeItemPageObject,
2218
2275
  FDialogueTreePageObject,