@sap_oss/wdio-qmate-service 2.9.1 → 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.
Files changed (35) hide show
  1. package/lib/reuse/modules/nonUi5/assertion.d.ts +1 -1
  2. package/lib/reuse/modules/nonUi5/assertion.js +1 -1
  3. package/lib/reuse/modules/nonUi5/assertion.js.map +1 -1
  4. package/lib/reuse/modules/nonUi5/element.d.ts +16 -16
  5. package/lib/reuse/modules/nonUi5/element.js +22 -24
  6. package/lib/reuse/modules/nonUi5/element.js.map +1 -1
  7. package/lib/reuse/modules/nonUi5/userInteraction.d.ts +4 -4
  8. package/lib/reuse/modules/nonUi5/userInteraction.js +4 -4
  9. package/lib/reuse/modules/nonUi5/userInteraction.js.map +1 -1
  10. package/lib/reuse/modules/ui5/assertion.d.ts +15 -15
  11. package/lib/reuse/modules/ui5/assertion.js +15 -15
  12. package/lib/reuse/modules/ui5/assertion.js.map +1 -1
  13. package/lib/reuse/modules/ui5/confirmationDialog.d.ts +8 -8
  14. package/lib/reuse/modules/ui5/confirmationDialog.js +8 -8
  15. package/lib/reuse/modules/ui5/confirmationDialog.js.map +1 -1
  16. package/lib/reuse/modules/ui5/control.d.ts +1 -1
  17. package/lib/reuse/modules/ui5/control.js +1 -1
  18. package/lib/reuse/modules/ui5/control.js.map +1 -1
  19. package/lib/reuse/modules/ui5/element.d.ts +11 -11
  20. package/lib/reuse/modules/ui5/element.js +11 -11
  21. package/lib/reuse/modules/ui5/element.js.map +1 -1
  22. package/lib/reuse/modules/ui5/footerBar.d.ts +9 -9
  23. package/lib/reuse/modules/ui5/footerBar.js +9 -9
  24. package/lib/reuse/modules/ui5/footerBar.js.map +1 -1
  25. package/lib/reuse/modules/ui5/navigationBar.d.ts +4 -4
  26. package/lib/reuse/modules/ui5/navigationBar.js +4 -4
  27. package/lib/reuse/modules/ui5/navigationBar.js.map +1 -1
  28. package/lib/reuse/modules/ui5/session.d.ts +1 -1
  29. package/lib/reuse/modules/ui5/session.js +1 -1
  30. package/lib/reuse/modules/ui5/session.js.map +1 -1
  31. package/lib/reuse/modules/ui5/userInteraction.d.ts +24 -24
  32. package/lib/reuse/modules/ui5/userInteraction.js +26 -26
  33. package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
  34. package/package.json +1 -1
  35. package/test/reuse/util/browser/switchToNewWindow.spec.js +27 -93
@@ -1,158 +1,92 @@
1
1
  "use strict";
2
2
 
3
- const { handleCookiesConsent } = require("../../../helper/utils");
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 resourcesTitle = "Resources - Demo Kit - SAPUI5 SDK";
7
- const iconExplorerTitle = "Icon Explorer";
8
-
9
10
  it("Preparation", async function () {
10
- await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/#/resources");
11
- await handleCookiesConsent();
12
-
13
- const selector = {
14
- elementProperties: {
15
- viewName: "sap.ui.documentation.sdk.view.Resources",
16
- metadata: "sap.m.Button",
17
- text: [
18
- {
19
- path: "i18n>RESOURCES_CARD_LINK_ICON_EXPLORER"
20
- }
21
- ]
22
- }
23
- };
24
- await ui5.userInteraction.click(selector);
11
+ await common.navigation.navigateToUrl(initialUrl);
12
+ await nonUi5.userInteraction.click(selector);
25
13
  });
26
14
 
27
15
  it("Execution 1", async function () {
28
- await util.browser.switchToNewWindow(iconExplorerTitle);
16
+ await util.browser.switchToNewWindow(newPagTitle);
29
17
  });
30
18
 
31
19
  it("Verification 1", async function () {
32
20
  const currentTitle = await browser.getTitle();
33
- await common.assertion.expectEqual(currentTitle, iconExplorerTitle);
21
+ common.assertion.expectEqual(currentTitle, newPagTitle);
34
22
  });
35
23
 
36
24
  it("Execution 2", async function () {
37
- await util.browser.switchToNewWindow(resourcesTitle);
25
+ await util.browser.switchToNewWindow(initialPageTitle);
38
26
  });
39
27
 
40
28
  it("Verification 2", async function () {
41
29
  const currentTitle = await browser.getTitle();
42
- await common.assertion.expectEqual(currentTitle, resourcesTitle);
30
+ common.assertion.expectEqual(currentTitle, initialPageTitle);
43
31
  });
44
32
  });
45
33
 
