@sap_oss/wdio-qmate-service 2.9.0 → 2.9.2
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/lib/reuse/helper/jsonDocGen.js +24 -16
- package/lib/reuse/helper/jsonDocGen.js.map +1 -1
- package/lib/reuse/modules/nonUi5/assertion.d.ts +1 -1
- package/lib/reuse/modules/nonUi5/assertion.js +1 -1
- package/lib/reuse/modules/nonUi5/assertion.js.map +1 -1
- package/lib/reuse/modules/nonUi5/element.d.ts +16 -16
- package/lib/reuse/modules/nonUi5/element.js +22 -24
- package/lib/reuse/modules/nonUi5/element.js.map +1 -1
- package/lib/reuse/modules/nonUi5/userInteraction.d.ts +4 -4
- package/lib/reuse/modules/nonUi5/userInteraction.js +4 -4
- package/lib/reuse/modules/nonUi5/userInteraction.js.map +1 -1
- package/lib/reuse/modules/ui5/assertion.d.ts +15 -15
- package/lib/reuse/modules/ui5/assertion.js +15 -15
- package/lib/reuse/modules/ui5/assertion.js.map +1 -1
- package/lib/reuse/modules/ui5/confirmationDialog.d.ts +8 -8
- package/lib/reuse/modules/ui5/confirmationDialog.js +8 -8
- package/lib/reuse/modules/ui5/confirmationDialog.js.map +1 -1
- package/lib/reuse/modules/ui5/control.d.ts +1 -1
- package/lib/reuse/modules/ui5/control.js +1 -1
- package/lib/reuse/modules/ui5/control.js.map +1 -1
- package/lib/reuse/modules/ui5/element.d.ts +11 -11
- package/lib/reuse/modules/ui5/element.js +11 -11
- package/lib/reuse/modules/ui5/element.js.map +1 -1
- package/lib/reuse/modules/ui5/footerBar.d.ts +9 -9
- package/lib/reuse/modules/ui5/footerBar.js +9 -9
- package/lib/reuse/modules/ui5/footerBar.js.map +1 -1
- package/lib/reuse/modules/ui5/navigationBar.d.ts +4 -4
- package/lib/reuse/modules/ui5/navigationBar.js +4 -4
- package/lib/reuse/modules/ui5/navigationBar.js.map +1 -1
- package/lib/reuse/modules/ui5/session.d.ts +1 -1
- package/lib/reuse/modules/ui5/session.js +1 -1
- package/lib/reuse/modules/ui5/session.js.map +1 -1
- package/lib/reuse/modules/ui5/userInteraction.d.ts +24 -24
- package/lib/reuse/modules/ui5/userInteraction.js +26 -26
- package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
- package/package.json +3 -3
- package/test/reuse/ui5/navigationBar/clickBack.spec.js +6 -11
- package/test/reuse/util/browser/switchToNewWindow.spec.js +29 -76
|
@@ -1,142 +1,95 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const initialUrl = "https://sap.github.io/wdio-qmate-service/";
|
|
4
|
+
const newUrl = "https://squidfunk.github.io/mkdocs-material/";
|
|
5
|
+
const initialPageTitle = "Qmate Service";
|
|
6
|
+
const newPagTitle = "Material for MkDocs";
|
|
7
|
+
const selector = "a[href='https://squidfunk.github.io/mkdocs-material/']";
|
|
4
8
|
|
|
5
9
|
describe("browser - switchToNewWindow - title", function () {
|
|
6
|
-
const demoAppsTitle = "Demo Apps - Demo Kit - SAPUI5 SDK";
|
|
7
|
-
const shoppingCartTitle = "Shopping Cart";
|
|
8
|
-
|
|
9
10
|
it("Preparation", async function () {
|
|
10
|
-
await common.navigation.navigateToUrl(
|
|
11
|
-
await
|
|
12
|
-
|
|
13
|
-
const selector = {
|
|
14
|
-
"elementProperties": {
|
|
15
|
-
"viewName": "sap.ui.documentation.sdk.view.DemoApps",
|
|
16
|
-
"metadata": "sap.ui.documentation.TitleLink",
|
|
17
|
-
"bindingContextPath": "/demoAppsByCategory/0/rows/0/0"
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
await ui5.userInteraction.click(selector);
|
|
11
|
+
await common.navigation.navigateToUrl(initialUrl);
|
|
12
|
+
await nonUi5.userInteraction.click(selector);
|
|
21
13
|
});
|
|
22
14
|
|
|
23
15
|
it("Execution 1", async function () {
|
|
24
|
-
await util.browser.switchToNewWindow(
|
|
16
|
+
await util.browser.switchToNewWindow(newPagTitle);
|
|
25
17
|
});
|
|
26
18
|
|
|
27
19
|
it("Verification 1", async function () {
|
|
28
20
|
const currentTitle = await browser.getTitle();
|
|
29
|
-
|
|
21
|
+
common.assertion.expectEqual(currentTitle, newPagTitle);
|
|
30
22
|
});
|
|
31
23
|
|
|
32
24
|
it("Execution 2", async function () {
|
|
33
|
-
await util.browser.switchToNewWindow(
|
|
25
|
+
await util.browser.switchToNewWindow(initialPageTitle);
|
|
34
26
|
});
|
|
35
27
|
|
|
36
28
|
it("Verification 2", async function () {
|
|
37
29
|
const currentTitle = await browser.getTitle();
|
|
38
|
-
|
|
30
|
+
common.assertion.expectEqual(currentTitle, initialPageTitle);
|
|
39
31
|
});
|
|
40
32
|
});
|
|
41
33
|
|
|
42
34
|
describe("browser - switchToNewWindow - title (RegExp)", function () {
|
|
43
35
|
it("Preparation", async function () {
|
|
44
|
-
await common.navigation.navigateToUrl(
|
|
45
|
-
await
|
|
46
|
-
|
|
47
|
-
const selector = {
|
|
48
|
-
"elementProperties": {
|
|
49
|
-
"viewName": "sap.ui.documentation.sdk.view.DemoApps",
|
|
50
|
-
"metadata": "sap.ui.documentation.TitleLink",
|
|
51
|
-
"bindingContextPath": "/demoAppsByCategory/0/rows/0/0"
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
await ui5.userInteraction.click(selector);
|
|
36
|
+
await common.navigation.navigateToUrl(initialUrl);
|
|
37
|
+
await nonUi5.userInteraction.click(selector);
|
|
55
38
|
});
|
|
56
39
|
|
|
57
40
|
it("Execution 1", async function () {
|
|
58
|
-
const titleRegExp = /
|
|
41
|
+
const titleRegExp = /Material/;
|
|
59
42
|
await util.browser.switchToNewWindow(titleRegExp);
|
|
60
43
|
});
|
|
61
44
|
|
|
62
45
|
it("Verification 1", async function () {
|
|
63
46
|
const titleAct = await browser.getTitle();
|
|
64
|
-
const titleExp =
|
|
65
|
-
|
|
47
|
+
const titleExp = newPagTitle;
|
|
48
|
+
common.assertion.expectEqual(titleAct, titleExp);
|
|
66
49
|
});
|
|
67
50
|
});
|
|
68
51
|
|
|
69
52
|
describe("browser - switchToNewWindow - url", function () {
|
|
70
|
-
const shoppingCartUrl = "https://sapui5.hana.ondemand.com/test-resources/sap/m/demokit/cart/webapp/index.html?sap-ui-theme=sap_horizon";
|
|
71
|
-
|
|
72
53
|
it("Preparation", async function () {
|
|
73
|
-
await common.navigation.navigateToUrl(
|
|
74
|
-
await
|
|
75
|
-
|
|
76
|
-
const selector = {
|
|
77
|
-
"elementProperties": {
|
|
78
|
-
"viewName": "sap.ui.documentation.sdk.view.DemoApps",
|
|
79
|
-
"metadata": "sap.ui.documentation.TitleLink",
|
|
80
|
-
"bindingContextPath": "/demoAppsByCategory/0/rows/0/0"
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
await ui5.userInteraction.click(selector);
|
|
54
|
+
await common.navigation.navigateToUrl(initialUrl);
|
|
55
|
+
await nonUi5.userInteraction.click(selector);
|
|
84
56
|
});
|
|
85
57
|
|
|
86
58
|
it("Execution", async function () {
|
|
87
|
-
await util.browser.switchToNewWindow(
|
|
59
|
+
await util.browser.switchToNewWindow(newUrl);
|
|
88
60
|
});
|
|
89
61
|
|
|
90
62
|
it("Verification", async function () {
|
|
91
63
|
const currentUrl = await util.browser.getCurrentUrl();
|
|
92
|
-
|
|
64
|
+
common.assertion.expectEqual(currentUrl, newUrl);
|
|
93
65
|
});
|
|
94
66
|
});
|
|
95
67
|
|
|
96
68
|
describe("browser - switchToNewWindow - url (RegExp)", function () {
|
|
97
69
|
it("Preparation", async function () {
|
|
98
|
-
await common.navigation.navigateToUrl(
|
|
99
|
-
await
|
|
100
|
-
|
|
101
|
-
const selector = {
|
|
102
|
-
"elementProperties": {
|
|
103
|
-
"viewName": "sap.ui.documentation.sdk.view.DemoApps",
|
|
104
|
-
"metadata": "sap.ui.documentation.TitleLink",
|
|
105
|
-
"bindingContextPath": "/demoAppsByCategory/0/rows/0/0"
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
await ui5.userInteraction.click(selector);
|
|
70
|
+
await common.navigation.navigateToUrl(initialUrl);
|
|
71
|
+
await nonUi5.userInteraction.click(selector);
|
|
109
72
|
});
|
|
110
73
|
|
|
111
74
|
it("Execution", async function () {
|
|
112
|
-
const urlRegExp = /
|
|
75
|
+
const urlRegExp = /squidfunk/;
|
|
113
76
|
await util.browser.switchToNewWindow(urlRegExp);
|
|
114
77
|
});
|
|
115
78
|
|
|
116
79
|
it("Verification", async function () {
|
|
117
|
-
const urlExp =
|
|
80
|
+
const urlExp = newUrl;
|
|
118
81
|
const urlAct = await util.browser.getCurrentUrl();
|
|
119
|
-
|
|
82
|
+
common.assertion.expectEqual(urlAct, urlExp);
|
|
120
83
|
});
|
|
121
84
|
});
|
|
122
85
|
|
|
123
86
|
describe("browser - switchToNewWindow - error case", function () {
|
|
124
87
|
it("Preparation", async function () {
|
|
125
|
-
await common.navigation.navigateToUrl(
|
|
126
|
-
await
|
|
127
|
-
|
|
128
|
-
const selector = {
|
|
129
|
-
"elementProperties": {
|
|
130
|
-
"viewName": "sap.ui.documentation.sdk.view.DemoApps",
|
|
131
|
-
"metadata": "sap.ui.documentation.TitleLink",
|
|
132
|
-
"bindingContextPath": "/demoAppsByCategory/0/rows/0/0"
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
await ui5.userInteraction.click(selector);
|
|
88
|
+
await common.navigation.navigateToUrl(initialUrl);
|
|
89
|
+
await nonUi5.userInteraction.click(selector);
|
|
136
90
|
});
|
|
137
91
|
|
|
138
92
|
it("Execution & Verification", async function () {
|
|
139
|
-
await expect(util.browser.switchToNewWindow("Wrong Title"))
|
|
140
|
-
.rejects.toThrow(/Function 'switchToNewWindow' failed with/);
|
|
93
|
+
await expect(util.browser.switchToNewWindow("Wrong Title")).rejects.toThrow(/Function 'switchToNewWindow' failed with/);
|
|
141
94
|
});
|
|
142
|
-
});
|
|
95
|
+
});
|