d5-testing-library 1.9.0-alpha.23 → 1.9.0-alpha.24

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.
@@ -0,0 +1,7 @@
1
+ import {
2
+ FormEdit
3
+ } from "./chunk-Q5FDRZXL.mjs";
4
+ import "./chunk-Z7TA6QHD.mjs";
5
+ export {
6
+ FormEdit as default
7
+ };
@@ -0,0 +1,7 @@
1
+ import {
2
+ ListForm
3
+ } from "./chunk-XPNFBXMQ.mjs";
4
+ import "./chunk-Z7TA6QHD.mjs";
5
+ export {
6
+ ListForm as default
7
+ };
@@ -0,0 +1,8 @@
1
+ import {
2
+ TreeView
3
+ } from "./chunk-H53CPYV5.mjs";
4
+ import "./chunk-XPNFBXMQ.mjs";
5
+ import "./chunk-Z7TA6QHD.mjs";
6
+ export {
7
+ TreeView as default
8
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ListForm
3
- } from "./chunk-E3U3NGWP.mjs";
3
+ } from "./chunk-XPNFBXMQ.mjs";
4
4
 
5
5
  // src/pageObjects/elements/Forms/TreeView.ts
6
6
  var TREELIST_HEADER_CSS_SELECTOR = ".dx-treelist-headers .dx-treelist-content .dx-treelist-table.dx-treelist-table-fixed";
@@ -3,7 +3,7 @@ import {
3
3
  FormField,
4
4
  click,
5
5
  safeWait
6
- } from "./chunk-NCV4XKVP.mjs";
6
+ } from "./chunk-Z7TA6QHD.mjs";
7
7
 
8
8
  // src/pageObjects/elements/Forms/FormEdit.ts
9
9
  import { By } from "selenium-webdriver";
@@ -19,7 +19,7 @@ import {
19
19
  waitElementIsClickable_default,
20
20
  waitElementIsVisible_default,
21
21
  withCustomTimeouts_default
22
- } from "./chunk-NCV4XKVP.mjs";
22
+ } from "./chunk-Z7TA6QHD.mjs";
23
23
 
24
24
  // src/pageObjects/elements/Table/Table.ts
25
25
  import { By as By6 } from "selenium-webdriver";
