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.
- package/dist/FormEdit-H3GSWWY6.mjs +7 -0
- package/dist/ListForm-QZ3MZ6X2.mjs +7 -0
- package/dist/TreeView-NK4DBSLL.mjs +8 -0
- package/dist/{chunk-XKVJNYJW.mjs → chunk-H53CPYV5.mjs} +1 -1
- package/dist/{chunk-IYW6EWXP.mjs → chunk-Q5FDRZXL.mjs} +1 -1
- package/dist/{chunk-E3U3NGWP.mjs → chunk-XPNFBXMQ.mjs} +23 -14
- package/dist/{chunk-NCV4XKVP.mjs → chunk-Z7TA6QHD.mjs} +3 -3
- package/dist/cjs/d5-testing-library.cjs +22 -13
- package/dist/cjs/d5-testing-library.d.ts +2 -2
- package/dist/d5-testing-library.d.mts +2 -2
- package/dist/d5-testing-library.legacy-esm.js +4 -4
- package/dist/d5-testing-library.mjs +4 -4
- package/package.json +1 -1
- package/dist/FormEdit-QNCHZF44.mjs +0 -7
- package/dist/ListForm-XVX3MPPN.mjs +0 -7
- package/dist/TreeView-BD5ZFSEM.mjs +0 -8
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
waitElementIsClickable_default,
|
|
20
20
|
waitElementIsVisible_default,
|
|
21
21
|
withCustomTimeouts_default
|
|
22
|
-
} from "./chunk-
|
|
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
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
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-
|
|
1542
|
+
SubFormFactoryClass = (await import("./ListForm-QZ3MZ6X2.mjs")).default;
|
|
1543
1543
|
break;
|
|
1544
1544
|
case "3" /* TREE */:
|
|
1545
|
-
SubFormFactoryClass = (await import("./TreeView-
|
|
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-
|
|
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
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
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
|
-
}
|
|
1899
|
-
|
|
1900
|
-
|
|
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-
|
|
3
|
+
} from "./chunk-H53CPYV5.mjs";
|
|
4
4
|
import {
|
|
5
5
|
FilterPanel,
|
|
6
6
|
FormFilterField,
|
|
7
7
|
ListForm,
|
|
8
8
|
PanelFilterField
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XPNFBXMQ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
FormEdit
|
|
12
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
3
|
+
} from "./chunk-H53CPYV5.mjs";
|
|
4
4
|
import {
|
|
5
5
|
FilterPanel,
|
|
6
6
|
FormFilterField,
|
|
7
7
|
ListForm,
|
|
8
8
|
PanelFilterField
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XPNFBXMQ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
FormEdit
|
|
12
|
-
} from "./chunk-
|
|
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-
|
|
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