@sap_oss/wdio-qmate-service 1.2.3 → 1.3.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/docs/doc.md +189 -51
- package/lib/reuse/index.js +3 -4
- package/lib/reuse/index.js.map +1 -1
- package/lib/reuse/modules/runtime/Runtime.d.ts +5 -0
- package/lib/reuse/modules/runtime/Runtime.js +11 -0
- package/lib/reuse/modules/runtime/Runtime.js.map +1 -0
- package/lib/reuse/modules/ui5/control.d.ts +18 -17
- package/lib/reuse/modules/ui5/control.js +21 -21
- package/lib/reuse/modules/ui5/control.js.map +1 -1
- package/lib/reuse/modules/ui5/types/ui5.types.d.ts +16 -0
- package/lib/reuse/modules/ui5/types/ui5.types.js +3 -0
- package/lib/reuse/modules/ui5/types/ui5.types.js.map +1 -0
- package/lib/reuse/modules/util/Util.d.ts +9 -7
- package/lib/reuse/modules/util/Util.js +2 -0
- package/lib/reuse/modules/util/Util.js.map +1 -1
- package/lib/reuse/modules/util/component.d.ts +25 -0
- package/lib/reuse/modules/util/component.js +67 -0
- package/lib/reuse/modules/util/component.js.map +1 -0
- package/lib/reuse/modules/util/data.d.ts +25 -5
- package/lib/reuse/modules/util/data.js +86 -15
- package/lib/reuse/modules/util/data.js.map +1 -1
- package/lib/scripts/hooks/beforeSession.js +4 -1
- package/lib/scripts/hooks/beforeSession.js.map +1 -1
- package/lib/scripts/hooks/utils/cycle.js +7 -1
- package/lib/scripts/hooks/utils/cycle.js.map +1 -1
- package/package.json +1 -1
- package/test/reuse/ui5/control/execute.spec.js +53 -1
- package/test/reuse/ui5/control/getAggregationProperty.spec.js +7 -2
- package/test/reuse/ui5/control/getAssociationProperty.spec.js +67 -1
- package/test/reuse/ui5/control/getBindingContextPathProperty.spec.js +8 -4
- package/test/reuse/ui5/control/getProperty.spec.js +6 -2
- package/test/reuse/ui5/control/getPropertyBinding.spec.js +8 -4
- package/test/reuse/util/data/customSourceData/test.json +3 -0
- package/test/reuse/util/data/customSourceData/test.secure.json +5 -0
- package/test/reuse/util/data/getData.spec.js +18 -1
- package/test/reuse/util/data/getSecureData.spec.js +18 -1
- package/test/reuse/util/data/test.data.conf.js +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
describe("execute - check
|
|
3
|
+
describe("execute - check updated title is 'whatsUp2' - pass element", async () => {
|
|
4
4
|
let title;
|
|
5
5
|
const newTitle = "whatsUp2";
|
|
6
6
|
it("Preparation", async () => {
|
|
@@ -23,6 +23,58 @@ describe("execute - check name is Accessories", async () => {
|
|
|
23
23
|
}, elem, newTitle);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
+
it("Verification", () => {
|
|
27
|
+
common.assertion.expectEqual(title, newTitle);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
describe("execute - check updated title is 'whatsUp2' - pass selector", async () => {
|
|
31
|
+
let title;
|
|
32
|
+
const newTitle = "whatsUp2";
|
|
33
|
+
it("Preparation", async () => {
|
|
34
|
+
const url = await util.browser.getBaseUrl();
|
|
35
|
+
await common.navigation.navigateToUrl(url);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("Execution", async () => {
|
|
39
|
+
const selector = {
|
|
40
|
+
"elementProperties": {
|
|
41
|
+
"metadata": "sap.m.StandardListItem",
|
|
42
|
+
"id": "*categoryList-7",
|
|
43
|
+
"bindingContextPath": "/ProductCategories('LT')"
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
title = await ui5.control.execute(function (control, txt, done) {
|
|
47
|
+
control.setTitle(txt);
|
|
48
|
+
done(control.getTitle());
|
|
49
|
+
}, selector, newTitle);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it("Verification", () => {
|
|
53
|
+
common.assertion.expectEqual(title, newTitle);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
describe("execute - check updated title is 'whatsUp2' - pass selector with options", async () => {
|
|
57
|
+
let title;
|
|
58
|
+
const newTitle = "whatsUp2";
|
|
59
|
+
it("Preparation", async () => {
|
|
60
|
+
const url = await util.browser.getBaseUrl();
|
|
61
|
+
await common.navigation.navigateToUrl(url);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("Execution", async () => {
|
|
65
|
+
const selector = {
|
|
66
|
+
"elementProperties": {
|
|
67
|
+
"metadata": "sap.m.StandardListItem",
|
|
68
|
+
"id": "*categoryList-7",
|
|
69
|
+
"bindingContextPath": "/ProductCategories('LT')"
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
title = await ui5.control.execute(function (control, txt, done) {
|
|
73
|
+
control.setTitle(txt);
|
|
74
|
+
done(control.getTitle());
|
|
75
|
+
}, { selector: selector, index: 0, timeout: 30000}, newTitle);
|
|
76
|
+
});
|
|
77
|
+
|
|
26
78
|
it("Verification", () => {
|
|
27
79
|
common.assertion.expectEqual(title, newTitle);
|
|
28
80
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const { handleCookiesConsent } = require("../../../helper/utils");
|
|
3
3
|
|
|
4
|
-
describe("getAggregationProperty - check
|
|
5
|
-
let val;
|
|
4
|
+
describe("getAggregationProperty - check tooltip property is 'Open category Accessories'", async () => {
|
|
5
|
+
let val, valElem, valSelOptions;
|
|
6
6
|
it("Preparation", async () => {
|
|
7
7
|
const url = await util.browser.getBaseUrl();
|
|
8
8
|
await common.navigation.navigateToUrl(url);
|
|
@@ -22,10 +22,15 @@ describe("getAggregationProperty - check name is Accessories", async () => {
|
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
val = await ui5.control.getAggregationProperty(selector, "tooltip");
|
|
25
|
+
const elem = await ui5.element.getDisplayed(selector);
|
|
26
|
+
valElem = await ui5.control.getAggregationProperty(elem, "tooltip");
|
|
27
|
+
valSelOptions = await ui5.control.getAggregationProperty({selector: selector, index: 0, timeout: 30000}, "tooltip");
|
|
25
28
|
});
|
|
26
29
|
|
|
27
30
|
it("Verification", () => {
|
|
28
31
|
common.assertion.expectEqual(val, "Open category Accessories");
|
|
32
|
+
common.assertion.expectEqual(valElem, "Open category Accessories");
|
|
33
|
+
common.assertion.expectEqual(valSelOptions, "Open category Accessories");
|
|
29
34
|
});
|
|
30
35
|
});
|
|
31
36
|
|
|
@@ -1 +1,67 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
const { handleCookiesConsent } = require("../../../helper/utils");
|
|
3
|
+
|
|
4
|
+
describe("getAssociationProperty - 'ariaDescribedBy' of Button", function () {
|
|
5
|
+
let val;
|
|
6
|
+
it("Preparation", async () => {
|
|
7
|
+
const url = "https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.Button/sample/sap.m.sample.Button";
|
|
8
|
+
await common.navigation.navigateToUrl(url);
|
|
9
|
+
await handleCookiesConsent();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it("Execution", async () => {
|
|
13
|
+
const selector = {
|
|
14
|
+
"elementProperties": {
|
|
15
|
+
"viewName": "sap.m.sample.Button.Page",
|
|
16
|
+
"metadata": "sap.m.Button",
|
|
17
|
+
"text": "Default"
|
|
18
|
+
},
|
|
19
|
+
"ancestorProperties": {
|
|
20
|
+
"metadata": "sap.m.FlexItemData",
|
|
21
|
+
"viewName": "sap.m.sample.Button.Page"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
val = await ui5.control.getAssociationProperty(selector, "ariaDescribedBy");
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("Verification", async () => {
|
|
28
|
+
common.assertion.expectEqual(val, ["__xmlview1--defaultButtonDescription", "__xmlview1--genericButtonDescription"]);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
});
|
|
32
|
+
describe("getAssociationProperty - 'selectedItems' of MultiComboBox", function () {
|
|
33
|
+
let selector, selectedItems;
|
|
34
|
+
it("Preparation", async () => {
|
|
35
|
+
const url = "https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.MultiComboBox/sample/sap.m.sample.MultiComboBox";
|
|
36
|
+
await common.navigation.navigateToUrl(url);
|
|
37
|
+
await handleCookiesConsent();
|
|
38
|
+
selector = {
|
|
39
|
+
"elementProperties": { "metadata": "sap.m.MultiComboBox" },
|
|
40
|
+
"parentProperties": { "metadata": "sap.ui.layout.VerticalLayout" }
|
|
41
|
+
};
|
|
42
|
+
var id = await ui5.element.getId(selector);
|
|
43
|
+
const element = await $("[id='" + id + "-arrow']");
|
|
44
|
+
await element.click();
|
|
45
|
+
const item1 = {
|
|
46
|
+
"elementProperties": { "metadata": "sap.m.CheckBox" },
|
|
47
|
+
"parentProperties": { "metadata": "sap.m.StandardListItem", "mProperties": { "title": "Astro Phone 6" } }
|
|
48
|
+
};
|
|
49
|
+
await ui5.userInteraction.click(item1);
|
|
50
|
+
const item2 = {
|
|
51
|
+
"elementProperties": { "metadata": "sap.m.CheckBox" },
|
|
52
|
+
"parentProperties": { "metadata": "sap.m.StandardListItem", "mProperties": { "title": "Beam Breaker B-2" } }
|
|
53
|
+
};
|
|
54
|
+
await ui5.userInteraction.click(item2);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("Execution", async () => {
|
|
58
|
+
selectedItems = await ui5.control.getAssociationProperty(selector, "selectedItems");
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("Verification", async () => {
|
|
62
|
+
common.assertion.expectEqual(selectedItems.length, 2);
|
|
63
|
+
expect(selectedItems[0]).toMatch(/box.\-3$/);
|
|
64
|
+
expect(selectedItems[1]).toMatch(/box.\-6$/);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
describe("getBindingContextPathProperty - check
|
|
4
|
-
let
|
|
3
|
+
describe("getBindingContextPathProperty - check binding context path is /ProductCategories('AC')", async () => {
|
|
4
|
+
let bindingContextPath, bindingContextPathSelector, bindingContextPathSelectorOptions;
|
|
5
5
|
it("Preparation", async () => {
|
|
6
6
|
const url = await util.browser.getBaseUrl();
|
|
7
7
|
await common.navigation.navigateToUrl(url);
|
|
@@ -21,10 +21,14 @@ describe("getBindingContextPathProperty - check name is Accessories", async () =
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
const elem = await ui5.element.getDisplayed(selector);
|
|
24
|
-
|
|
24
|
+
bindingContextPath = await ui5.control.getBindingContextPathProperty(elem);
|
|
25
|
+
bindingContextPathSelector = await ui5.control.getBindingContextPathProperty(selector);
|
|
26
|
+
bindingContextPathSelectorOptions = await ui5.control.getBindingContextPathProperty({selector: selector, index: 0, timeout: 30000});
|
|
25
27
|
});
|
|
26
28
|
|
|
27
29
|
it("Verification", () => {
|
|
28
|
-
common.assertion.expectEqual(
|
|
30
|
+
common.assertion.expectEqual(bindingContextPath, "/ProductCategories('AC')");
|
|
31
|
+
common.assertion.expectEqual(bindingContextPathSelector, "/ProductCategories('AC')");
|
|
32
|
+
common.assertion.expectEqual(bindingContextPathSelectorOptions, "/ProductCategories('AC')");
|
|
29
33
|
});
|
|
30
34
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
describe("getProperty - check
|
|
4
|
-
let val;
|
|
3
|
+
describe("getProperty - check title is Accessories", async () => {
|
|
4
|
+
let val, valSelector, valSelectorOptions;
|
|
5
5
|
it("Preparation", async () => {
|
|
6
6
|
const url = await util.browser.getBaseUrl();
|
|
7
7
|
await common.navigation.navigateToUrl(url);
|
|
@@ -22,9 +22,13 @@ describe("getProperty - check name is Accessories reuse", async () => {
|
|
|
22
22
|
};
|
|
23
23
|
const elem = await ui5.element.getDisplayed(selector);
|
|
24
24
|
val = await ui5.control.getProperty(elem, "title");
|
|
25
|
+
valSelector = await ui5.control.getProperty(selector, "title");
|
|
26
|
+
valSelectorOptions = await ui5.control.getProperty({selector: selector, index: 0, timeout: 3000}, "title");
|
|
25
27
|
});
|
|
26
28
|
|
|
27
29
|
it("Verification", () => {
|
|
28
30
|
common.assertion.expectEqual(val, "Accessories");
|
|
31
|
+
common.assertion.expectEqual(valSelector, "Accessories");
|
|
32
|
+
common.assertion.expectEqual(valSelectorOptions, "Accessories");
|
|
29
33
|
});
|
|
30
34
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
describe("getPropertyBinding - check
|
|
4
|
-
let aBindings;
|
|
3
|
+
describe("getPropertyBinding - check title path is CategoryName", async () => {
|
|
4
|
+
let aBindings, aBindingsSelector, aBindingsSelectorOptions;
|
|
5
5
|
it("Preparation", async () => {
|
|
6
6
|
const url = await util.browser.getBaseUrl();
|
|
7
7
|
await common.navigation.navigateToUrl(url);
|
|
8
8
|
});
|
|
9
9
|
|
|
10
10
|
it("Execution", async () => {
|
|
11
|
-
const
|
|
11
|
+
const selector = {
|
|
12
12
|
"elementProperties": {
|
|
13
13
|
"metadata": "sap.m.StandardListItem",
|
|
14
14
|
"mProperties": {
|
|
@@ -20,11 +20,15 @@ describe("getPropertyBinding - check name is Accessories", async () => {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
const elem = await ui5.element.getDisplayed(
|
|
23
|
+
const elem = await ui5.element.getDisplayed(selector);
|
|
24
24
|
aBindings = await ui5.control.getPropertyBinding(elem, "title");
|
|
25
|
+
aBindingsSelector = await ui5.control.getPropertyBinding(selector, "title");
|
|
26
|
+
aBindingsSelectorOptions = await ui5.control.getPropertyBinding({selector: selector, index: 0, timeout: 30000}, "title");
|
|
25
27
|
});
|
|
26
28
|
|
|
27
29
|
it("Verification", () => {
|
|
28
30
|
common.assertion.expectEqual(aBindings[0].path, "CategoryName");
|
|
31
|
+
common.assertion.expectEqual(aBindingsSelector[0].path, "CategoryName");
|
|
32
|
+
common.assertion.expectEqual(aBindingsSelectorOptions[0].path, "CategoryName");
|
|
29
33
|
});
|
|
30
34
|
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"session": {
|
|
3
|
+
"password": "b1512310be1b4ae516a92bab1f857fc6018abe6e8199622db77a621b21ab1d7b0aeede946829ad6d46ec4d8f349e0a27452abe8fd0f7f035a309627e80a066a400ad06456ae6e6202287c7259b5703e8df768e76708c0f8494c2245eee5a841e1ab4ecd909347561cb92eba4ff53f7e288a31d295f475b1a6a00b804090d7bc15eb2108f6ce842fdee574d95c8fa562f4a927aaaea77c5eaf66330bfcb6445ee55c58815d30eb94845a19f3080e89a96cb9fcacfc51a1043dff1a99086d3be86e4529e9ddd381086a167703d5bff19e3060fec0e59b6a2d3d383c731bff89e26cc322d5436c5f654aa4df99977c770580220cad7075fc786a5d6310e49881b8ee9e3614339ce3d7f991d801f6e469ebff38cbda7fa479e6949a71580c8cd53816f72765dd0fe15feeab30424e950b37b8cfa0900d36295208b900d0923ac9b99f8bd5707a6095bdb4c995286787dc3fa058c462f041879061afd5157a207eca7"
|
|
4
|
+
}
|
|
5
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
describe("data - getData", function() {
|
|
1
|
+
describe("data - getData - default source", function() {
|
|
2
2
|
|
|
3
3
|
let dataAct;
|
|
4
4
|
|
|
@@ -13,3 +13,20 @@ describe("data - getData", function() {
|
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
});
|
|
16
|
+
|
|
17
|
+
describe("data - getData - custom source", function() {
|
|
18
|
+
|
|
19
|
+
let dataAct;
|
|
20
|
+
|
|
21
|
+
it("Execution & Verification", function () {
|
|
22
|
+
const source = "customSourceData";
|
|
23
|
+
const data = util.data.getData("test", source);
|
|
24
|
+
dataAct = data.test;
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("Verification", function () {
|
|
28
|
+
const dataExp = "TEST";
|
|
29
|
+
common.assertion.expectEqual(dataAct, dataExp);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
describe("data - getSecureData", function() {
|
|
1
|
+
describe("data - getSecureData - default source", function() {
|
|
2
2
|
|
|
3
3
|
let data;
|
|
4
4
|
|
|
@@ -32,6 +32,23 @@ describe("data - getSecureData", function() {
|
|
|
32
32
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
+
describe("data - getSecureData - custom source", function() {
|
|
36
|
+
|
|
37
|
+
let data;
|
|
38
|
+
|
|
39
|
+
it("Execution", function () {
|
|
40
|
+
const source = "customSourceData";
|
|
41
|
+
data = util.data.getSecureData("test", source);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("Verification", function () {
|
|
45
|
+
const dataExp = "super-duper-sensitive-pw";
|
|
46
|
+
const dataAct = data.session.password;
|
|
47
|
+
common.assertion.expectEqual(dataAct, dataExp);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
});
|
|
51
|
+
|
|
35
52
|
// =================================== KEEP DISABLED ===================================
|
|
36
53
|
// Can't be executed in pipeline because file is missing. Add the following to "data" folder to execute locally:
|
|
37
54
|
|