46
34
  describe("browser - switchToNewWindow - title (RegExp)", function () {
47
35
  it("Preparation", async function () {
48
- await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/#/resources");
49
- await handleCookiesConsent();
50
-
51
- const selector = {
52
- elementProperties: {
53
- viewName: "sap.ui.documentation.sdk.view.Resources",
54
- metadata: "sap.m.Button",
55
- text: [
56
- {
57
- path: "i18n>RESOURCES_CARD_LINK_ICON_EXPLORER"
58
- }
59
- ]
60
- }
61
- };
62
- await ui5.userInteraction.click(selector);
36
+ await common.navigation.navigateToUrl(initialUrl);
37
+ await nonUi5.userInteraction.click(selector);
63
38
  });
64
39
 
65
40
  it("Execution 1", async function () {
66
- const titleRegExp = /Icon/;
41
+ const titleRegExp = /Material/;
67
42
  await util.browser.switchToNewWindow(titleRegExp);
68
43
  });
69
44
 
70
45
  it("Verification 1", async function () {
71
46
  const titleAct = await browser.getTitle();
72
- const titleExp = "Icon Explorer";
73
- await common.assertion.expectEqual(titleAct, titleExp);
47
+ const titleExp = newPagTitle;
48
+ common.assertion.expectEqual(titleAct, titleExp);
74
49
  });
75
50
  });
76
51
 
77
52
  describe("browser - switchToNewWindow - url", function () {
78
- const iconExplorerUrl = "https://sapui5.hana.ondemand.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html";
79
-
80
53
  it("Preparation", async function () {
81
- await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/#/resources");
82
- await handleCookiesConsent();
83
-
84
- const selector = {
85
- elementProperties: {
86
- viewName: "sap.ui.documentation.sdk.view.Resources",
87
- metadata: "sap.m.Button",
88
- text: [
89
- {
90
- path: "i18n>RESOURCES_CARD_LINK_ICON_EXPLORER"
91
- }
92
- ]
93
- }
94
- };
95
- await ui5.userInteraction.click(selector);
54
+ await common.navigation.navigateToUrl(initialUrl);
55
+ await nonUi5.userInteraction.click(selector);
96
56
  });
97
57
 
98
58
  it("Execution", async function () {
99
- await util.browser.switchToNewWindow(iconExplorerUrl);
59
+ await util.browser.switchToNewWindow(newUrl);
100
60
  });
101
61
 
102
62
  it("Verification", async function () {
103
63
  const currentUrl = await util.browser.getCurrentUrl();
104
- await common.assertion.expectEqual(currentUrl, iconExplorerUrl);
64
+ common.assertion.expectEqual(currentUrl, newUrl);
105
65
  });
106
66
  });
107
67
 
108
68
  describe("browser - switchToNewWindow - url (RegExp)", function () {
109
69
  it("Preparation", async function () {
110
- await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/#/resources");
111
- await handleCookiesConsent();
112
-
113
- const selector = {
114
- elementProperties: {
115
- viewName: "sap.ui.documentation.sdk.view.Resources",
116
- metadata: "sap.m.Button",
117
- text: [
118
- {
119
- path: "i18n>RESOURCES_CARD_LINK_ICON_EXPLORER"
120
- }
121
- ]
122
- }
123
- };
124
- await ui5.userInteraction.click(selector);
70
+ await common.navigation.navigateToUrl(initialUrl);
71
+ await nonUi5.userInteraction.click(selector);
125
72
  });
126
73
 
127
74
  it("Execution", async function () {
128
- const urlRegExp = /icon/;
75
+ const urlRegExp = /squidfunk/;
129
76
  await util.browser.switchToNewWindow(urlRegExp);
130
77
  });
131
78
 
132
79
  it("Verification", async function () {
133
- const urlExp = "https://sapui5.hana.ondemand.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html";
80
+ const urlExp = newUrl;
134
81
  const urlAct = await util.browser.getCurrentUrl();
135
- await common.assertion.expectEqual(urlAct, urlExp);
82
+ common.assertion.expectEqual(urlAct, urlExp);
136
83
  });
137
84
  });
138
85
 
139
86
  describe("browser - switchToNewWindow - error case", function () {
140
87
  it("Preparation", async function () {
141
- await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/#/resources");
142
- await handleCookiesConsent();
143
-
144
- const selector = {
145
- elementProperties: {
146
- viewName: "sap.ui.documentation.sdk.view.Resources",
147
- metadata: "sap.m.Button",
148
- text: [
149
- {
150
- path: "i18n>RESOURCES_CARD_LINK_ICON_EXPLORER"
151
- }
152
- ]
153
- }
154
- };
155
- await ui5.userInteraction.click(selector);
88
+ await common.navigation.navigateToUrl(initialUrl);
89
+ await nonUi5.userInteraction.click(selector);
156
90
  });
157
91
 
158
92
  it("Execution & Verification", async function () {