@sap_oss/wdio-qmate-service 2.16.3 → 2.18.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.
- package/README.md +1 -1
- package/lib/reuse/helper/errorHandler.js.map +1 -1
- package/lib/reuse/modules/nonUi5/assertion.d.ts +10 -0
- package/lib/reuse/modules/nonUi5/assertion.js +15 -0
- package/lib/reuse/modules/nonUi5/assertion.js.map +1 -1
- package/lib/reuse/modules/nonUi5/element.d.ts +10 -0
- package/lib/reuse/modules/nonUi5/element.js +13 -0
- package/lib/reuse/modules/nonUi5/element.js.map +1 -1
- package/lib/reuse/modules/ui5/navigationBar.js +12 -7
- package/lib/reuse/modules/ui5/navigationBar.js.map +1 -1
- package/lib/reuse/modules/ui5/table.d.ts +184 -7
- package/lib/reuse/modules/ui5/table.js +471 -43
- package/lib/reuse/modules/ui5/table.js.map +1 -1
- package/lib/reuse/modules/ui5/types/ui5.types.d.ts +20 -10
- package/lib/reuse/modules/util/browser.d.ts +2 -2
- package/lib/reuse/modules/util/browser.js +3 -3
- package/lib/reuse/modules/util/browser.js.map +1 -1
- package/package.json +1 -1
- package/test/helper/configurations/base.conf.js +1 -0
- package/test/reuse/nonUi5/assertion/expectTextToBe.spec.js +63 -0
- package/test/reuse/nonUi5/assertion/test.assertion.conf.js +2 -1
- package/test/reuse/nonUi5/element/isEnabled.spec.js +49 -0
- package/test/reuse/nonUi5/element/test.element.conf.js +1 -0
- package/test/reuse/ui5/navigationBar/clickSapLogo.spec.js +27 -0
- package/test/reuse/ui5/navigationBar/test.navigationBar.conf.js +2 -1
- package/test/reuse/ui5/table/deselectAllRows.spec.js +71 -0
- package/test/reuse/ui5/table/deselectRowByIndex.spec.js +86 -0
- package/test/reuse/ui5/table/getSelectorForRowByIndex.spec.js +78 -0
- package/test/reuse/ui5/table/getSelectorsForRowsByValues.spec.js +152 -0
- package/test/reuse/ui5/table/getTotalNumberOfRows.spec.js +144 -0
- package/test/reuse/ui5/table/getTotalNumberOfRowsByValues.spec.js +115 -0
- package/test/reuse/ui5/table/openItemByIndex.spec.js +84 -0
- package/test/reuse/ui5/table/openItemByValues.spec.js +102 -0
- package/test/reuse/ui5/table/selectAllRows.spec.js +64 -0
- package/test/reuse/ui5/table/selectRowByIndex.spec.js +89 -0
- package/test/reuse/ui5/table/test.table.conf.js +12 -2
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const tableSelector = {
|
|
4
|
+
elementProperties: {
|
|
5
|
+
viewName: "mycompany.myapp.MyWorklistApp.view.Worklist",
|
|
6
|
+
metadata: "sap.m.Table",
|
|
7
|
+
id: "container-MyWorklistApp---worklist--table"
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const checkBoxSelector = (product) => {
|
|
12
|
+
return {
|
|
13
|
+
elementProperties: {
|
|
14
|
+
viewName: "mycompany.myapp.MyWorklistApp.view.Worklist",
|
|
15
|
+
metadata: "sap.m.CheckBox",
|
|
16
|
+
bindingContextPath: product
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
describe("table - selectRowByIndex - demo kit - index", function () {
|
|
22
|
+
it("Preparation", async function () {
|
|
23
|
+
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/test-resources/sap/m/demokit/tutorial/worklist/07/webapp/test/mockServer.html?sap-ui-theme=sap_horizon_dark");
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it("Execution (Index 0)", async function () {
|
|
27
|
+
let rowIndex = 0;
|
|
28
|
+
await ui5.table.selectRowByIndex(tableSelector, rowIndex);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("Verification (Index 0)", async function () {
|
|
32
|
+
const isSelected = await ui5.element.getPropertyValue(checkBoxSelector("/Products*15)"), "selected");
|
|
33
|
+
await common.assertion.expectEqual(isSelected, true);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("Execution (Index 4)", async function () {
|
|
37
|
+
let rowIndex = 4;
|
|
38
|
+
await ui5.table.selectRowByIndex(tableSelector, rowIndex);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it("Verification (Index 4)", async function () {
|
|
42
|
+
const isSelected = await ui5.element.getPropertyValue(checkBoxSelector("/Products*2)"), "selected");
|
|
43
|
+
await common.assertion.expectEqual(isSelected, true);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
describe("table - selectRowByIndex - demo kit - already selected row remains selected", function () {
|
|
48
|
+
let rowIndex = 0;
|
|
49
|
+
|
|
50
|
+
async function validateChecked() {
|
|
51
|
+
const isSelected = await ui5.element.getPropertyValue(checkBoxSelector("/Products*15)"), "selected");
|
|
52
|
+
await common.assertion.expectEqual(isSelected, true);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
it("Preparation", async function () {
|
|
56
|
+
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/test-resources/sap/m/demokit/tutorial/worklist/07/webapp/test/mockServer.html?sap-ui-theme=sap_horizon_dark");
|
|
57
|
+
await ui5.table.selectRowByIndex(tableSelector, rowIndex);
|
|
58
|
+
await validateChecked();
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("Execution", async function () {
|
|
62
|
+
await ui5.table.selectRowByIndex(tableSelector, rowIndex);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it("Verification", async function () {
|
|
66
|
+
await validateChecked();
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
describe("table - selectRowByIndex - demo kit - passing id", function () {
|
|
71
|
+
let rowIndex = 0;
|
|
72
|
+
|
|
73
|
+
async function validateChecked() {
|
|
74
|
+
const isSelected = await ui5.element.getPropertyValue(checkBoxSelector("/Products*15)"), "selected");
|
|
75
|
+
await common.assertion.expectEqual(isSelected, true);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
it("Preparation", async function () {
|
|
79
|
+
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/test-resources/sap/m/demokit/tutorial/worklist/07/webapp/test/mockServer.html?sap-ui-theme=sap_horizon_dark");
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("Execution", async function () {
|
|
83
|
+
await ui5.table.selectRowByIndex(tableSelector.elementProperties.id, rowIndex);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it("Verification", async function () {
|
|
87
|
+
await validateChecked();
|
|
88
|
+
});
|
|
89
|
+
});
|
|
@@ -9,6 +9,16 @@ exports.config = merge(profile.config, {
|
|
|
9
9
|
specs: [
|
|
10
10
|
path.resolve(__dirname, "clickSettingsButton.spec.js"),
|
|
11
11
|
path.resolve(__dirname, "sortColumnAscending.spec.js"),
|
|
12
|
-
path.resolve(__dirname, "sortColumnDescending.spec.js")
|
|
12
|
+
path.resolve(__dirname, "sortColumnDescending.spec.js"),
|
|
13
|
+
path.resolve(__dirname, "getTotalNumberOfRows.spec.js"),
|
|
14
|
+
path.resolve(__dirname, "getTotalNumberOfRowsByValues.spec.js"),
|
|
15
|
+
path.resolve(__dirname, "getSelectorForRowByIndex.spec.js"),
|
|
16
|
+
path.resolve(__dirname, "getSelectorsForRowsByValues.spec.js"),
|
|
17
|
+
path.resolve(__dirname, "openItemByIndex.spec.js"),
|
|
18
|
+
path.resolve(__dirname, "openItemByValues.spec.js"),
|
|
19
|
+
path.resolve(__dirname, "selectRowByIndex.spec.js"),
|
|
20
|
+
path.resolve(__dirname, "selectAllRows.spec.js"),
|
|
21
|
+
path.resolve(__dirname, "deselectRowByIndex.spec.js"),
|
|
22
|
+
path.resolve(__dirname, "deselectAllRows.spec.js")
|
|
13
23
|
]
|
|
14
|
-
});
|
|
24
|
+
});
|