@@ -77,21 +77,30 @@ var Cell = class extends AbstractElementWithParent {
77
77
  async getDateValue(cellEl, cellElClass) {
78
78
  const value = (await cellEl.getText()).trim();
79
79
  if (value === "") return null;
80
- const isWithTime = cellElClass.includes("with-time");
81
- try {
82
- if (isWithTime) {
83
- const [datePart, timePart] = value.split(", ");
84
- const [day, month, year] = datePart.split(".").map(Number);
85
- const [hours, minutes] = timePart.split(":").map(Number);
86
- return new Date(year, month - 1, day, hours, minutes, 0, 0);
87
- } else {
88
- const [day, month, year] = value.split(".").map(Number);
89
- return new Date(Date.UTC(year, month - 1, day));
80
+ const getDate = (stringDate) => {
81
+ const isWithTime = cellElClass.includes("with-time");
82
+ try {
83
+ if (isWithTime) {
84
+ const [datePart, timePart] = stringDate.split(", ");
85
+ const [day, month, year] = datePart.split(".").map(Number);
86
+ const [hours, minutes] = timePart.split(":").map(Number);
87
+ return new Date(year, month - 1, day, hours, minutes, 0, 0);
88
+ } else {
89
+ const [day, month, year] = stringDate.split(".").map(Number);
90
+ return new Date(Date.UTC(year, month - 1, day));
91
+ }
92
+ } catch (error) {
93
+ console.error(`Error parsing date value "${stringDate}":`, error);
94
+ return null;
90
95
  }
91
- } catch (error) {
92
- console.error(`Error parsing date value "${value}":`, error);
93
- return null;
96
+ };
97
+ const periodValue = value.split(" - ");
98
+ if (periodValue.length > 1) {
99
+ const dateFrom = getDate(periodValue[0]);
100
+ const dateTo = getDate(periodValue[1]);
101
+ return [dateFrom, dateTo];
94
102
  }
103
+ return getDate(value);
95
104
  }
96
105
  async getElement() {
97
106
  if (this._index == null) {
@@ -1539,15 +1539,15 @@ async function classDependencyInjector(formType) {
1539
1539
  let SubFormFactoryClass;
1540
1540
  switch (formType) {
1541
1541
  case "1" /* LIST */:
1542
- SubFormFactoryClass = (await import("./ListForm-XVX3MPPN.mjs")).default;
1542
+ SubFormFactoryClass = (await import("./ListForm-QZ3MZ6X2.mjs")).default;
1543
1543
  break;
1544
1544
  case "3" /* TREE */:
1545
- SubFormFactoryClass = (await import("./TreeView-BD5ZFSEM.mjs")).default;
1545
+ SubFormFactoryClass = (await import("./TreeView-NK4DBSLL.mjs")).default;
1546
1546
  break;
1547
1547
  case "2" /* EDIT */:
1548
1548
  case "99" /* FREE_FORM */:
1549
1549
  case "4" /* REPORT */:
1550
- SubFormFactoryClass = (await import("./FormEdit-QNCHZF44.mjs")).default;
1550
+ SubFormFactoryClass = (await import("./FormEdit-H3GSWWY6.mjs")).default;
1551
1551
  break;
1552
1552
  default:
1553
1553
  throw new Error(`Unsupported form type ${formType}`);
@@ -1884,21 +1884,30 @@ var init_Cell = __esm({
1884
1884
  async getDateValue(cellEl, cellElClass) {
1885
1885
  const value = (await cellEl.getText()).trim();
1886
1886
  if (value === "") return null;
1887
- const isWithTime = cellElClass.includes("with-time");
1888
- try {
1889
- if (isWithTime) {
1890
- const [datePart, timePart] = value.split(", ");
1891
- const [day, month, year] = datePart.split(".").map(Number);
1892
- const [hours, minutes] = timePart.split(":").map(Number);
1893
- return new Date(year, month - 1, day, hours, minutes, 0, 0);
1894
- } else {
1895
- const [day, month, year] = value.split(".").map(Number);
1896
- return new Date(Date.UTC(year, month - 1, day));
1887
+ const getDate = (stringDate) => {
1888
+ const isWithTime = cellElClass.includes("with-time");
1889
+ try {
1890
+ if (isWithTime) {
1891
+ const [datePart, timePart] = stringDate.split(", ");
1892
+ const [day, month, year] = datePart.split(".").map(Number);
1893
+ const [hours, minutes] = timePart.split(":").map(Number);
1894
+ return new Date(year, month - 1, day, hours, minutes, 0, 0);
1895
+ } else {
1896
+ const [day, month, year] = stringDate.split(".").map(Number);
1897
+ return new Date(Date.UTC(year, month - 1, day));
1898
+ }
1899
+ } catch (error) {
1900
+ console.error(`Error parsing date value "${stringDate}":`, error);
1901
+ return null;
1897
1902
  }
1898
- } catch (error) {
1899
- console.error(`Error parsing date value "${value}":`, error);
1900
- return null;
1903
+ };
1904
+ const periodValue = value.split(" - ");
1905
+ if (periodValue.length > 1) {
1906
+ const dateFrom = getDate(periodValue[0]);
1907
+ const dateTo = getDate(periodValue[1]);
1908
+ return [dateFrom, dateTo];
1901
1909
  }
1910
+ return getDate(value);
1902
1911
  }
1903
1912
  async getElement() {
1904
1913
  if (this._index == null) {
@@ -535,7 +535,7 @@ declare class Cell extends AbstractElementWithParent {
535
535
  private getNumberValue;
536
536
  private getDateValue;
537
537
  getElement(): Promise<WebElement>;
538
- getValue(): Promise<string | number | 1 | 0 | string[] | Date>;
538
+ getValue(): Promise<string | number | 1 | 0 | string[] | Date | Date[]>;
539
539
  getIndex(): number;
540
540
  }
541
541
 
@@ -705,7 +705,7 @@ declare class Table extends AbstractElementWithParent {
705
705
  * const cellValue = await table.getCellValueByCellName('Name', 0);
706
706
  * expect(cellValue).toBe('Очікуване значення');
707
707
  */
708
- getCellValueByCellName(cellName: string, rowIndex: number): Promise<string | number | string[] | Date>;
708
+ getCellValueByCellName(cellName: string, rowIndex: number): Promise<string | number | string[] | Date | Date[]>;
709
709
  /**
710
710
  * Перевіряє, чи є таблиця порожньою (не містить жодного рядка з даними).
711
711
  *
@@ -535,7 +535,7 @@ declare class Cell extends AbstractElementWithParent {
535
535
  private getNumberValue;
536
536
  private getDateValue;
537
537
  getElement(): Promise<WebElement>;
538
- getValue(): Promise<string | number | 1 | 0 | string[] | Date>;
538
+ getValue(): Promise<string | number | 1 | 0 | string[] | Date | Date[]>;
539
539
  getIndex(): number;
540
540
  }
541
541
 
@@ -705,7 +705,7 @@ declare class Table extends AbstractElementWithParent {
705
705
  * const cellValue = await table.getCellValueByCellName('Name', 0);
706
706
  * expect(cellValue).toBe('Очікуване значення');
707
707
  */
708
- getCellValueByCellName(cellName: string, rowIndex: number): Promise<string | number | string[] | Date>;
708
+ getCellValueByCellName(cellName: string, rowIndex: number): Promise<string | number | string[] | Date | Date[]>;
709
709
  /**
710
710
  * Перевіряє, чи є таблиця порожньою (не містить жодного рядка з даними).
711
711
  *
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  TreeView
3
- } from "./chunk-XKVJNYJW.mjs";
3
+ } from "./chunk-H53CPYV5.mjs";
4
4
  import {
5
5
  FilterPanel,
6
6
  FormFilterField,
7
7
  ListForm,
8
8
  PanelFilterField
9
- } from "./chunk-E3U3NGWP.mjs";
9
+ } from "./chunk-XPNFBXMQ.mjs";
10
10
  import {
11
11
  FormEdit
12
- } from "./chunk-IYW6EWXP.mjs";
12
+ } from "./chunk-Q5FDRZXL.mjs";
13
13
  import {
14
14
  AbstractButton,
15
15
  AbstractElement,
@@ -32,7 +32,7 @@ import {
32
32
  safeWait,
33
33
  waitElementIsClickable_default,
34
34
  waitElementIsVisible_default
35
- } from "./chunk-NCV4XKVP.mjs";
35
+ } from "./chunk-Z7TA6QHD.mjs";
36
36
 
37
37
  // src/pageObjects/pages/LoginPage.ts
38
38
  import { By } from "selenium-webdriver";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  TreeView
3
- } from "./chunk-XKVJNYJW.mjs";
3
+ } from "./chunk-H53CPYV5.mjs";
4
4
  import {
5
5
  FilterPanel,
6
6
  FormFilterField,
7
7
  ListForm,
8
8
  PanelFilterField
9
- } from "./chunk-E3U3NGWP.mjs";
9
+ } from "./chunk-XPNFBXMQ.mjs";
10
10
  import {
11
11
  FormEdit
12
- } from "./chunk-IYW6EWXP.mjs";
12
+ } from "./chunk-Q5FDRZXL.mjs";
13
13
  import {
14
14
  AbstractButton,
15
15
  AbstractElement,
@@ -32,7 +32,7 @@ import {
32
32
  safeWait,
33
33
  waitElementIsClickable_default,
34
34
  waitElementIsVisible_default
35
- } from "./chunk-NCV4XKVP.mjs";
35
+ } from "./chunk-Z7TA6QHD.mjs";
36
36
 
37
37
  // src/pageObjects/pages/LoginPage.ts
38
38
  import { By } from "selenium-webdriver";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "d5-testing-library",
3
- "version": "1.9.0-alpha.23",
3
+ "version": "1.9.0-alpha.24",
4
4
  "description": "e2e testing D5 projects",
5
5
  "main": "dist/cjs/d5-testing-library.cjs",
6
6
  "module": "dist/d5-testing-library.legacy-esm.js",
@@ -1,7 +0,0 @@
1
- import {
2
- FormEdit
3
- } from "./chunk-IYW6EWXP.mjs";
4
- import "./chunk-NCV4XKVP.mjs";
5
- export {
6
- FormEdit as default
7
- };
@@ -1,7 +0,0 @@
1
- import {
2
- ListForm
3
- } from "./chunk-E3U3NGWP.mjs";
4
- import "./chunk-NCV4XKVP.mjs";
5
- export {
6
- ListForm as default
7
- };
@@ -1,8 +0,0 @@
1
- import {
2
- TreeView
3
- } from "./chunk-XKVJNYJW.mjs";
4
- import "./chunk-E3U3NGWP.mjs";
5
- import "./chunk-NCV4XKVP.mjs";
6
- export {
7
- TreeView as default
8
- };