@sap_oss/wdio-qmate-service 2.1.1 → 2.2.1
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 +118 -28
- package/docs/index.md +2 -3
- package/lib/reuse/modules/common/userInteraction.d.ts +3 -3
- package/lib/reuse/modules/common/userInteraction.js +19 -18
- package/lib/reuse/modules/common/userInteraction.js.map +1 -1
- package/lib/reuse/modules/nonUi5/element.d.ts +11 -1
- package/lib/reuse/modules/nonUi5/element.js +14 -1
- package/lib/reuse/modules/nonUi5/element.js.map +1 -1
- package/lib/reuse/modules/nonUi5/userInteraction.d.ts +30 -11
- package/lib/reuse/modules/nonUi5/userInteraction.js +251 -155
- package/lib/reuse/modules/nonUi5/userInteraction.js.map +1 -1
- package/lib/reuse/modules/ui5/userInteraction.d.ts +41 -21
- package/lib/reuse/modules/ui5/userInteraction.js +95 -45
- package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
- package/package.json +1 -1
- package/test/helper/website/checkBox.html +9 -1
- package/test/reuse/nonUi5/userInteraction/check.spec.js +44 -0
- package/test/reuse/nonUi5/userInteraction/clear.spec.js +4 -4
- package/test/reuse/nonUi5/userInteraction/clearAndFill.spec.js +22 -18
- package/test/reuse/nonUi5/userInteraction/clearAndFillAndRetry.spec.js +11 -13
- package/test/reuse/nonUi5/userInteraction/clearAndRetry.spec.js +5 -4
- package/test/reuse/nonUi5/userInteraction/click.spec.js +7 -9
- package/test/reuse/nonUi5/userInteraction/clickAndRetry.spec.js +8 -9
- package/test/reuse/nonUi5/userInteraction/fill.spec.js +5 -5
- package/test/reuse/nonUi5/userInteraction/fillAndRetry.spec.js +8 -9
- package/test/reuse/nonUi5/userInteraction/mouseOverElement.spec.js +8 -13
- package/test/reuse/nonUi5/userInteraction/moveCursorAndClick.spec.js +4 -6
- package/test/reuse/nonUi5/userInteraction/scrollToElement.spec.js +2 -4
- package/test/reuse/nonUi5/userInteraction/test.userInteraction.conf.js +46 -40
- package/test/reuse/nonUi5/userInteraction/uncheck.spec.js +44 -0
- package/test/reuse/ui5/userInteraction/check.spec.js +66 -0
- package/test/reuse/ui5/userInteraction/test.userInteraction.conf.js +3 -1
- package/test/reuse/ui5/userInteraction/test.userInteraction.sauceLab.conf.js +5 -4
- package/test/reuse/ui5/userInteraction/uncheck.spec.js +66 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const errorNoValue = "Function 'clearAndFillAndRetry' failed with: value is invalid. It must be of type 'string' or 'number'";
|
|
4
|
+
|
|
5
|
+
describe("userInteraction - clearAndFillAndRetry - form field", function () {
|
|
4
6
|
let element;
|
|
5
7
|
it("Preparation", async function () {
|
|
6
8
|
await common.navigation.navigateToUrl("http://localhost:34005/forms.html");
|
|
@@ -22,7 +24,7 @@ describe("userInteraction - clearAndFillAndRetry form field", function () {
|
|
|
22
24
|
});
|
|
23
25
|
});
|
|
24
26
|
|
|
25
|
-
describe("userInteraction - clearAndFillAndRetry
|
|
27
|
+
describe("userInteraction - clearAndFillAndRetry - no value/with wrong value (error case)", function () {
|
|
26
28
|
let element;
|
|
27
29
|
it("Preparation", async function () {
|
|
28
30
|
await common.navigation.navigateToUrl("http://localhost:34005/forms.html");
|
|
@@ -31,27 +33,23 @@ describe("userInteraction - clearAndFillAndRetry without value/with wrong value
|
|
|
31
33
|
|
|
32
34
|
it("Execution & Verification", async function () {
|
|
33
35
|
// Negative case - empty value
|
|
34
|
-
await expect(nonUi5.userInteraction.clearAndFillAndRetry(element, null, 1))
|
|
35
|
-
.rejects.toThrow("Retries done. Failed to execute the function: Error: Function 'clearAndFill' failed: Please provide an element and value(datatype - number/string) as arguments."); // undefined !== "" in the inner verification
|
|
36
|
+
await expect(nonUi5.userInteraction.clearAndFillAndRetry(element, null, 1)).rejects.toThrow(errorNoValue);
|
|
36
37
|
|
|
37
|
-
await expect(nonUi5.userInteraction.clearAndFillAndRetry(element))
|
|
38
|
-
.rejects.toThrow("Retries done. Failed to execute the function: Error: Function 'clearAndFill' failed: Please provide an element and value(datatype - number/string) as arguments."); // undefined !== "" in the inner verification
|
|
38
|
+
await expect(nonUi5.userInteraction.clearAndFillAndRetry(element)).rejects.toThrow(errorNoValue);
|
|
39
39
|
|
|
40
|
-
await nonUi5.userInteraction.clearAndFillAndRetry(element, 1, 1);
|
|
40
|
+
await nonUi5.userInteraction.clearAndFillAndRetry(element, 1, 1);
|
|
41
41
|
|
|
42
|
-
await expect(nonUi5.userInteraction.clearAndFillAndRetry(element, true, 1))
|
|
43
|
-
.rejects.toThrow("Retries done. Failed to execute the function: Error: Function 'clearAndFill' failed: Please provide an element and value(datatype - number/string) as arguments.");
|
|
42
|
+
await expect(nonUi5.userInteraction.clearAndFillAndRetry(element, true, 1)).rejects.toThrow(errorNoValue);
|
|
44
43
|
});
|
|
45
44
|
});
|
|
46
45
|
|
|
47
|
-
describe("userInteraction - clearAndFillAndRetry
|
|
46
|
+
describe("userInteraction - clearAndFillAndRetry - button (error case)", function () {
|
|
48
47
|
it("Preparation", async function () {
|
|
49
48
|
await common.navigation.navigateToUrl("http://localhost:34005/buttons.html");
|
|
50
49
|
});
|
|
51
50
|
|
|
52
51
|
it("Execution & Verification", async function () {
|
|
53
52
|
const elem = await nonUi5.element.getById("Default", 10000);
|
|
54
|
-
await expect(nonUi5.userInteraction.clearAndFillAndRetry(elem, "New test value", 1))
|
|
55
|
-
.rejects.toThrow("Retries done. Failed to execute the function: Error: Function 'clearAndFill' failed: invalid element state: invalid element state");
|
|
53
|
+
await expect(nonUi5.userInteraction.clearAndFillAndRetry(elem, "New test value", 1)).rejects.toThrow("Retries done. Failed to execute the function: Error: Function 'clearAndFill' failed with: invalid element state");
|
|
56
54
|
});
|
|
57
|
-
});
|
|
55
|
+
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
describe("userInteraction - clearAndRetry form field", function () {
|
|
3
|
+
describe("userInteraction - clearAndRetry - form field", function () {
|
|
4
4
|
let element;
|
|
5
|
+
|
|
5
6
|
it("Preparation", async function () {
|
|
6
7
|
await common.navigation.navigateToUrl("http://localhost:34005/forms.html");
|
|
7
8
|
element = await nonUi5.element.getById("ExampleValue1", 10000);
|
|
@@ -19,18 +20,18 @@ describe("userInteraction - clearAndRetry form field", function () {
|
|
|
19
20
|
});
|
|
20
21
|
});
|
|
21
22
|
|
|
22
|
-
describe("userInteraction - clearAndRetry
|
|
23
|
+
describe("userInteraction - clearAndRetry - no element (unhappy case)", function () {
|
|
23
24
|
it("Preparation", async function () {
|
|
24
25
|
await common.navigation.navigateToUrl("http://localhost:34005/forms.html");
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
it("Execution & Verification", async function () {
|
|
28
29
|
await expect(nonUi5.userInteraction.clearAndRetry())
|
|
29
|
-
.rejects.toThrow("Function 'clearAndRetry' failed: Please provide an element as first argument.");
|
|
30
|
+
.rejects.toThrow("Function 'clearAndRetry' failed with: Please provide an element as first argument.");
|
|
30
31
|
});
|
|
31
32
|
});
|
|
32
33
|
|
|
33
|
-
describe("userInteraction - clearAndRetry
|
|
34
|
+
describe("userInteraction - clearAndRetry - button (unhappy case)", function () {
|
|
34
35
|
it("Preparation", async function () {
|
|
35
36
|
await common.navigation.navigateToUrl("http://localhost:34005/buttons.html");
|
|
36
37
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
describe("userInteraction - click
|
|
3
|
+
describe("userInteraction - click - 'Default' button", function () {
|
|
4
4
|
it("Preparation", async function () {
|
|
5
5
|
await common.navigation.navigateToUrl("http://localhost:34005/buttons.html");
|
|
6
6
|
});
|
|
@@ -16,30 +16,28 @@ describe("userInteraction - click on 'Default' button", function () {
|
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
describe("userInteraction - click
|
|
19
|
+
describe("userInteraction - click - disabled button (unhappy case)", function () {
|
|
20
20
|
it("Preparation", async function () {
|
|
21
21
|
await common.navigation.navigateToUrl("http://localhost:34005/buttons.html");
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
it("Execution & Verification", async function () {
|
|
25
25
|
const elem = await nonUi5.element.getById("Not-clickable", 10000);
|
|
26
|
-
await expect(nonUi5.userInteraction.click(elem))
|
|
27
|
-
.rejects.toThrow(/Timeout \w*|\d* by waiting for element is clickable/); // \w*|\d* - placeholder for timeout value
|
|
26
|
+
await expect(nonUi5.userInteraction.click(elem)).rejects.toThrow(/Timeout \w*|\d* by waiting for element is clickable/); // \w*|\d* - placeholder for timeout value
|
|
28
27
|
});
|
|
29
28
|
});
|
|
30
29
|
|
|
31
|
-
describe("userInteraction - click
|
|
30
|
+
describe("userInteraction - click - empty value", function () {
|
|
32
31
|
it("Preparation", async function () {
|
|
33
32
|
await common.navigation.navigateToUrl("http://localhost:34005/buttons.html");
|
|
34
33
|
});
|
|
35
34
|
|
|
36
35
|
it("Execution & Verification", async function () {
|
|
37
|
-
await expect(nonUi5.userInteraction.click())
|
|
38
|
-
.rejects.toThrow(/not\w*|\d*clickable/);
|
|
36
|
+
await expect(nonUi5.userInteraction.click()).rejects.toThrow("Function 'click' failed with: Please provide an element as first argument.");
|
|
39
37
|
});
|
|
40
38
|
});
|
|
41
39
|
|
|
42
|
-
describe("userInteraction - click
|
|
40
|
+
describe("userInteraction - click - field (fillActive)", function () {
|
|
43
41
|
let element;
|
|
44
42
|
it("Preparation", async function () {
|
|
45
43
|
await common.navigation.navigateToUrl("http://localhost:34005/forms.html");
|
|
@@ -57,4 +55,4 @@ describe("userInteraction - click on field (make it active)", function () {
|
|
|
57
55
|
it("Verification", async function () {
|
|
58
56
|
await nonUi5.assertion.expectValueToBe(element, "New test value", "value");
|
|
59
57
|
});
|
|
60
|
-
});
|
|
58
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
describe("userInteraction - clickAndRetry
|
|
3
|
+
describe("userInteraction - clickAndRetry - 'Default' button", function () {
|
|
4
4
|
it("Preparation", async function () {
|
|
5
5
|
await common.navigation.navigateToUrl("http://localhost:34005/buttons.html");
|
|
6
6
|
});
|
|
@@ -16,31 +16,30 @@ describe("userInteraction - clickAndRetry on 'Default' button", function () {
|
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
describe("userInteraction - clickAndRetry
|
|
19
|
+
describe("userInteraction - clickAndRetry - disabled button (unhappy case)", function () {
|
|
20
20
|
it("Preparation", async function () {
|
|
21
21
|
await common.navigation.navigateToUrl("http://localhost:34005/buttons.html");
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
it("Execution & Verification", async function () {
|
|
25
25
|
const elem = await nonUi5.element.getById("Not-clickable", 10000);
|
|
26
|
-
await expect(nonUi5.userInteraction.clickAndRetry(elem, 1))
|
|
27
|
-
.rejects.toThrow("Retries done. Failed to execute the function: ");
|
|
26
|
+
await expect(nonUi5.userInteraction.clickAndRetry(elem, 1)).rejects.toThrow("Retries done. Failed to execute the function: ");
|
|
28
27
|
});
|
|
29
28
|
});
|
|
30
29
|
|
|
31
|
-
describe("userInteraction - clickAndRetry
|
|
30
|
+
describe("userInteraction - clickAndRetry - empty value", function () {
|
|
32
31
|
it("Preparation", async function () {
|
|
33
32
|
await common.navigation.navigateToUrl("http://localhost:34005/buttons.html");
|
|
34
33
|
});
|
|
35
34
|
|
|
36
35
|
it("Execution & Verification", async function () {
|
|
37
|
-
await expect(nonUi5.userInteraction.clickAndRetry())
|
|
38
|
-
.rejects.toThrow("Function 'clearAndRetry' failed. Please provide an element as first argument.");
|
|
36
|
+
await expect(nonUi5.userInteraction.clickAndRetry()).rejects.toThrow("Function 'clickAndRetry' failed with: Please provide an element as first argument.");
|
|
39
37
|
});
|
|
40
38
|
});
|
|
41
39
|
|
|
42
|
-
describe("userInteraction - clickAndRetry
|
|
40
|
+
describe("userInteraction - clickAndRetry - field (make it active)", function () {
|
|
43
41
|
let element;
|
|
42
|
+
|
|
44
43
|
it("Preparation", async function () {
|
|
45
44
|
await common.navigation.navigateToUrl("http://localhost:34005/forms.html");
|
|
46
45
|
element = await nonUi5.element.getById("ExampleValue1", 10000);
|
|
@@ -57,4 +56,4 @@ describe("userInteraction - clickAndRetry on field (make it active)", function (
|
|
|
57
56
|
it("Verification", async function () {
|
|
58
57
|
await nonUi5.assertion.expectValueToBe(element, "New test value", "value");
|
|
59
58
|
});
|
|
60
|
-
});
|
|
59
|
+
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
describe("userInteraction - fill form field", function () {
|
|
3
|
+
describe("userInteraction - fill - form field", function () {
|
|
4
4
|
let element;
|
|
5
|
+
|
|
5
6
|
it("Preparation", async function () {
|
|
6
7
|
await common.navigation.navigateToUrl("http://localhost:34005/forms.html");
|
|
7
8
|
element = await nonUi5.element.getById("ExampleValue1", 10000);
|
|
@@ -24,14 +25,13 @@ describe("userInteraction - fill form field", function () {
|
|
|
24
25
|
});
|
|
25
26
|
});
|
|
26
27
|
|
|
27
|
-
describe.only("userInteraction - fill
|
|
28
|
+
describe.only("userInteraction - fill - button (error case)", function () {
|
|
28
29
|
it("Preparation", async function () {
|
|
29
30
|
await common.navigation.navigateToUrl("http://localhost:34005/buttons.html");
|
|
30
31
|
});
|
|
31
32
|
|
|
32
33
|
it("Execution & Verification", async function () {
|
|
33
34
|
const elem = await nonUi5.element.getById("Default", 10000);
|
|
34
|
-
await expect(nonUi5.userInteraction.fill(elem, "New test value"))
|
|
35
|
-
.rejects.toThrow(/Function fill failed. Element can not be filled - make sure that the selector matches input/);
|
|
35
|
+
await expect(nonUi5.userInteraction.fill(elem, "New test value")).rejects.toThrow(/Function 'fill' failed with: invalid element state/);
|
|
36
36
|
});
|
|
37
|
-
});
|
|
37
|
+
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const errorMessage = "Function 'fillAndRetry' failed with: value is invalid. It must be of type 'string' or 'number'";
|
|
4
|
+
|
|
5
|
+
describe("userInteraction - fillAndRetry - form field", function () {
|
|
4
6
|
let element;
|
|
5
7
|
it("Preparation", async function () {
|
|
6
8
|
await common.navigation.navigateToUrl("http://localhost:34005/forms.html");
|
|
@@ -13,27 +15,24 @@ describe("userInteraction - fillAndRetry form field", function () {
|
|
|
13
15
|
await nonUi5.userInteraction.fillAndRetry(element, "First test value");
|
|
14
16
|
await nonUi5.assertion.expectValueToBe(element, "First test value", "value");
|
|
15
17
|
|
|
16
|
-
await expect(nonUi5.userInteraction.fillAndRetry(element))
|
|
17
|
-
.rejects.toThrow("Function 'fillAndRetry' failed: Please provide an element and value as arguments.");
|
|
18
|
+
await expect(nonUi5.userInteraction.fillAndRetry(element)).rejects.toThrow(errorMessage);
|
|
18
19
|
await nonUi5.assertion.expectValueToBe(element, "First test value", "value");
|
|
19
20
|
|
|
20
21
|
await nonUi5.userInteraction.fillAndRetry(element, "Second test value");
|
|
21
22
|
await nonUi5.assertion.expectValueToBe(element, "Second test value", "value");
|
|
22
23
|
|
|
23
|
-
await expect(nonUi5.userInteraction.fillAndRetry(element))
|
|
24
|
-
.rejects.toThrow("Function 'fillAndRetry' failed: Please provide an element and value as arguments.");
|
|
24
|
+
await expect(nonUi5.userInteraction.fillAndRetry(element)).rejects.toThrow(errorMessage);
|
|
25
25
|
await nonUi5.assertion.expectValueToBe(element, "Second test value", "value");
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
describe("userInteraction - fillAndRetry
|
|
29
|
+
describe("userInteraction - fillAndRetry - button (error case)", function () {
|
|
30
30
|
it("Preparation", async function () {
|
|
31
31
|
await common.navigation.navigateToUrl("http://localhost:34005/buttons.html");
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
it("Execution & Verification", async function () {
|
|
35
35
|
const elem = await nonUi5.element.getById("Default", 10000);
|
|
36
|
-
await expect(nonUi5.userInteraction.fillAndRetry(elem, "New test value", 1))
|
|
37
|
-
.rejects.toThrow("Retries done. Failed to execute the function:");
|
|
36
|
+
await expect(nonUi5.userInteraction.fillAndRetry(elem, "New test value", 1)).rejects.toThrow("Retries done. Failed to execute the function:");
|
|
38
37
|
});
|
|
39
|
-
});
|
|
38
|
+
});
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
describe("userInteraction - mouseOverElement", function() {
|
|
4
|
-
|
|
5
|
-
it("Preparation", async function() {
|
|
3
|
+
describe("userInteraction - mouseOverElement", function () {
|
|
4
|
+
it("Preparation", async function () {
|
|
6
5
|
await common.navigation.navigateToUrl("http://localhost:34005/buttons.html");
|
|
7
6
|
});
|
|
8
7
|
|
|
9
|
-
it("Execution", async function() {
|
|
8
|
+
it("Execution", async function () {
|
|
10
9
|
const elem = await nonUi5.element.getById("Default");
|
|
11
10
|
const index = 0;
|
|
12
11
|
await nonUi5.userInteraction.mouseOverElement(elem, index);
|
|
@@ -17,20 +16,16 @@ describe("userInteraction - mouseOverElement", function() {
|
|
|
17
16
|
const isHover = await util.browser.executeScript(script);
|
|
18
17
|
await common.assertion.expectTrue(isHover);
|
|
19
18
|
});
|
|
20
|
-
|
|
21
19
|
});
|
|
22
20
|
|
|
23
|
-
describe("userInteraction - mouseOverElement - wrong selector", function() {
|
|
24
|
-
|
|
25
|
-
it("Preparation", async function() {
|
|
21
|
+
describe("userInteraction - mouseOverElement - wrong selector", function () {
|
|
22
|
+
it("Preparation", async function () {
|
|
26
23
|
await common.navigation.navigateToUrl("http://localhost:34005/buttons.html");
|
|
27
24
|
});
|
|
28
25
|
|
|
29
|
-
it("Execution & Verification", async function() {
|
|
26
|
+
it("Execution & Verification", async function () {
|
|
30
27
|
const elem = undefined;
|
|
31
28
|
const index = 0;
|
|
32
|
-
await expect(nonUi5.userInteraction.mouseOverElement(elem, index))
|
|
33
|
-
.rejects.toThrow(/Function: 'mouseOverElement' failed:/);
|
|
29
|
+
await expect(nonUi5.userInteraction.mouseOverElement(elem, index)).rejects.toThrow("Function 'mouseOverElement' failed with: Please provide an element as first argument.");
|
|
34
30
|
});
|
|
35
|
-
|
|
36
|
-
});
|
|
31
|
+
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const { handleCookiesConsent } = require("../../../helper/utils");
|
|
2
2
|
|
|
3
|
-
describe("chart tests", function () {
|
|
4
|
-
|
|
3
|
+
describe("userInteraction - moveCursorAndClick - chart tests", function () {
|
|
5
4
|
it("Preparation", async function () {
|
|
6
5
|
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.viz.ui5.controls.VizFrame/sample/sap.viz.sample.Donut");
|
|
7
6
|
await handleCookiesConsent();
|
|
@@ -14,11 +13,10 @@ describe("chart tests", function () {
|
|
|
14
13
|
|
|
15
14
|
it("Verification", async function () {
|
|
16
15
|
const selector = {
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
elementProperties: {
|
|
17
|
+
metadata: "sap.viz.ui5.controls.chartpopover.ContentPanel"
|
|
19
18
|
}
|
|
20
19
|
};
|
|
21
20
|
await ui5.element.getDisplayed(selector);
|
|
22
21
|
});
|
|
23
|
-
|
|
24
|
-
});
|
|
22
|
+
});
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
const { handleCookiesConsent } = require("../../../helper/utils");
|
|
3
3
|
|
|
4
4
|
describe("userInteraction - scrollToElement", function () {
|
|
5
|
-
|
|
6
5
|
let elem;
|
|
7
6
|
|
|
8
7
|
it("Preparation", async function () {
|
|
@@ -22,14 +21,13 @@ describe("userInteraction - scrollToElement", function () {
|
|
|
22
21
|
});
|
|
23
22
|
});
|
|
24
23
|
|
|
25
|
-
describe("locator - scrollToElement
|
|
24
|
+
describe("locator - scrollToElement - wrong element (error case)", function () {
|
|
26
25
|
it("Preparation", async function () {
|
|
27
26
|
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.99.0/test-resources/sap/m/demokit/cart/webapp/index.html#/categories");
|
|
28
27
|
await handleCookiesConsent();
|
|
29
28
|
});
|
|
30
29
|
|
|
31
30
|
it("Execution & Verification", async function () {
|
|
32
|
-
await expect(nonUi5.userInteraction.scrollToElement("*=Legal Disclosure"))
|
|
33
|
-
.rejects.toThrow(/elem.scrollIntoView is not a function/);
|
|
31
|
+
await expect(nonUi5.userInteraction.scrollToElement("*=Legal Disclosure")).rejects.toThrow("Function 'scrollToElement' failed with: element.scrollIntoView is not a function");
|
|
34
32
|
});
|
|
35
33
|
});
|
|
@@ -24,49 +24,55 @@ exports.config = merge(profile.config, {
|
|
|
24
24
|
path.resolve(__dirname, "checkAttributeAndValue.spec.js"),
|
|
25
25
|
path.resolve(__dirname, "scrollToElement.spec.js"),
|
|
26
26
|
path.resolve(__dirname, "rightClick.spec.js"),
|
|
27
|
-
path.resolve(__dirname, "dragAndDrop.spec.js")
|
|
27
|
+
path.resolve(__dirname, "dragAndDrop.spec.js"),
|
|
28
|
+
path.resolve(__dirname, "check.spec.js"),
|
|
29
|
+
path.resolve(__dirname, "uncheck.spec.js"),
|
|
28
30
|
],
|
|
29
31
|
|
|
30
32
|
services: [
|
|
31
|
-
[
|
|
32
|
-
|
|
33
|
-
folders: [{
|
|
34
|
-
mount: "/waitForElements.html",
|
|
35
|
-
path: path.resolve(__dirname, "../../../helper/website/waitForElements.html")
|
|
36
|
-
},
|
|
33
|
+
[
|
|
34
|
+
"static-server",
|
|
37
35
|
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
36
|
+
port: 34005,
|
|
37
|
+
folders: [
|
|
38
|
+
{
|
|
39
|
+
mount: "/waitForElements.html",
|
|
40
|
+
path: path.resolve(__dirname, "../../../helper/website/waitForElements.html")
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
mount: "/buttons.html",
|
|
44
|
+
path: path.resolve(__dirname, "../../../helper/website/buttons.html")
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
mount: "/checkBox.html",
|
|
48
|
+
path: path.resolve(__dirname, "../../../helper/website/checkBox.html")
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
mount: "/dropdown.html",
|
|
52
|
+
path: path.resolve(__dirname, "../../../helper/website/dropdown.html")
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
mount: "/forms.html",
|
|
56
|
+
path: path.resolve(__dirname, "../../../helper/website/forms.html")
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
mount: "/scrollPage.html",
|
|
60
|
+
path: path.resolve(__dirname, "../../../helper/website/scrollPage.html")
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
mount: "/tables.html",
|
|
64
|
+
path: path.resolve(__dirname, "../../../helper/website/tables.html")
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
mount: "/dragAndDropWdioExample.html",
|
|
68
|
+
path: path.resolve(__dirname, "../../../helper/website/dragAndDropWdioExample.html")
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
mount: "/dragAndDropFailing.html",
|
|
72
|
+
path: path.resolve(__dirname, "../../../helper/website/dragAndDropFailing.html")
|
|
73
|
+
}
|
|
74
|
+
]
|
|
68
75
|
}
|
|
69
|
-
|
|
70
|
-
}]
|
|
76
|
+
]
|
|
71
77
|
]
|
|
72
|
-
});
|
|
78
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
describe("userInteraction - uncheck - checkbox (checked)", function () {
|
|
2
|
+
let elem;
|
|
3
|
+
|
|
4
|
+
it("Preparation", async function () {
|
|
5
|
+
await common.navigation.navigateToUrl("http://localhost:34005/checkBox.html");
|
|
6
|
+
elem = await nonUi5.element.getById("checked");
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
it("Execution", async function () {
|
|
10
|
+
await nonUi5.userInteraction.uncheck(elem);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it("Verification", async function () {
|
|
14
|
+
await expect(await nonUi5.element.isSelected(elem)).toBe(false);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
describe("userInteraction - uncheck - checkbox (unchecked)", function () {
|
|
19
|
+
let elem;
|
|
20
|
+
|
|
21
|
+
it("Preparation", async function () {
|
|
22
|
+
await common.navigation.navigateToUrl("http://localhost:34005/checkBox.html");
|
|
23
|
+
elem = await nonUi5.element.getById("unchecked");
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it("Execution", async function () {
|
|
27
|
+
await nonUi5.userInteraction.uncheck(elem);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it("Verification", async function () {
|
|
31
|
+
await expect(await nonUi5.element.isSelected(elem)).toBe(false);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
describe("userInteraction - uncheck - checkbox (error)", function () {
|
|
36
|
+
it("Preparation", async function () {
|
|
37
|
+
await common.navigation.navigateToUrl("http://localhost:34005/checkBox.html");
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("Execution & Verification", async function () {
|
|
41
|
+
const elem = undefined;
|
|
42
|
+
await expect(nonUi5.userInteraction.uncheck(elem, 0, 60000)).rejects.toThrow("Function 'uncheck' failed with: Please provide an element as first argument.");
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const { handleCookiesConsent } = require("../../../helper/utils");
|
|
2
|
+
|
|
3
|
+
describe("userInteraction - check - checkbox (unchecked)", function () {
|
|
4
|
+
const selector = {
|
|
5
|
+
elementProperties: {
|
|
6
|
+
viewName: "sap.m.sample.CheckBox.CheckBoxGroup",
|
|
7
|
+
metadata: "sap.m.CheckBox",
|
|
8
|
+
text: "Option"
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
it("Preparation", async function () {
|
|
13
|
+
await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.CheckBox/sample/sap.m.sample.CheckBox");
|
|
14
|
+
await handleCookiesConsent();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it("Execution", async function () {
|
|
18
|
+
await ui5.userInteraction.check(selector, 0, 60000);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("Verification", async function () {
|
|
22
|
+
await ui5.assertion.expectAttributeToBe(selector, "selected", true);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
describe("userInteraction - check - checkbox (checked)", function () {
|
|
27
|
+
const selector = {
|
|
28
|
+
elementProperties: {
|
|
29
|
+
viewName: "sap.m.sample.CheckBox.CheckBoxGroup",
|
|
30
|
+
metadata: "sap.m.CheckBox",
|
|
31
|
+
text: "Option a"
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
it("Preparation", async function () {
|
|
36
|
+
await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.CheckBox/sample/sap.m.sample.CheckBox");
|
|
37
|
+
await handleCookiesConsent();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("Execution", async function () {
|
|
41
|
+
await ui5.userInteraction.check(selector, 0, 60000);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("Verification", async function () {
|
|
45
|
+
await ui5.assertion.expectAttributeToBe(selector, "selected", true);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
describe("userInteraction - check - checkbox (error)", function () {
|
|
50
|
+
const selector = {
|
|
51
|
+
elementProperties: {
|
|
52
|
+
viewName: "sap.m.sample.CheckBox.CheckBoxGroup",
|
|
53
|
+
metadata: "sap.m.CheckBox",
|
|
54
|
+
text: "_______INVALID_______"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
it("Preparation", async function () {
|
|
59
|
+
await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.CheckBox/sample/sap.m.sample.CheckBox");
|
|
60
|
+
await handleCookiesConsent();
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it("Execution & Verification", async function () {
|
|
64
|
+
await expect(ui5.userInteraction.check(selector, 0, 60000)).rejects.toThrow(/Function 'check' failed with:/);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -32,6 +32,8 @@ exports.config = merge(profile.config, {
|
|
|
32
32
|
path.resolve(__dirname, "doubleClick.spec.js"),
|
|
33
33
|
path.resolve(__dirname, "rightClick.spec.js"),
|
|
34
34
|
path.resolve(__dirname, "mouseOverElement.spec.js"),
|
|
35
|
+
path.resolve(__dirname, "check.spec.js"),
|
|
36
|
+
path.resolve(__dirname, "uncheck.spec.js")
|
|
35
37
|
// path.resolve(__dirname, "dragAndDrop.spec.js")
|
|
36
38
|
]
|
|
37
|
-
});
|
|
39
|
+
});
|
|
@@ -34,13 +34,14 @@ exports.config = merge(profile.config, {
|
|
|
34
34
|
path.resolve(__dirname, "doubleClick.spec.js"),
|
|
35
35
|
path.resolve(__dirname, "rightClick.spec.js"),
|
|
36
36
|
path.resolve(__dirname, "mouseOverElement.spec.js"),
|
|
37
|
+
path.resolve(__dirname, "check.spec.js"),
|
|
38
|
+
path.resolve(__dirname, "uncheck.spec.js")
|
|
37
39
|
// path.resolve(__dirname, "dragAndDrop.spec.js")
|
|
38
40
|
],
|
|
39
41
|
|
|
40
42
|
exclude: [],
|
|
41
43
|
|
|
42
|
-
|
|
43
44
|
mochaOpts: {
|
|
44
|
-
timeout: 2000000
|
|
45
|
-
}
|
|
46
|
-
});
|
|
45
|
+
timeout: 2000000
|
|
46
|
+
}
|
|
47
|
+
});
|