d5-testing-library 1.9.0-alpha.26 → 1.9.0-alpha.28
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-ESWVWGMB.mjs +7 -0
- package/dist/ListForm-ICJQJFLE.mjs +7 -0
- package/dist/TreeView-Y5FPGAIF.mjs +8 -0
- package/dist/{chunk-65JZLK3D.mjs → chunk-53CBHSJW.mjs} +1 -1
- package/dist/{chunk-JOWMIW3M.mjs → chunk-ACP5AVSD.mjs} +1 -1
- package/dist/{chunk-LQWT5EKX.mjs → chunk-NZ2KVXKF.mjs} +19 -3
- package/dist/{chunk-CZII37EM.mjs → chunk-VBKXFGOX.mjs} +31 -1
- package/dist/cjs/d5-testing-library.cjs +124 -77
- package/dist/cjs/d5-testing-library.d.ts +20 -2
- package/dist/d5-testing-library.d.mts +20 -2
- package/dist/d5-testing-library.legacy-esm.js +85 -83
- package/dist/d5-testing-library.mjs +85 -83
- package/package.json +12 -12
- package/dist/FormEdit-F4DI2VIN.mjs +0 -7
- package/dist/ListForm-OYYZZRI3.mjs +0 -7
- package/dist/TreeView-XWHS6VAT.mjs +0 -8
|
@@ -205,6 +205,7 @@ var byTestId = (testId, element = "div") => {
|
|
|
205
205
|
return By2.css(byTestIdCssSelector(testId, element));
|
|
206
206
|
};
|
|
207
207
|
var readonlyLocator = "readonly";
|
|
208
|
+
var disabledLocator = "disabled";
|
|
208
209
|
|
|
209
210
|
// src/utils/waitElementIsClickable.ts
|
|
210
211
|
async function waitElementIsClickable({
|
|
@@ -252,6 +253,10 @@ var AbstractElementWithParent = class extends AbstractElement {
|
|
|
252
253
|
const classSting = await this.getClasses();
|
|
253
254
|
return classSting.includes(readonlyLocator);
|
|
254
255
|
}
|
|
256
|
+
async isDisabled() {
|
|
257
|
+
const classSting = await this.getClasses();
|
|
258
|
+
return classSting.includes(disabledLocator);
|
|
259
|
+
}
|
|
255
260
|
};
|
|
256
261
|
|
|
257
262
|
// src/pageObjects/elements/Editors/AbstractEditor.ts
|
|
@@ -1219,6 +1224,16 @@ var AbstractEditor = class extends AbstractElementWithParent {
|
|
|
1219
1224
|
await this.initEditor();
|
|
1220
1225
|
return this.editor.isReadonly();
|
|
1221
1226
|
}
|
|
1227
|
+
/**
|
|
1228
|
+
* Возвращает значение true|false в зависимости isDisabled поле или нет
|
|
1229
|
+
* @example
|
|
1230
|
+
* expect(await formEdit.field('NumberFld').isDisabled()).toBe(true);
|
|
1231
|
+
* expect(await formEdit.field('TextFld').isDisabled()).toBe(false);
|
|
1232
|
+
*/
|
|
1233
|
+
async isDisabled() {
|
|
1234
|
+
await this.initEditor();
|
|
1235
|
+
return this.editor.isDisabled();
|
|
1236
|
+
}
|
|
1222
1237
|
/**
|
|
1223
1238
|
* Возвращает значение true|false в зависимости isDisplayed поле или нет
|
|
1224
1239
|
* @example
|
|
@@ -1571,15 +1586,15 @@ async function classDependencyInjector(formType) {
|
|
|
1571
1586
|
let SubFormFactoryClass;
|
|
1572
1587
|
switch (formType) {
|
|
1573
1588
|
case "1" /* LIST */:
|
|
1574
|
-
SubFormFactoryClass = (await import("./ListForm-
|
|
1589
|
+
SubFormFactoryClass = (await import("./ListForm-ICJQJFLE.mjs")).default;
|
|
1575
1590
|
break;
|
|
1576
1591
|
case "3" /* TREE */:
|
|
1577
|
-
SubFormFactoryClass = (await import("./TreeView-
|
|
1592
|
+
SubFormFactoryClass = (await import("./TreeView-Y5FPGAIF.mjs")).default;
|
|
1578
1593
|
break;
|
|
1579
1594
|
case "2" /* EDIT */:
|
|
1580
1595
|
case "99" /* FREE_FORM */:
|
|
1581
1596
|
case "4" /* REPORT */:
|
|
1582
|
-
SubFormFactoryClass = (await import("./FormEdit-
|
|
1597
|
+
SubFormFactoryClass = (await import("./FormEdit-ESWVWGMB.mjs")).default;
|
|
1583
1598
|
break;
|
|
1584
1599
|
default:
|
|
1585
1600
|
throw new Error(`Unsupported form type ${formType}`);
|
|
@@ -1686,6 +1701,7 @@ export {
|
|
|
1686
1701
|
byTestIdCssSelector,
|
|
1687
1702
|
byTestId,
|
|
1688
1703
|
readonlyLocator,
|
|
1704
|
+
disabledLocator,
|
|
1689
1705
|
waitElementIsClickable_default,
|
|
1690
1706
|
AbstractElementWithParent,
|
|
1691
1707
|
TextEditor,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
waitElementIsClickable_default,
|
|
20
20
|
waitElementIsVisible_default,
|
|
21
21
|
withCustomTimeouts_default
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NZ2KVXKF.mjs";
|
|
23
23
|
|
|
24
24
|
// src/pageObjects/elements/Table/Table.ts
|
|
25
25
|
import { By as By6 } from "selenium-webdriver";
|
|
@@ -1097,6 +1097,12 @@ var FormFilterField = class extends AbstractEditor {
|
|
|
1097
1097
|
const filterOperation = await this.initOperation();
|
|
1098
1098
|
return await filterOperation.getIsBlank();
|
|
1099
1099
|
}
|
|
1100
|
+
async isReadonly() {
|
|
1101
|
+
return super.isReadonly();
|
|
1102
|
+
}
|
|
1103
|
+
async isDisabled() {
|
|
1104
|
+
return super.isDisabled();
|
|
1105
|
+
}
|
|
1100
1106
|
};
|
|
1101
1107
|
|
|
1102
1108
|
// src/pageObjects/elements/Filters/FilterPanel.ts
|
|
@@ -1198,6 +1204,12 @@ var PanelFilterField = class extends AbstractEditor {
|
|
|
1198
1204
|
const filterOperation = await this.initOperation();
|
|
1199
1205
|
return await filterOperation.getIsBlank();
|
|
1200
1206
|
}
|
|
1207
|
+
async isReadonly() {
|
|
1208
|
+
return super.isReadonly();
|
|
1209
|
+
}
|
|
1210
|
+
async isDisabled() {
|
|
1211
|
+
return super.isDisabled();
|
|
1212
|
+
}
|
|
1201
1213
|
};
|
|
1202
1214
|
|
|
1203
1215
|
// src/pageObjects/elements/Filters/FilterPanel.ts
|
|
@@ -1270,6 +1282,12 @@ var HeaderFilterField = class extends AbstractEditor {
|
|
|
1270
1282
|
async remove(itemText) {
|
|
1271
1283
|
return super.remove(itemText);
|
|
1272
1284
|
}
|
|
1285
|
+
async isReadonly() {
|
|
1286
|
+
return super.isReadonly();
|
|
1287
|
+
}
|
|
1288
|
+
async isDisabled() {
|
|
1289
|
+
return super.isDisabled();
|
|
1290
|
+
}
|
|
1273
1291
|
};
|
|
1274
1292
|
|
|
1275
1293
|
// src/pageObjects/elements/Filters/ColumnFilter.ts
|
|
@@ -1437,6 +1455,18 @@ var ColumnFilter = class extends AbstractElement {
|
|
|
1437
1455
|
const filterOperation = await this.initOperation();
|
|
1438
1456
|
return await filterOperation.getIsBlank();
|
|
1439
1457
|
}
|
|
1458
|
+
async isReadonly() {
|
|
1459
|
+
const filter = await this.initFilter();
|
|
1460
|
+
const result = await filter.isReadonly();
|
|
1461
|
+
await this.cancel();
|
|
1462
|
+
return result;
|
|
1463
|
+
}
|
|
1464
|
+
async isDisabled() {
|
|
1465
|
+
const filter = await this.initFilter();
|
|
1466
|
+
const result = await filter.isDisabled();
|
|
1467
|
+
await this.cancel();
|
|
1468
|
+
return result;
|
|
1469
|
+
}
|
|
1440
1470
|
};
|
|
1441
1471
|
|
|
1442
1472
|
// src/pageObjects/elements/Forms/ListForm.ts
|