@sap_oss/wdio-qmate-service 2.6.4 → 2.6.6
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/clientsideUI5scripts.js +7 -1
- package/lib/reuse/helper/clientsideUI5scripts.js.map +1 -1
- package/lib/reuse/helper/errorHandler.d.ts +5 -5
- package/lib/reuse/helper/errorHandler.js +56 -18
- package/lib/reuse/helper/errorHandler.js.map +1 -1
- package/lib/reuse/helper/errorMessages.d.ts +0 -2
- package/lib/reuse/helper/errorMessages.js +3 -9
- package/lib/reuse/helper/errorMessages.js.map +1 -1
- package/lib/reuse/modules/common/navigation.d.ts +1 -0
- package/lib/reuse/modules/common/navigation.js +13 -3
- package/lib/reuse/modules/common/navigation.js.map +1 -1
- package/lib/reuse/modules/common/userInteraction.d.ts +1 -0
- package/lib/reuse/modules/common/userInteraction.js +22 -7
- package/lib/reuse/modules/common/userInteraction.js.map +1 -1
- package/lib/reuse/modules/nonUi5/element.d.ts +1 -0
- package/lib/reuse/modules/nonUi5/element.js +27 -20
- package/lib/reuse/modules/nonUi5/element.js.map +1 -1
- package/lib/reuse/modules/nonUi5/navigation.d.ts +1 -0
- package/lib/reuse/modules/nonUi5/navigation.js +6 -1
- package/lib/reuse/modules/nonUi5/navigation.js.map +1 -1
- package/lib/reuse/modules/nonUi5/userInteraction.d.ts +2 -1
- package/lib/reuse/modules/nonUi5/userInteraction.js +22 -20
- package/lib/reuse/modules/nonUi5/userInteraction.js.map +1 -1
- package/lib/reuse/{helper → modules}/types.js.map +1 -1
- package/lib/reuse/modules/ui5/assertion.d.ts +3 -2
- package/lib/reuse/modules/ui5/assertion.js +17 -12
- package/lib/reuse/modules/ui5/assertion.js.map +1 -1
- package/lib/reuse/modules/ui5/element.d.ts +1 -0
- package/lib/reuse/modules/ui5/element.js +21 -15
- package/lib/reuse/modules/ui5/element.js.map +1 -1
- package/lib/reuse/modules/ui5/navigation.d.ts +1 -0
- package/lib/reuse/modules/ui5/navigation.js +13 -7
- package/lib/reuse/modules/ui5/navigation.js.map +1 -1
- package/lib/reuse/modules/ui5/navigationBar.d.ts +1 -0
- package/lib/reuse/modules/ui5/navigationBar.js +10 -5
- package/lib/reuse/modules/ui5/navigationBar.js.map +1 -1
- package/lib/reuse/modules/ui5/session.d.ts +1 -0
- package/lib/reuse/modules/ui5/session.js +18 -13
- package/lib/reuse/modules/ui5/session.js.map +1 -1
- package/lib/reuse/modules/ui5/userInteraction.d.ts +3 -2
- package/lib/reuse/modules/ui5/userInteraction.js +16 -17
- package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
- package/lib/reuse/modules/util/browser.d.ts +8 -0
- package/lib/reuse/modules/util/browser.js +16 -1
- package/lib/reuse/modules/util/browser.js.map +1 -1
- package/lib/reuse/modules/util/data.d.ts +1 -0
- package/lib/reuse/modules/util/data.js +10 -8
- package/lib/reuse/modules/util/data.js.map +1 -1
- package/lib/reuse/modules/util/file.d.ts +1 -0
- package/lib/reuse/modules/util/file.js +14 -12
- package/lib/reuse/modules/util/file.js.map +1 -1
- package/lib/reuse/modules/util/formatter.d.ts +1 -0
- package/lib/reuse/modules/util/formatter.js +14 -7
- package/lib/reuse/modules/util/formatter.js.map +1 -1
- package/lib/reuse/modules/util/function.d.ts +1 -0
- package/lib/reuse/modules/util/function.js +12 -1
- package/lib/reuse/modules/util/function.js.map +1 -1
- package/package.json +1 -1
- package/test/reuse/common/navigation/navigateToUrl.spec.js +3 -8
- package/test/reuse/common/navigation/navigateToUrlAndRetry.spec.js +7 -5
- package/test/reuse/common/userInteraction/clearAndFillActive.spec.js +29 -32
- package/test/reuse/common/userInteraction/clearAndFillActiveAndRetry.spec.js +31 -33
- package/test/reuse/common/userInteraction/fillActive.spec.js +30 -38
- package/test/reuse/common/userInteraction/fillActiveAndRetry.spec.js +24 -30
- package/test/reuse/helper/errorHandler/logException.spec.js +23 -17
- package/test/reuse/nonUi5/element/getAllDisplayed.spec.js +2 -2
- package/test/reuse/nonUi5/element/getByChild.spec.js +2 -2
- package/test/reuse/nonUi5/element/getByCssContainingText.spec.js +8 -25
- package/test/reuse/nonUi5/element/getByParent.spec.js +17 -12
- package/test/reuse/nonUi5/element/test.element.conf.js +0 -2
- package/test/reuse/nonUi5/element/test.element.sauceLabs.conf.js +0 -2
- package/test/reuse/nonUi5/userInteraction/clearAndFill.spec.js +1 -1
- package/test/reuse/nonUi5/userInteraction/clearAndFillAndRetry.spec.js +3 -1
- package/test/reuse/nonUi5/userInteraction/clearAndRetry.spec.js +6 -6
- package/test/reuse/nonUi5/userInteraction/click.spec.js +3 -1
- package/test/reuse/nonUi5/userInteraction/clickAndRetry.spec.js +7 -3
- package/test/reuse/nonUi5/userInteraction/fillAndRetry.spec.js +3 -1
- package/test/reuse/ui5/assertion/expectAttributeToContain.spec.js +36 -27
- package/test/reuse/ui5/assertion/expectBindingContextPathToBe.spec.js +6 -7
- package/test/reuse/ui5/assertion/expectBindingPathToBe.spec.js +5 -5
- package/test/reuse/ui5/assertion/expectTextToBe.spec.js +1 -1
- package/test/reuse/ui5/assertion/expectToBeEnabled.spec.js +39 -35
- package/test/reuse/ui5/assertion/expectToBeNotVisible.spec.js +1 -1
- package/test/reuse/ui5/assertion/expectValueToBe.spec.js +1 -1
- package/test/reuse/ui5/element/getAllDisplayed.spec.js +28 -29
- package/test/reuse/ui5/element/getByText.spec.js +2 -3
- package/test/reuse/ui5/element/waitForAll.spec.js +1 -1
- package/test/reuse/ui5/navigationBar/clickBack.spec.js +1 -1
- package/test/reuse/ui5/navigationBar/clickUserIcon.spec.js +1 -1
- package/test/reuse/ui5/navigationBar/expectPageTitle.spec.js +1 -1
- package/test/reuse/ui5/navigationBar/expectShellHeader.spec.js +3 -3
- package/test/reuse/ui5/session/loginFiori.spec.js +1 -0
- package/test/reuse/ui5/userInteraction/clearAndFillAndRetry.spec.js +41 -37
- package/test/reuse/ui5/userInteraction/clearAndRetry.spec.js +30 -30
- package/test/reuse/ui5/userInteraction/clickAndRetry.spec.js +12 -13
- package/test/reuse/ui5/userInteraction/clickSelectArrowAndRetry.spec.js +49 -52
- package/test/reuse/ui5/userInteraction/fill.spec.js +1 -1
- package/test/reuse/ui5/userInteraction/fillAndRetry.spec.js +21 -23
- package/test/reuse/ui5/userInteraction/mouseOverElement.spec.js +21 -25
- package/test/reuse/util/browser/back.spec.js +1 -1
- package/test/reuse/util/browser/forward.spec.js +33 -0
- package/test/reuse/util/browser/switchToIframe.spec.js +1 -1
- package/test/reuse/util/browser/switchToNewWindow.spec.js +1 -1
- package/test/reuse/util/browser/test.browser.conf.js +4 -3
- package/test/reuse/util/component/loadEntryPoint.spec.js +1 -1
- package/test/reuse/util/component/storeEntryPoint.spec.js +1 -1
- package/test/reuse/util/data/readDataFromFile.spec.js +2 -6
- package/test/reuse/util/data/writeDataToFile.spec.js +2 -6
- package/test/reuse/util/file/expectTextDataToContain.spec.js +1 -1
- package/test/reuse/util/file/getTextData.spec.js +1 -1
- package/test/reuse/util/file/getXmlData.spec.js +1 -1
- package/test/reuse/util/formatter/extractNumberFromString.spec.js +2 -2
- package/test/reuse/util/formatter/sliceStringAfter.spec.js +2 -2
- package/test/reuse/util/formatter/sliceStringAt.spec.js +2 -2
- package/test/reuse/util/formatter/trimString.spec.js +2 -2
- /package/lib/reuse/{helper → modules}/types.d.ts +0 -0
- /package/lib/reuse/{helper → modules}/types.js +0 -0
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
const {
|
|
2
|
-
handleCookiesConsent
|
|
3
|
-
} = require("../../../helper/utils");
|
|
1
|
+
const { handleCookiesConsent } = require("../../../helper/utils");
|
|
4
2
|
|
|
5
3
|
describe("userInteraction - clickSelectArrowAndRetry", function () {
|
|
6
|
-
|
|
7
4
|
it("Preparation", async function () {
|
|
8
5
|
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.Select/sample/sap.m.sample.Select");
|
|
9
6
|
await handleCookiesConsent();
|
|
@@ -15,25 +12,26 @@ describe("userInteraction - clickSelectArrowAndRetry", function () {
|
|
|
15
12
|
|
|
16
13
|
// Execution
|
|
17
14
|
const catalog = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
elementProperties: {
|
|
16
|
+
viewName: "sap.m.sample.Select.Page",
|
|
17
|
+
metadata: "sap.m.Select",
|
|
18
|
+
items: [
|
|
19
|
+
{
|
|
20
|
+
path: "/ProductCollection2"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
24
23
|
}
|
|
25
24
|
};
|
|
26
25
|
|
|
27
26
|
let index = 0;
|
|
28
27
|
await ui5.userInteraction.clickSelectArrowAndRetry(catalog, index, retries, interval);
|
|
29
28
|
|
|
30
|
-
|
|
31
29
|
// Verification
|
|
32
30
|
let selector = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
elementProperties: {
|
|
32
|
+
viewName: "sap.m.sample.Select.Page",
|
|
33
|
+
metadata: "sap.ui.core.Item",
|
|
34
|
+
bindingContextPath: "/ProductCollection2/3"
|
|
37
35
|
}
|
|
38
36
|
};
|
|
39
37
|
await ui5.assertion.expectToBeVisible(selector);
|
|
@@ -41,10 +39,10 @@ describe("userInteraction - clickSelectArrowAndRetry", function () {
|
|
|
41
39
|
// Close dropdown list
|
|
42
40
|
// Execution
|
|
43
41
|
selector = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
elementProperties: {
|
|
43
|
+
viewName: "sap.m.sample.Select.Page",
|
|
44
|
+
metadata: "sap.m.Select",
|
|
45
|
+
type: "Default"
|
|
48
46
|
}
|
|
49
47
|
};
|
|
50
48
|
index = 1;
|
|
@@ -52,19 +50,17 @@ describe("userInteraction - clickSelectArrowAndRetry", function () {
|
|
|
52
50
|
|
|
53
51
|
// Verification
|
|
54
52
|
selector = {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
elementProperties: {
|
|
54
|
+
viewName: "sap.m.sample.Select.Page",
|
|
55
|
+
metadata: "sap.ui.core.Item",
|
|
56
|
+
bindingContextPath: "/ProductCollection2/3"
|
|
59
57
|
}
|
|
60
58
|
};
|
|
61
59
|
await ui5.assertion.expectToBeNotVisible(selector);
|
|
62
60
|
});
|
|
63
61
|
});
|
|
64
62
|
|
|
65
|
-
|
|
66
63
|
describe("userInteraction - clickSelectArrow and catch an error", function () {
|
|
67
|
-
|
|
68
64
|
it("Preparation", async function () {
|
|
69
65
|
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.Select/sample/sap.m.sample.Select");
|
|
70
66
|
await handleCookiesConsent();
|
|
@@ -72,22 +68,22 @@ describe("userInteraction - clickSelectArrow and catch an error", function () {
|
|
|
72
68
|
|
|
73
69
|
it("Execution & Verification", async function () {
|
|
74
70
|
const selector = {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
elementProperties: {
|
|
72
|
+
viewName: "sap.m.sample.Select.Page",
|
|
73
|
+
metadata: "salect",
|
|
74
|
+
type: "Default"
|
|
79
75
|
}
|
|
80
76
|
};
|
|
81
77
|
const index = 10;
|
|
82
78
|
const retries = 1;
|
|
83
79
|
const interval = 2;
|
|
84
|
-
await expect(ui5.userInteraction.clickSelectArrowAndRetry(selector, index, interval, retries))
|
|
85
|
-
|
|
80
|
+
await expect(ui5.userInteraction.clickSelectArrowAndRetry(selector, index, interval, retries)).rejects.toThrow(
|
|
81
|
+
"Retries done. Failed to execute the function"
|
|
82
|
+
);
|
|
86
83
|
});
|
|
87
84
|
});
|
|
88
85
|
|
|
89
86
|
describe("userInteraction - clickSelectArrowAndRetry with index > 0", function () {
|
|
90
|
-
|
|
91
87
|
it("Preparation", async function () {
|
|
92
88
|
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.Select/sample/sap.m.sample.SelectValueState");
|
|
93
89
|
await util.browser.refresh();
|
|
@@ -100,35 +96,36 @@ describe("userInteraction - clickSelectArrowAndRetry with index > 0", function (
|
|
|
100
96
|
|
|
101
97
|
// Execution
|
|
102
98
|
const catalog = {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
elementProperties: {
|
|
100
|
+
viewName: "sap.m.sample.SelectValueState.Page",
|
|
101
|
+
metadata: "sap.m.Select",
|
|
102
|
+
items: [
|
|
103
|
+
{
|
|
104
|
+
path: "/*"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
109
107
|
}
|
|
110
108
|
};
|
|
111
109
|
|
|
112
110
|
let index = 2;
|
|
113
111
|
await ui5.userInteraction.clickSelectArrowAndRetry(catalog, index, retries, interval);
|
|
114
112
|
|
|
115
|
-
|
|
116
113
|
// Verification
|
|
117
114
|
let selector = {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
elementProperties: {
|
|
116
|
+
viewName: "sap.m.sample.SelectValueState.Page",
|
|
117
|
+
metadata: "sap.ui.core.Item",
|
|
118
|
+
bindingContextPath: "/SuccessProductCollection/2"
|
|
122
119
|
}
|
|
123
120
|
};
|
|
124
121
|
await ui5.assertion.expectToBeVisible(selector);
|
|
125
122
|
|
|
126
123
|
// Close dropdown list
|
|
127
124
|
selector = {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
125
|
+
elementProperties: {
|
|
126
|
+
viewName: "sap.m.sample.SelectValueState.Page",
|
|
127
|
+
metadata: "sap.m.Select",
|
|
128
|
+
type: "Default"
|
|
132
129
|
}
|
|
133
130
|
};
|
|
134
131
|
index = 2;
|
|
@@ -136,12 +133,12 @@ describe("userInteraction - clickSelectArrowAndRetry with index > 0", function (
|
|
|
136
133
|
|
|
137
134
|
// Verification
|
|
138
135
|
selector = {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
elementProperties: {
|
|
137
|
+
viewName: "sap.m.sample.SelectValueState.Page",
|
|
138
|
+
metadata: "sap.ui.core.Item",
|
|
139
|
+
bindingContextPath: "/SuccessProductCollection/2"
|
|
143
140
|
}
|
|
144
141
|
};
|
|
145
142
|
await ui5.assertion.expectToBeNotVisible(selector);
|
|
146
143
|
});
|
|
147
|
-
});
|
|
144
|
+
});
|
|
@@ -103,6 +103,6 @@ describe("userInteraction - fill element with empty value", function () {
|
|
|
103
103
|
const index = 0;
|
|
104
104
|
const timeout = 30000;
|
|
105
105
|
await expect(ui5.userInteraction.fill(selector))
|
|
106
|
-
.rejects.toThrow("Function 'fill' failed: Please provide an element and value(datatype - number/string) as arguments.");
|
|
106
|
+
.rejects.toThrow("Function 'fill' failed with: Please provide an element and value(datatype - number/string) as arguments.");
|
|
107
107
|
});
|
|
108
108
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const { handleCookiesConsent } = require("../../../helper/utils");
|
|
2
2
|
|
|
3
3
|
describe("userInteraction - fill and retry", function () {
|
|
4
|
-
|
|
5
4
|
let value;
|
|
6
5
|
let actualValue;
|
|
7
6
|
|
|
@@ -12,10 +11,10 @@ describe("userInteraction - fill and retry", function () {
|
|
|
12
11
|
|
|
13
12
|
it("Execution", async function () {
|
|
14
13
|
const selector = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
elementProperties: {
|
|
15
|
+
viewName: "sap.ui.demo.cart.view.Home",
|
|
16
|
+
metadata: "sap.m.SearchField",
|
|
17
|
+
id: "*searchField"
|
|
19
18
|
}
|
|
20
19
|
};
|
|
21
20
|
|
|
@@ -33,7 +32,6 @@ describe("userInteraction - fill and retry", function () {
|
|
|
33
32
|
});
|
|
34
33
|
|
|
35
34
|
describe("userInteraction - fillAndRetry element with invalid selector", function () {
|
|
36
|
-
|
|
37
35
|
let value;
|
|
38
36
|
|
|
39
37
|
it("Preparation", async function () {
|
|
@@ -43,9 +41,9 @@ describe("userInteraction - fillAndRetry element with invalid selector", functio
|
|
|
43
41
|
|
|
44
42
|
it("Execution & Verification", async function () {
|
|
45
43
|
const selector = {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
elementProperties: {
|
|
45
|
+
viewName: "sap.ui.demo.cart.view.Home",
|
|
46
|
+
metadata: "sap.eld"
|
|
49
47
|
}
|
|
50
48
|
};
|
|
51
49
|
|
|
@@ -53,13 +51,13 @@ describe("userInteraction - fillAndRetry element with invalid selector", functio
|
|
|
53
51
|
const index = 0;
|
|
54
52
|
const timeout = 30000;
|
|
55
53
|
const retries = 1;
|
|
56
|
-
await expect(ui5.userInteraction.fillAndRetry(selector, value, index, timeout, retries))
|
|
57
|
-
|
|
54
|
+
await expect(ui5.userInteraction.fillAndRetry(selector, value, index, timeout, retries)).rejects.toThrow(
|
|
55
|
+
"Retries done. Failed to execute the function"
|
|
56
|
+
);
|
|
58
57
|
});
|
|
59
58
|
});
|
|
60
59
|
|
|
61
60
|
describe("userInteraction - fillAndRetry element with number", function () {
|
|
62
|
-
|
|
63
61
|
let value;
|
|
64
62
|
let actualValue;
|
|
65
63
|
|
|
@@ -70,10 +68,10 @@ describe("userInteraction - fillAndRetry element with number", function () {
|
|
|
70
68
|
|
|
71
69
|
it("Execution", async function () {
|
|
72
70
|
const selector = {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
elementProperties: {
|
|
72
|
+
viewName: "sap.ui.demo.cart.view.Home",
|
|
73
|
+
metadata: "sap.m.SearchField",
|
|
74
|
+
id: "*searchField"
|
|
77
75
|
}
|
|
78
76
|
};
|
|
79
77
|
value = 12;
|
|
@@ -90,7 +88,6 @@ describe("userInteraction - fillAndRetry element with number", function () {
|
|
|
90
88
|
});
|
|
91
89
|
|
|
92
90
|
describe("userInteraction - fillAndRetry element with empty value", function () {
|
|
93
|
-
|
|
94
91
|
let value;
|
|
95
92
|
let actualValue;
|
|
96
93
|
|
|
@@ -101,16 +98,17 @@ describe("userInteraction - fillAndRetry element with empty value", function ()
|
|
|
101
98
|
|
|
102
99
|
it("Execution & Verification", async function () {
|
|
103
100
|
const selector = {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
101
|
+
elementProperties: {
|
|
102
|
+
viewName: "sap.ui.demo.cart.view.Home",
|
|
103
|
+
metadata: "sap.m.SearchField",
|
|
104
|
+
id: "*searchField"
|
|
108
105
|
}
|
|
109
106
|
};
|
|
110
107
|
const index = 0;
|
|
111
108
|
const timeout = 30000;
|
|
112
109
|
const retries = 1;
|
|
113
|
-
await expect(ui5.userInteraction.fillAndRetry(selector, value, index, timeout, retries))
|
|
114
|
-
|
|
110
|
+
await expect(ui5.userInteraction.fillAndRetry(selector, value, index, timeout, retries)).rejects.toThrow(
|
|
111
|
+
"Function 'fillAndRetry' failed with: Retries done. Failed to execute the function: Please provide an element and value(datatype - number/string) as arguments"
|
|
112
|
+
);
|
|
115
113
|
});
|
|
116
114
|
});
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const {
|
|
3
|
-
handleCookiesConsent
|
|
4
|
-
} = require("../../../helper/utils");
|
|
2
|
+
const { handleCookiesConsent } = require("../../../helper/utils");
|
|
5
3
|
|
|
6
|
-
describe("userInteraction - mouseOverElement", function() {
|
|
7
|
-
|
|
8
|
-
it("Preparation", async function() {
|
|
4
|
+
describe("userInteraction - mouseOverElement", function () {
|
|
5
|
+
it("Preparation", async function () {
|
|
9
6
|
await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.Button/sample/sap.m.sample.Button");
|
|
10
7
|
await handleCookiesConsent();
|
|
11
8
|
});
|
|
12
9
|
|
|
13
|
-
it("Execution", async function() {
|
|
10
|
+
it("Execution", async function () {
|
|
14
11
|
const selector = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
elementProperties: {
|
|
13
|
+
viewName: "sap.m.sample.Button.Page",
|
|
14
|
+
metadata: "sap.m.Button",
|
|
15
|
+
text: "Accept"
|
|
19
16
|
}
|
|
20
17
|
};
|
|
21
18
|
const index = 0;
|
|
@@ -24,32 +21,31 @@ describe("userInteraction - mouseOverElement", function() {
|
|
|
24
21
|
});
|
|
25
22
|
|
|
26
23
|
it("Verification", async function () {
|
|
27
|
-
const script =
|
|
24
|
+
const script =
|
|
25
|
+
"return document.getElementsByClassName('sapMBtnInner sapMBtnHoverable sapMFocusable sapMBtnText sapMBtnAccept')[0].matches(':hover')";
|
|
28
26
|
const isHover = await util.browser.executeScript(script);
|
|
29
27
|
await common.assertion.expectTrue(isHover);
|
|
30
28
|
});
|
|
31
|
-
|
|
32
29
|
});
|
|
33
30
|
|
|
34
|
-
describe("userInteraction - mouseOverElement - wrong selector", function() {
|
|
35
|
-
|
|
36
|
-
it("Preparation", async function() {
|
|
31
|
+
describe("userInteraction - mouseOverElement - wrong selector", function () {
|
|
32
|
+
it("Preparation", async function () {
|
|
37
33
|
await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.Button/sample/sap.m.sample.Button");
|
|
38
34
|
await handleCookiesConsent();
|
|
39
35
|
});
|
|
40
36
|
|
|
41
|
-
it("Execution & Verification", async function() {
|
|
37
|
+
it("Execution & Verification", async function () {
|
|
42
38
|
const selector = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
elementProperties: {
|
|
40
|
+
viewName: "sap.m.sample.Button.Page",
|
|
41
|
+
metadata: "sap.m.Button",
|
|
42
|
+
text: "WRONG"
|
|
47
43
|
}
|
|
48
44
|
};
|
|
49
45
|
const index = 0;
|
|
50
46
|
const timeout = 5000;
|
|
51
|
-
await expect(ui5.userInteraction.mouseOverElement(selector, index, timeout))
|
|
52
|
-
|
|
47
|
+
await expect(ui5.userInteraction.mouseOverElement(selector, index, timeout)).rejects.toThrow(
|
|
48
|
+
"Function 'mouseOverElement' failed with: No element found for selector"
|
|
49
|
+
);
|
|
53
50
|
});
|
|
54
|
-
|
|
55
|
-
});
|
|
51
|
+
});
|
|
@@ -5,7 +5,7 @@ const {
|
|
|
5
5
|
handleCookiesConsent
|
|
6
6
|
} = require("../../../helper/utils");
|
|
7
7
|
|
|
8
|
-
describe("
|
|
8
|
+
describe("browser - back", function () {
|
|
9
9
|
it("Preparation", async function () {
|
|
10
10
|
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.99.0/");
|
|
11
11
|
await handleCookiesConsent();
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const browser = require("../../../../lib/reuse/modules/util/browser");
|
|
4
|
+
const { handleCookiesConsent } = require("../../../helper/utils");
|
|
5
|
+
|
|
6
|
+
describe("browser - forward", function () {
|
|
7
|
+
it("Preparation", async function () {
|
|
8
|
+
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.99.0/");
|
|
9
|
+
await handleCookiesConsent();
|
|
10
|
+
const selector = {
|
|
11
|
+
elementProperties: {
|
|
12
|
+
viewName: "sap.ui.documentation.sdk.view.App",
|
|
13
|
+
metadata: "sap.m.IconTabFilter",
|
|
14
|
+
text: [
|
|
15
|
+
{
|
|
16
|
+
path: "i18n>APP_TABHEADER_ITEM_DOCUMENTATION"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
await ui5.userInteraction.click(selector);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("Execution & Verification", async function () {
|
|
25
|
+
const nextPageUrl = await util.browser.getCurrentUrl();
|
|
26
|
+
util.console.log(`Current url is : ${nextPageUrl}`);
|
|
27
|
+
await util.browser.back();
|
|
28
|
+
await util.browser.forward();
|
|
29
|
+
const forwardPageUrl = await util.browser.getCurrentUrl();
|
|
30
|
+
util.console.log(`Current url is : ${forwardPageUrl}`);
|
|
31
|
+
common.assertion.expectEqual(nextPageUrl, forwardPageUrl);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -24,6 +24,6 @@ describe("browser - switchToIframe - error case", function () {
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
it("Execution & Verification", async function () {
|
|
27
|
-
await expect(util.browser.switchToIframe("iframe[id*='__uploader']")).rejects.toThrow(
|
|
27
|
+
await expect(util.browser.switchToIframe("iframe[id*='__uploader']")).rejects.toThrow(`Function 'switchToIframe' failed with: element ("iframe[id*='__uploader']") still not displayed after 30000ms`);
|
|
28
28
|
});
|
|
29
29
|
});
|
|
@@ -137,6 +137,6 @@ describe("browser - switchToNewWindow - error case", function () {
|
|
|
137
137
|
|
|
138
138
|
it("Execution & Verification", async function () {
|
|
139
139
|
await expect(util.browser.switchToNewWindow("Wrong Title"))
|
|
140
|
-
.rejects.toThrow(/Function 'switchToNewWindow' failed
|
|
140
|
+
.rejects.toThrow(/Function 'switchToNewWindow' failed with/);
|
|
141
141
|
});
|
|
142
142
|
});
|
|
@@ -2,8 +2,8 @@ const path = require("path");
|
|
|
2
2
|
const merge = require("deepmerge");
|
|
3
3
|
const profile = require("../../../helper/configurations/chrome.headless.conf");
|
|
4
4
|
exports.config = merge(profile.config, {
|
|
5
|
-
maxInstances:
|
|
6
|
-
specFileRetries:
|
|
5
|
+
maxInstances: 1,
|
|
6
|
+
specFileRetries: 0,
|
|
7
7
|
|
|
8
8
|
baseUrl: "https://sapui5.hana.ondemand.com/1.99.0/",
|
|
9
9
|
|
|
@@ -23,6 +23,7 @@ exports.config = merge(profile.config, {
|
|
|
23
23
|
path.resolve(__dirname, "switchToIframe.spec.js"),
|
|
24
24
|
path.resolve(__dirname, "switchToDefaultContent.spec.js"),
|
|
25
25
|
path.resolve(__dirname, "back.spec.js"),
|
|
26
|
-
path.resolve(__dirname, "log.spec.js")
|
|
26
|
+
path.resolve(__dirname, "log.spec.js"),
|
|
27
|
+
path.resolve(__dirname, "forward.spec.js")
|
|
27
28
|
]
|
|
28
29
|
});
|
|
@@ -58,7 +58,7 @@ describe("component - loadEntryPoint - error case", function () {
|
|
|
58
58
|
const folderPath = path.resolve(os.tmpdir(), "entrypointsLoad");
|
|
59
59
|
|
|
60
60
|
it("Execution & Verification", async function () {
|
|
61
|
-
await expect(util.component.loadEntryPoint(folderPath)).rejects.toThrow("Function '
|
|
61
|
+
await expect(util.component.loadEntryPoint(folderPath)).rejects.toThrow("Function 'loadEntryPoint' failed with:");
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
});
|
|
@@ -27,7 +27,7 @@ describe("component - storeEntryPoint - error case", function () {
|
|
|
27
27
|
|
|
28
28
|
it("Execution & Verification", async function () {
|
|
29
29
|
await expect(util.component.storeEntryPoint(undefined, folderPath))
|
|
30
|
-
.rejects.toThrow("Function '
|
|
30
|
+
.rejects.toThrow("Function 'storeEntryPoint' failed with:");
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
it("Cleanup", async function () {
|
|
@@ -16,14 +16,10 @@ describe("data - readDataFromFile", function () {
|
|
|
16
16
|
it("Verification", function () {
|
|
17
17
|
common.assertion.expectEqual(dataAct, dataExp);
|
|
18
18
|
});
|
|
19
|
-
|
|
20
19
|
});
|
|
21
20
|
|
|
22
21
|
describe("data - readDataFromFile - error case", function () {
|
|
23
|
-
|
|
24
22
|
it("Execution and Verification", async function () {
|
|
25
|
-
await expect(util.data.readDataFromFile("data/no-such-file.json"))
|
|
26
|
-
.rejects.toThrow("Function 'readDataFromFile' failed:");
|
|
23
|
+
await expect(util.data.readDataFromFile("data/no-such-file.json")).rejects.toThrow("Function 'readDataFromFile' failed with:");
|
|
27
24
|
});
|
|
28
|
-
|
|
29
|
-
});
|
|
25
|
+
});
|
|
@@ -17,16 +17,12 @@ describe("data - writeDataToFile", function () {
|
|
|
17
17
|
it("Cleanup", async function () {
|
|
18
18
|
fs.unlinkSync(path.resolve(__dirname, filename));
|
|
19
19
|
});
|
|
20
|
-
|
|
21
20
|
});
|
|
22
21
|
|
|
23
22
|
describe("data - writeDataToFile - error case", function () {
|
|
24
|
-
|
|
25
23
|
const data = { purchaseOrder: "123456" };
|
|
26
24
|
|
|
27
25
|
it("Execution and Verification", async function () {
|
|
28
|
-
await expect(util.data.writeDataToFile("no-such-folder/test-out.json", data))
|
|
29
|
-
.rejects.toThrow("Function 'writeDataToFile' failed:");
|
|
26
|
+
await expect(util.data.writeDataToFile("no-such-folder/test-out.json", data)).rejects.toThrow("Function 'writeDataToFile' failed with:");
|
|
30
27
|
});
|
|
31
|
-
|
|
32
|
-
});
|
|
28
|
+
});
|
|
@@ -9,6 +9,6 @@ describe("file - expectTextDataToContain - Expect the passed .txt file to contai
|
|
|
9
9
|
describe("file - expectTextDataToContain - Expect the passed .txt file to not contain a certain value", function () {
|
|
10
10
|
it("Preperation & Execution & Verification", async function () {
|
|
11
11
|
const pathToFile = path.resolve(__dirname, "./testFiles/test3.txt");
|
|
12
|
-
await expect(util.file.expectTextDataToContain(pathToFile, "STREET 000")).rejects.toThrowError(
|
|
12
|
+
await expect(util.file.expectTextDataToContain(pathToFile, "STREET 000")).rejects.toThrowError("Function 'expectTextDataToContain' failed with: Search String not included in .txt file.");
|
|
13
13
|
});
|
|
14
14
|
});
|
|
@@ -34,6 +34,6 @@ describe("file - getTextData - checkFileEnding - Assert correct file ending", fu
|
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
it("Execution & Verification", async () => {
|
|
37
|
-
await expect(util.file.getTextData(pathToFile)).rejects.toThrowError(
|
|
37
|
+
await expect(util.file.getTextData(pathToFile)).rejects.toThrowError("Function 'getTextData' failed with: Wrong file format 'xml' was passed to function. Expected file format: txt.");
|
|
38
38
|
});
|
|
39
39
|
});
|
|
@@ -47,6 +47,6 @@ describe("file - getXmlData - checkFileEnding - Assert correct file ending", fun
|
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
it("Execution & Verification", async () => {
|
|
50
|
-
await expect(util.file.getXmlData(pathToFile)).rejects.toThrowError(
|
|
50
|
+
await expect(util.file.getXmlData(pathToFile)).rejects.toThrowError("Function 'getXmlData' failed with: Wrong file format 'txt' was passed to function. Expected file format: xml.");
|
|
51
51
|
});
|
|
52
52
|
});
|
|
@@ -51,7 +51,7 @@ describe("formatter - extractNumberFromString", function () {
|
|
|
51
51
|
|
|
52
52
|
describe("extractNumberFromString - unhappy case (throws an error in case called with no arguments)", async function () {
|
|
53
53
|
it("Preparation", function () {
|
|
54
|
-
expectedError = "Function 'extractNumberFromString' failed: Incorrect or missing arguments.";
|
|
54
|
+
expectedError = "Function 'extractNumberFromString' failed with: Incorrect or missing arguments.";
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
it("Execution & Verification", async function () {
|
|
@@ -64,4 +64,4 @@ describe("formatter - extractNumberFromString", function () {
|
|
|
64
64
|
await common.assertion.expectEqual(error, expectedError);
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
|
-
});
|
|
67
|
+
});
|
|
@@ -28,7 +28,7 @@ describe("formatter - sliceStringAfter", function () {
|
|
|
28
28
|
input = "abcd1234xyz";
|
|
29
29
|
slicePoint = "s";
|
|
30
30
|
length = 4;
|
|
31
|
-
expectedError = `Char '${slicePoint}' not found in input '${input}'.`;
|
|
31
|
+
expectedError = `Function 'sliceStringAfter' failed with: Char '${slicePoint}' not found in input '${input}'.`;
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
it("Execution & Verification", async function () {
|
|
@@ -46,7 +46,7 @@ describe("formatter - sliceStringAfter", function () {
|
|
|
46
46
|
it("Preparation", function () {
|
|
47
47
|
input = "abcd1234xyz";
|
|
48
48
|
slicePoint = "12";
|
|
49
|
-
expectedError =
|
|
49
|
+
expectedError = "Function 'sliceStringAfter' failed with: Incorrect or missing arguments.";
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
it("Execution & Verification", async function () {
|
|
@@ -28,7 +28,7 @@ describe("formatter - sliceStringAt", function () {
|
|
|
28
28
|
input = "abcd1234xyz";
|
|
29
29
|
slicePoint = "s";
|
|
30
30
|
length = 4;
|
|
31
|
-
expectedError = `Char '${slicePoint}' not found in input '${input}'.`;
|
|
31
|
+
expectedError = `Function 'sliceStringAt' failed with: Char '${slicePoint}' not found in input '${input}'.`;
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
it("Execution & Verification", async function () {
|
|
@@ -46,7 +46,7 @@ describe("formatter - sliceStringAt", function () {
|
|
|
46
46
|
it("Preparation", function () {
|
|
47
47
|
input = "abcd1234xyz";
|
|
48
48
|
slicePoint = "12";
|
|
49
|
-
expectedError = `Function 'sliceStringAt' failed: Incorrect or missing arguments.`;
|
|
49
|
+
expectedError = `Function 'sliceStringAt' failed with: Incorrect or missing arguments.`;
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
it("Execution & Verification", async function () {
|
|
@@ -21,7 +21,7 @@ describe("formatter - trimString", function () {
|
|
|
21
21
|
|
|
22
22
|
describe("trimString - unhappy case (call function with no arguments)", async function () {
|
|
23
23
|
it("Preparation", function () {
|
|
24
|
-
expectedError = "Function 'trimString' failed: Incorrect or missing arguments.";
|
|
24
|
+
expectedError = "Function 'trimString' failed with: Incorrect or missing arguments.";
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
it("Execution & Verification", async function () {
|
|
@@ -34,4 +34,4 @@ describe("formatter - trimString", function () {
|
|
|
34
34
|
await common.assertion.expectEqual(error, expectedError);
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
|
-
});
|
|
37
|
+
});
|
|
File without changes
|
|
File without changes
|