@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.
Files changed (117) hide show
  1. package/lib/reuse/helper/clientsideUI5scripts.js +7 -1
  2. package/lib/reuse/helper/clientsideUI5scripts.js.map +1 -1
  3. package/lib/reuse/helper/errorHandler.d.ts +5 -5
  4. package/lib/reuse/helper/errorHandler.js +56 -18
  5. package/lib/reuse/helper/errorHandler.js.map +1 -1
  6. package/lib/reuse/helper/errorMessages.d.ts +0 -2
  7. package/lib/reuse/helper/errorMessages.js +3 -9
  8. package/lib/reuse/helper/errorMessages.js.map +1 -1
  9. package/lib/reuse/modules/common/navigation.d.ts +1 -0
  10. package/lib/reuse/modules/common/navigation.js +13 -3
  11. package/lib/reuse/modules/common/navigation.js.map +1 -1
  12. package/lib/reuse/modules/common/userInteraction.d.ts +1 -0
  13. package/lib/reuse/modules/common/userInteraction.js +22 -7
  14. package/lib/reuse/modules/common/userInteraction.js.map +1 -1
  15. package/lib/reuse/modules/nonUi5/element.d.ts +1 -0
  16. package/lib/reuse/modules/nonUi5/element.js +27 -20
  17. package/lib/reuse/modules/nonUi5/element.js.map +1 -1
  18. package/lib/reuse/modules/nonUi5/navigation.d.ts +1 -0
  19. package/lib/reuse/modules/nonUi5/navigation.js +6 -1
  20. package/lib/reuse/modules/nonUi5/navigation.js.map +1 -1
  21. package/lib/reuse/modules/nonUi5/userInteraction.d.ts +2 -1
  22. package/lib/reuse/modules/nonUi5/userInteraction.js +22 -20
  23. package/lib/reuse/modules/nonUi5/userInteraction.js.map +1 -1
  24. package/lib/reuse/{helper → modules}/types.js.map +1 -1
  25. package/lib/reuse/modules/ui5/assertion.d.ts +3 -2
  26. package/lib/reuse/modules/ui5/assertion.js +17 -12
  27. package/lib/reuse/modules/ui5/assertion.js.map +1 -1
  28. package/lib/reuse/modules/ui5/element.d.ts +1 -0
  29. package/lib/reuse/modules/ui5/element.js +21 -15
  30. package/lib/reuse/modules/ui5/element.js.map +1 -1
  31. package/lib/reuse/modules/ui5/navigation.d.ts +1 -0
  32. package/lib/reuse/modules/ui5/navigation.js +13 -7
  33. package/lib/reuse/modules/ui5/navigation.js.map +1 -1
  34. package/lib/reuse/modules/ui5/navigationBar.d.ts +1 -0
  35. package/lib/reuse/modules/ui5/navigationBar.js +10 -5
  36. package/lib/reuse/modules/ui5/navigationBar.js.map +1 -1
  37. package/lib/reuse/modules/ui5/session.d.ts +1 -0
  38. package/lib/reuse/modules/ui5/session.js +18 -13
  39. package/lib/reuse/modules/ui5/session.js.map +1 -1
  40. package/lib/reuse/modules/ui5/userInteraction.d.ts +3 -2
  41. package/lib/reuse/modules/ui5/userInteraction.js +16 -17
  42. package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
  43. package/lib/reuse/modules/util/browser.d.ts +8 -0
  44. package/lib/reuse/modules/util/browser.js +16 -1
  45. package/lib/reuse/modules/util/browser.js.map +1 -1
  46. package/lib/reuse/modules/util/data.d.ts +1 -0
  47. package/lib/reuse/modules/util/data.js +10 -8
  48. package/lib/reuse/modules/util/data.js.map +1 -1
  49. package/lib/reuse/modules/util/file.d.ts +1 -0
  50. package/lib/reuse/modules/util/file.js +14 -12
  51. package/lib/reuse/modules/util/file.js.map +1 -1
  52. package/lib/reuse/modules/util/formatter.d.ts +1 -0
  53. package/lib/reuse/modules/util/formatter.js +14 -7
  54. package/lib/reuse/modules/util/formatter.js.map +1 -1
  55. package/lib/reuse/modules/util/function.d.ts +1 -0
  56. package/lib/reuse/modules/util/function.js +12 -1
  57. package/lib/reuse/modules/util/function.js.map +1 -1
  58. package/package.json +1 -1
  59. package/test/reuse/common/navigation/navigateToUrl.spec.js +3 -8
  60. package/test/reuse/common/navigation/navigateToUrlAndRetry.spec.js +7 -5
  61. package/test/reuse/common/userInteraction/clearAndFillActive.spec.js +29 -32
  62. package/test/reuse/common/userInteraction/clearAndFillActiveAndRetry.spec.js +31 -33
  63. package/test/reuse/common/userInteraction/fillActive.spec.js +30 -38
  64. package/test/reuse/common/userInteraction/fillActiveAndRetry.spec.js +24 -30
  65. package/test/reuse/helper/errorHandler/logException.spec.js +23 -17
  66. package/test/reuse/nonUi5/element/getAllDisplayed.spec.js +2 -2
  67. package/test/reuse/nonUi5/element/getByChild.spec.js +2 -2
  68. package/test/reuse/nonUi5/element/getByCssContainingText.spec.js +8 -25
  69. package/test/reuse/nonUi5/element/getByParent.spec.js +17 -12
  70. package/test/reuse/nonUi5/element/test.element.conf.js +0 -2
  71. package/test/reuse/nonUi5/element/test.element.sauceLabs.conf.js +0 -2
  72. package/test/reuse/nonUi5/userInteraction/clearAndFill.spec.js +1 -1
  73. package/test/reuse/nonUi5/userInteraction/clearAndFillAndRetry.spec.js +3 -1
  74. package/test/reuse/nonUi5/userInteraction/clearAndRetry.spec.js +6 -6
  75. package/test/reuse/nonUi5/userInteraction/click.spec.js +3 -1
  76. package/test/reuse/nonUi5/userInteraction/clickAndRetry.spec.js +7 -3
  77. package/test/reuse/nonUi5/userInteraction/fillAndRetry.spec.js +3 -1
  78. package/test/reuse/ui5/assertion/expectAttributeToContain.spec.js +36 -27
  79. package/test/reuse/ui5/assertion/expectBindingContextPathToBe.spec.js +6 -7
  80. package/test/reuse/ui5/assertion/expectBindingPathToBe.spec.js +5 -5
  81. package/test/reuse/ui5/assertion/expectTextToBe.spec.js +1 -1
  82. package/test/reuse/ui5/assertion/expectToBeEnabled.spec.js +39 -35
  83. package/test/reuse/ui5/assertion/expectToBeNotVisible.spec.js +1 -1
  84. package/test/reuse/ui5/assertion/expectValueToBe.spec.js +1 -1
  85. package/test/reuse/ui5/element/getAllDisplayed.spec.js +28 -29
  86. package/test/reuse/ui5/element/getByText.spec.js +2 -3
  87. package/test/reuse/ui5/element/waitForAll.spec.js +1 -1
  88. package/test/reuse/ui5/navigationBar/clickBack.spec.js +1 -1
  89. package/test/reuse/ui5/navigationBar/clickUserIcon.spec.js +1 -1
  90. package/test/reuse/ui5/navigationBar/expectPageTitle.spec.js +1 -1
  91. package/test/reuse/ui5/navigationBar/expectShellHeader.spec.js +3 -3
  92. package/test/reuse/ui5/session/loginFiori.spec.js +1 -0
  93. package/test/reuse/ui5/userInteraction/clearAndFillAndRetry.spec.js +41 -37
  94. package/test/reuse/ui5/userInteraction/clearAndRetry.spec.js +30 -30
  95. package/test/reuse/ui5/userInteraction/clickAndRetry.spec.js +12 -13
  96. package/test/reuse/ui5/userInteraction/clickSelectArrowAndRetry.spec.js +49 -52
  97. package/test/reuse/ui5/userInteraction/fill.spec.js +1 -1
  98. package/test/reuse/ui5/userInteraction/fillAndRetry.spec.js +21 -23
  99. package/test/reuse/ui5/userInteraction/mouseOverElement.spec.js +21 -25
  100. package/test/reuse/util/browser/back.spec.js +1 -1
  101. package/test/reuse/util/browser/forward.spec.js +33 -0
  102. package/test/reuse/util/browser/switchToIframe.spec.js +1 -1
  103. package/test/reuse/util/browser/switchToNewWindow.spec.js +1 -1
  104. package/test/reuse/util/browser/test.browser.conf.js +4 -3
  105. package/test/reuse/util/component/loadEntryPoint.spec.js +1 -1
  106. package/test/reuse/util/component/storeEntryPoint.spec.js +1 -1
  107. package/test/reuse/util/data/readDataFromFile.spec.js +2 -6
  108. package/test/reuse/util/data/writeDataToFile.spec.js +2 -6
  109. package/test/reuse/util/file/expectTextDataToContain.spec.js +1 -1
  110. package/test/reuse/util/file/getTextData.spec.js +1 -1
  111. package/test/reuse/util/file/getXmlData.spec.js +1 -1
  112. package/test/reuse/util/formatter/extractNumberFromString.spec.js +2 -2
  113. package/test/reuse/util/formatter/sliceStringAfter.spec.js +2 -2
  114. package/test/reuse/util/formatter/sliceStringAt.spec.js +2 -2
  115. package/test/reuse/util/formatter/trimString.spec.js +2 -2
  116. /package/lib/reuse/{helper → modules}/types.d.ts +0 -0
  117. /package/lib/reuse/{helper → modules}/types.js +0 -0
@@ -93,19 +93,19 @@ describe("assertion - expectBindingPathToBe with wrong selector (unhappy case)",
93
93
  "wrongData": "123"
94
94
  };
95
95
  await expect(ui5.assertion.expectBindingPathToBe(selector, "items", "/ProductCategories", 0, 5000))
96
- .rejects.toThrow("Function 'expectBindingPathToBe' failed:");
96
+ .rejects.toThrow(`Function 'expectBindingPathToBe' failed with: uiControlExecuteLocator(): No visible elements found with selector: {\"wrongData\":\"123\"} in 5s`);
97
97
 
98
98
  await expect(ui5.assertion.expectBindingPathToBe(123, "items", "/ProductCategories", 0, 5000))
99
- .rejects.toThrow("Function 'expectBindingPathToBe' failed:");
99
+ .rejects.toThrow("Function 'expectBindingPathToBe' failed with:");
100
100
 
101
101
  await expect(ui5.assertion.expectBindingPathToBe(false, "items", "/ProductCategories", 0, 5000))
102
- .rejects.toThrow("Function 'expectBindingPathToBe' failed:");
102
+ .rejects.toThrow("Function 'expectBindingPathToBe' failed with: Please provide a valid selector as argument.");
103
103
 
104
104
  await expect(ui5.assertion.expectBindingPathToBe(null, "items", "/ProductCategories", 0, 5000))
105
- .rejects.toThrow("Function 'expectBindingPathToBe' failed:");
105
+ .rejects.toThrow("Function 'expectBindingPathToBe' failed with: Please provide a valid selector as argument.");
106
106
 
107
107
  await expect(ui5.assertion.expectBindingPathToBe(undefined, "items", "/ProductCategories", 0, 5000))
108
- .rejects.toThrow("Function 'expectBindingPathToBe' failed:");
108
+ .rejects.toThrow("Function 'expectBindingPathToBe' failed with: Please provide a valid selector as argument.");
109
109
  });
110
110
  });
111
111
 
@@ -34,6 +34,6 @@ describe("assertion - expectTextToBe with wrong selector", function () {
34
34
  .rejects.toThrow(/uiControlExecuteLocator\(\): No visible elements found/);
35
35
  wrongSelector = 123;
36
36
  await expect(ui5.assertion.expectTextToBe(wrongSelector, "Watch"))
37
- .rejects.toThrow("Function 'expectAttributeToBe' failed:Error: Function 'getDisplayed' failed: Please provide a valid selector as argument.");
37
+ .rejects.toThrow("Function 'expectTextToBe' failed with: Please provide a valid selector as argument.");
38
38
  });
39
39
  });
@@ -1,23 +1,22 @@
1
1
  "use strict";
2
2
 
3
3
  describe("assertion - expectToBeEnabled", function () {
4
-
5
4
  it("Preparation", async function () {
6
5
  await browser.url("#/categories");
7
6
  const elementSelector = {
8
- "elementProperties": {
9
- "viewName": "sap.ui.demo.cart.view.Home",
10
- "metadata": "sap.m.StandardListItem",
11
- "bindingContextPath": "/ProductCategories*'AC')"
7
+ elementProperties: {
8
+ viewName: "sap.ui.demo.cart.view.Home",
9
+ metadata: "sap.m.StandardListItem",
10
+ bindingContextPath: "/ProductCategories*'AC')"
12
11
  }
13
12
  };
14
13
 
15
14
  await ui5.userInteraction.click(elementSelector); // navigate to products
16
15
 
17
16
  const productSelector = {
18
- "elementProperties": {
19
- "viewName": "sap.ui.demo.cart.view.Category",
20
- "metadata": "sap.m.ObjectStatus"
17
+ elementProperties: {
18
+ viewName: "sap.ui.demo.cart.view.Category",
19
+ metadata: "sap.m.ObjectStatus"
21
20
  }
22
21
  };
23
22
 
@@ -26,12 +25,14 @@ describe("assertion - expectToBeEnabled", function () {
26
25
 
27
26
  it("Execution & Verification", async function () {
28
27
  const addToCartSelector = {
29
- "elementProperties": {
30
- "viewName": "sap.ui.demo.cart.view.Product",
31
- "metadata": "sap.m.Button",
32
- "text": [{
33
- "path": "i18n>addToCartShort"
34
- }]
28
+ elementProperties: {
29
+ viewName: "sap.ui.demo.cart.view.Product",
30
+ metadata: "sap.m.Button",
31
+ text: [
32
+ {
33
+ path: "i18n>addToCartShort"
34
+ }
35
+ ]
35
36
  }
36
37
  };
37
38
  await ui5.assertion.expectToBeEnabled(addToCartSelector);
@@ -43,10 +44,10 @@ describe("assertion - expectToBeEnabled when element not enabled (unhappy case)"
43
44
  await browser.url("#/categories");
44
45
 
45
46
  const cartSelector = {
46
- "elementProperties": {
47
- "viewName": "sap.ui.demo.cart.view.Welcome",
48
- "metadata": "sap.ui.core.Icon",
49
- "src": "sap-icon://cart"
47
+ elementProperties: {
48
+ viewName: "sap.ui.demo.cart.view.Welcome",
49
+ metadata: "sap.ui.core.Icon",
50
+ src: "sap-icon://cart"
50
51
  }
51
52
  };
52
53
  await ui5.userInteraction.click(cartSelector); // Navigate to shopping cart
@@ -54,14 +55,13 @@ describe("assertion - expectToBeEnabled when element not enabled (unhappy case)"
54
55
 
55
56
  it("Execution & Verification", async function () {
56
57
  const selectorForNotEnabledElement = {
57
- "elementProperties": {
58
- "viewName": "sap.ui.demo.cart.view.Cart",
59
- "metadata": "sap.m.Button",
60
- "id": "*editButton"
58
+ elementProperties: {
59
+ viewName: "sap.ui.demo.cart.view.Cart",
60
+ metadata: "sap.m.Button",
61
+ id: "*editButton"
61
62
  }
62
63
  };
63
- await expect(ui5.assertion.expectToBeEnabled(selectorForNotEnabledElement))
64
- .rejects.toThrow(/Expect\w+|\d+true\w+|\d+Received\w+|\d+false/);
64
+ await expect(ui5.assertion.expectToBeEnabled(selectorForNotEnabledElement)).rejects.toThrow(/Expect\w+|\d+true\w+|\d+Received\w+|\d+false/);
65
65
  });
66
66
  });
67
67
 
@@ -72,19 +72,23 @@ describe("assertion - expectToBeEnabled with wrong selector (unhappy case)", fun
72
72
 
73
73
  it("Execution & Verification", async function () {
74
74
  const selectorForNonExistingElement = {
75
- "elementProperties": {
76
- "viewName": "sap.ui.demo.cart.view.Product",
77
- "metadata": "sap.m.ObjectAttribute",
78
- "title": [{
79
- "path": "i18n>productMeasuresAttributeText"
80
- }]
75
+ elementProperties: {
76
+ viewName: "sap.ui.demo.cart.view.Product",
77
+ metadata: "sap.m.ObjectAttribute",
78
+ title: [
79
+ {
80
+ path: "i18n>productMeasuresAttributeText"
81
+ }
82
+ ]
81
83
  }
82
84
  };
83
- await expect(ui5.assertion.expectToBeEnabled(selectorForNonExistingElement))
84
- .rejects.toThrow(/uiControlExecuteLocator\(\): No visible elements found/);
85
+ await expect(ui5.assertion.expectToBeEnabled(selectorForNonExistingElement)).rejects.toThrow(
86
+ /uiControlExecuteLocator\(\): No visible elements found/
87
+ );
85
88
 
86
89
  const wrongSelector = 123;
87
- await expect(ui5.assertion.expectToBeEnabled(wrongSelector))
88
- .rejects.toThrow("Function 'expectAttributeToBe' failed:Error: Function 'getDisplayed' failed: Please provide a valid selector as argument.");
90
+ await expect(ui5.assertion.expectToBeEnabled(wrongSelector)).rejects.toThrow(
91
+ "Function 'expectToBeEnabled' failed with: Please provide a valid selector as argument."
92
+ );
89
93
  });
90
- });
94
+ });
@@ -30,7 +30,7 @@ describe("assertion - expectToBeNotVisible - visible element (negative case)", f
30
30
  }
31
31
  };
32
32
  await expect(ui5.assertion.expectToBeNotVisible(selectorForVisibleElement))
33
- .rejects.toThrow("Function 'expectToBeNotVisible' failed");
33
+ .rejects.toThrow("Function 'expectToBeNotVisible' failed with:");
34
34
  });
35
35
  });
36
36
 
@@ -52,6 +52,6 @@ describe("assertion - expectValueToBe with wrong selector (unhappy case)", funct
52
52
  .rejects.toThrow(/uiControlExecuteLocator\(\): No visible elements found/);
53
53
  wrongSelector = 123;
54
54
  await expect(ui5.assertion.expectValueToBe(wrongSelector, "Watch"))
55
- .rejects.toThrow("Function 'expectAttributeToBe' failed:Error: Function 'getDisplayed' failed: Please provide a valid selector as argument.");
55
+ .rejects.toThrow("Function 'expectValueToBe' failed with: Please provide a valid selector as argument.");
56
56
  });
57
57
  });
@@ -1,71 +1,70 @@
1
1
  "use strict";
2
2
 
3
- describe("element - getAllDisplayed - by selector", function() {
3
+ describe("element - getAllDisplayed - by selector", function () {
4
4
  let elements;
5
5
 
6
- it("Preparation", async function() {
6
+ it("Preparation", async function () {
7
7
  await browser.url("#/categories");
8
8
  });
9
9
 
10
- it("Execution", async function() {
10
+ it("Execution", async function () {
11
11
  const selector = {
12
- "elementProperties": {
13
- "viewName": "sap.ui.demo.cart.view.Home",
14
- "metadata": "sap.m.StandardListItem"
12
+ elementProperties: {
13
+ viewName: "sap.ui.demo.cart.view.Home",
14
+ metadata: "sap.m.StandardListItem"
15
15
  }
16
16
  };
17
17
  elements = await ui5.element.getAllDisplayed(selector);
18
18
  });
19
19
 
20
- it("Verification", async function() {
20
+ it("Verification", async function () {
21
21
  common.assertion.expectDefined(elements);
22
22
  common.assertion.expectDefined(elements.length);
23
23
  });
24
24
  });
25
25
 
26
- describe("element - getAllDisplayed - wrong selector (error case)", function() {
27
- it("Preparation", async function() {
26
+ describe("element - getAllDisplayed - wrong selector (error case)", function () {
27
+ it("Preparation", async function () {
28
28
  await browser.url("#/categories");
29
29
  });
30
30
 
31
- it("Execution & Verification", async function() {
31
+ it("Execution & Verification", async function () {
32
32
  const selector = {
33
- "elementProperties": {
34
- "viewName": "random.View",
35
- "metadata": "sap.m.StandardListItem"
33
+ elementProperties: {
34
+ viewName: "random.View",
35
+ metadata: "sap.m.StandardListItem"
36
36
  }
37
37
  };
38
- await expect(ui5.element.getAllDisplayed(selector))
39
- .rejects.toThrow(/uiControlExecuteLocator\(\): No visible elements found/);
38
+ await expect(ui5.element.getAllDisplayed(selector)).rejects.toThrow(/uiControlExecuteLocator\(\): No visible elements found/);
40
39
  });
41
40
  });
42
41
 
43
- describe("element - getAllDisplayed - invisible elements (error case)", function() {
44
- it("Preparation", async function() {
42
+ describe("element - getAllDisplayed - invisible elements (error case)", function () {
43
+ it("Preparation", async function () {
45
44
  await browser.url("#/categories");
46
45
  });
47
46
 
48
- it("Execution & Verification", async function() {
47
+ it("Execution & Verification", async function () {
49
48
  const selectorForInvisibleElements = {
50
- "elementProperties": {
51
- "metadata": "sap.ui.core.InvisibleText"
49
+ elementProperties: {
50
+ metadata: "sap.ui.core.InvisibleText"
52
51
  }
53
52
  };
54
- await expect(ui5.element.getAllDisplayed(selectorForInvisibleElements))
55
- .rejects.toThrow(/uiControlExecuteLocator\(\): No visible elements found/);
53
+ await expect(ui5.element.getAllDisplayed(selectorForInvisibleElements)).rejects.toThrow(/uiControlExecuteLocator\(\): No visible elements found/);
56
54
  });
57
55
  });
58
56
 
59
- describe("element - getAllDisplayed - empty elementProperties (error case)", function() {
60
- it("Preparation", async function() {
57
+ describe("element - getAllDisplayed - empty elementProperties (error case)", function () {
58
+ it("Preparation", async function () {
61
59
  await browser.url("#/categories");
62
60
  });
63
61
 
64
- it("Execution & Verification", async function() {
62
+ it("Execution & Verification", async function () {
65
63
  const selector = {
66
- "elementProperties": {}
64
+ elementProperties: {}
67
65
  };
68
- await expect(ui5.element.getAllDisplayed(selector))
69
- .rejects.toThrow(/Function 'getAllDisplayed' failed: Error: uiControlExecuteLocator\(\): No visible elements found with selector: /);
66
+ await expect(ui5.element.getAllDisplayed(selector)).rejects.toThrow(
67
+ `Function 'getAllDisplayed' failed with: uiControlExecuteLocator(): No visible elements found with selector: {\"elementProperties\":{}} in 30s`
68
+ );
70
69
  });
71
- });
70
+ });
@@ -19,10 +19,9 @@ describe("element - getByText should get element by right text", function () {
19
19
  it("Execution", async function () {
20
20
  // Note: error in safari macOS: Error: getByText(): No elements found for given text.
21
21
  elementByRightName = await ui5.element.getByText(selectorForAllListItems, textToGetElement);
22
-
23
22
  elementText = await elementByRightName.getText();
24
23
  await expect(ui5.element.getByText(selectorForAllListItems, textToGetElement, 1))
25
- .rejects.toThrow(/getByText\(\): Index out of bound./); // Element with text "Laptops\n11" is unique
24
+ .rejects.toThrow(`Function 'getByText' failed with: Index out of bound. Cannot get element by text Laptops`); // Element with text "Laptops\n11" is unique
26
25
  });
27
26
 
28
27
  it("Verification", function () {
@@ -62,6 +61,6 @@ describe("element - getByText with index 1 (unhappy case)", function () {
62
61
  const timeout = 30000;
63
62
 
64
63
  await expect(ui5.element.getByText(selector, value, index, timeout))
65
- .rejects.toThrow(/getByText\(\): Index out of bound./);
64
+ .rejects.toThrow(`Function 'getByText' failed with: Index out of bound. Cannot get element by text Gaming Monster at index 1`);
66
65
  });
67
66
  });
@@ -41,6 +41,6 @@ describe("element - waitForAll - error case", function () {
41
41
 
42
42
  it("Execution and Verification", async function () {
43
43
  await expect(ui5.element.waitForAll(selector, 4000))
44
- .rejects.toThrow("Function 'waitForAll' failed");
44
+ .rejects.toThrow("Function 'waitForAll' failed with:");
45
45
  });
46
46
  });
@@ -32,7 +32,7 @@ describe("navigationBar - clickBack - error case", function () {
32
32
 
33
33
  it("Execution & Verification", async function () {
34
34
  await expect(ui5.navigationBar.clickBack())
35
- .rejects.toThrowError(/Function 'clickBack' failed:/);
35
+ .rejects.toThrowError("Function 'clickBack' failed with:");
36
36
  });
37
37
 
38
38
  });
@@ -30,7 +30,7 @@ describe("navigationBar - clickUserIcon - error case", function () {
30
30
 
31
31
  it("Execution & Verification", async function () {
32
32
  await expect(ui5.navigationBar.clickUserIcon())
33
- .rejects.toThrowError(/Function 'clickUserIcon' failed:/);
33
+ .rejects.toThrowError("Function 'clickUserIcon' failed with:");
34
34
  });
35
35
 
36
36
  });
@@ -17,6 +17,6 @@ describe("navigationBar - expectPageTitle - error case", function () {
17
17
 
18
18
  it("Execution & Verification", async function () {
19
19
  await expect(ui5.navigationBar.expectPageTitle("Home"))
20
- .rejects.toThrowError(/Function 'expectPageTitle' failed:/);
20
+ .rejects.toThrowError("Function 'expectPageTitle' failed with:");
21
21
  });
22
22
  });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- describe("navigationBar - expectPageTitle", function () {
3
+ describe("navigationBar - expectShellHeader", function () {
4
4
  it("Preparation", async function () {
5
5
  await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/test-resources/sap/ui/demoapps/demokit/rta/fiori-elements/test/index.html#Shell-home");
6
6
  });
@@ -10,13 +10,13 @@ describe("navigationBar - expectPageTitle", function () {
10
10
  });
11
11
  });
12
12
 
13
- describe("navigationBar - expectPageTitle - error case", function () {
13
+ describe("navigationBar - expectShellHeader - error case", function () {
14
14
  it("Preparation", async function () {
15
15
  await common.navigation.navigateToUrl("https://www.sap.com");
16
16
  });
17
17
 
18
18
  it("Execution & Verification", async function () {
19
19
  await expect(ui5.navigationBar.expectShellHeader())
20
- .rejects.toThrowError(/Function 'expectToBeVisible' failed:/);
20
+ .rejects.toThrowError("Function 'expectShellHeader' failed with:");
21
21
  });
22
22
  });
@@ -34,6 +34,7 @@ describe("session - loginFiori - invalid credentials", function () {
34
34
  });
35
35
 
36
36
  it("Execution & Verification", async function () {
37
+ await ui5.session.loginFiori("Caput", "Draconis");
37
38
  await expect(ui5.session.loginFiori("Caput", "Draconis"))
38
39
  .rejects.toThrow(/Login failed: "Client, name, or password is not correct; log on again"/);
39
40
  });
@@ -1,24 +1,24 @@
1
- const {
2
- handleCookiesConsent
3
- } = require("../../../helper/utils");
4
-
5
-
1
+ const { handleCookiesConsent } = require("../../../helper/utils");
6
2
 
7
3
  describe("userInteraction - clearAndFillAndRetry - smartField", function () {
8
4
  it("Preparation", async function () {
9
- await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.ui.comp.smartfield.SmartField/sample/sap.ui.comp.sample.smartfield.Overview");
5
+ await browser.navigateTo(
6
+ "https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.ui.comp.smartfield.SmartField/sample/sap.ui.comp.sample.smartfield.Overview"
7
+ );
10
8
  await handleCookiesConsent();
11
9
  });
12
10
 
13
11
  it("Execution & Verification", async function () {
14
12
  const selector = {
15
- "elementProperties": {
16
- "viewName": "sap.ui.comp.sample.smartfield.Overview.Main",
17
- "metadata": "sap.ui.comp.smartfield.SmartField",
18
- "id": "*idQuantity",
19
- "value": [{
20
- "path": "Quantity"
21
- }]
13
+ elementProperties: {
14
+ viewName: "sap.ui.comp.sample.smartfield.Overview.Main",
15
+ metadata: "sap.ui.comp.smartfield.SmartField",
16
+ id: "*idQuantity",
17
+ value: [
18
+ {
19
+ path: "Quantity"
20
+ }
21
+ ]
22
22
  }
23
23
  };
24
24
 
@@ -34,15 +34,17 @@ describe("userInteraction - clearAndFillAndRetry - smartField", function () {
34
34
 
35
35
  describe("userInteraction - clearAndFillAndRetry - textarea", function () {
36
36
  it("Preparation", async function () {
37
- await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.ui.comp.smartfield.SmartField/sample/sap.ui.comp.sample.smartfield.Overview");
37
+ await browser.navigateTo(
38
+ "https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.ui.comp.smartfield.SmartField/sample/sap.ui.comp.sample.smartfield.Overview"
39
+ );
38
40
  await handleCookiesConsent();
39
41
  });
40
42
 
41
43
  it("Execution & Verification", async function () {
42
44
  const selector = {
43
- "elementProperties": {
44
- "viewName": "sap.ui.comp.sample.smartfield.Overview.Main",
45
- "metadata": "sap.m.TextArea"
45
+ elementProperties: {
46
+ viewName: "sap.ui.comp.sample.smartfield.Overview.Main",
47
+ metadata: "sap.m.TextArea"
46
48
  }
47
49
  };
48
50
  const value = "My Value";
@@ -63,10 +65,10 @@ describe("userInteraction - clearAndFillAndRetry - input field", function () {
63
65
 
64
66
  it("Execution & Verification", async function () {
65
67
  const selector = {
66
- "elementProperties": {
67
- "viewName": "sap.m.sample.InputDescription.V",
68
- "metadata": "sap.m.Input",
69
- "description": "IT Laptops"
68
+ elementProperties: {
69
+ viewName: "sap.m.sample.InputDescription.V",
70
+ metadata: "sap.m.Input",
71
+ description: "IT Laptops"
70
72
  }
71
73
  };
72
74
  const value = "My Value";
@@ -87,10 +89,10 @@ describe("userInteraction - clearAndFillAndRetry - invalid selector", function (
87
89
 
88
90
  it("Execution & Verification", async function () {
89
91
  const selector = {
90
- "elementProperties": {
91
- "viewName": "sap.m.samplputDescription.V",
92
- "metadata": "sap.put",
93
- "id": "__input4"
92
+ elementProperties: {
93
+ viewName: "sap.m.samplputDescription.V",
94
+ metadata: "sap.put",
95
+ id: "__input4"
94
96
  }
95
97
  };
96
98
  const value = "My Value";
@@ -98,8 +100,9 @@ describe("userInteraction - clearAndFillAndRetry - invalid selector", function (
98
100
  const timeout = 30000;
99
101
  const retries = 1;
100
102
  const interval = 2000;
101
- await expect(ui5.userInteraction.clearAndFillAndRetry(selector, value, index, timeout, retries, interval))
102
- .rejects.toThrow("Retries done. Failed to execute the function");
103
+ await expect(ui5.userInteraction.clearAndFillAndRetry(selector, value, index, timeout, retries, interval)).rejects.toThrow(
104
+ "Retries done. Failed to execute the function"
105
+ );
103
106
  });
104
107
  });
105
108
 
@@ -111,14 +114,14 @@ describe("userInteraction - clearAndFillAndRetry - wrong element", function () {
111
114
 
112
115
  it("Execution & Verification", async function () {
113
116
  const selector = {
114
- "elementProperties": {
115
- "viewName": "sap.m.sample.MenuButton.MB",
116
- "metadata": "sap.m.Button",
117
- "text": "File Menu"
117
+ elementProperties: {
118
+ viewName: "sap.m.sample.MenuButton.MB",
119
+ metadata: "sap.m.Button",
120
+ text: "File Menu"
118
121
  },
119
- "ancestorProperties": {
120
- "metadata": "sap.m.SplitButton",
121
- "viewName": "sap.m.sample.MenuButton.MB"
122
+ ancestorProperties: {
123
+ metadata: "sap.m.SplitButton",
124
+ viewName: "sap.m.sample.MenuButton.MB"
122
125
  }
123
126
  };
124
127
  const value = "My Value";
@@ -126,7 +129,8 @@ describe("userInteraction - clearAndFillAndRetry - wrong element", function () {
126
129
  const timeout = 30000;
127
130
  const retries = 1;
128
131
  const interval = 2000;
129
- await expect(ui5.userInteraction.clearAndFillAndRetry(selector, value, index, timeout, retries, interval))
130
- .rejects.toThrow("Retries done. Failed to execute the function");
132
+ await expect(ui5.userInteraction.clearAndFillAndRetry(selector, value, index, timeout, retries, interval)).rejects.toThrow(
133
+ "Function 'clearAndFillAndRetry' failed with: Retries done. Failed to execute the function:"
134
+ );
131
135
  });
132
- });
136
+ });
@@ -2,35 +2,35 @@ const {
2
2
  handleCookiesConsent
3
3
  } = require("../../../helper/utils");
4
4
 
5
- // describe("userInteraction - clearAndRetry", function () {
6
-
7
- // const selector = {
8
- // "elementProperties": {
9
- // "viewName": "sap.m.sample.InputDescription.V",
10
- // "metadata": "sap.m.Input",
11
- // "description": "IT Laptops"
12
- // }
13
- // };
14
-
15
- // it("Preparation", async function () {
16
- // await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.Input/sample/sap.m.sample.InputDescription");
17
- // await handleCookiesConsent();
18
- // });
19
-
20
- // it("Execution", async function () {
21
- // const index = 0;
22
- // const timeout = 30000;
23
- // const retries = 1;
24
- // const interval = 2000;
25
- // await ui5.userInteraction.clearAndRetry(selector, index, timeout, retries, interval);
26
- // });
27
-
28
- // it("Execution & Verification", async function () {
29
- // await common.userInteraction.pressTab(); // Copy-pasted from vyperForAll tests
30
- // const actualValue = await ui5.element.getValue(selector);
31
- // common.assertion.expectEqual(actualValue, "");
32
- // });
33
- // });
5
+ describe("userInteraction - clearAndRetry", function () {
6
+
7
+ const selector = {
8
+ "elementProperties": {
9
+ "viewName": "sap.m.sample.InputDescription.V",
10
+ "metadata": "sap.m.Input",
11
+ "description": "IT Laptops"
12
+ }
13
+ };
14
+
15
+ it("Preparation", async function () {
16
+ await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.Input/sample/sap.m.sample.InputDescription");
17
+ await handleCookiesConsent();
18
+ });
19
+
20
+ it("Execution", async function () {
21
+ const index = 0;
22
+ const timeout = 30000;
23
+ const retries = 1;
24
+ const interval = 2000;
25
+ await ui5.userInteraction.clearAndRetry(selector, index, timeout, retries, interval);
26
+ });
27
+
28
+ it("Execution & Verification", async function () {
29
+ await common.userInteraction.pressTab(); // Copy-pasted from vyperForAll tests
30
+ const actualValue = await ui5.element.getValue(selector);
31
+ common.assertion.expectEqual(actualValue, "");
32
+ });
33
+ });
34
34
 
35
35
  describe("userInteraction - clearAndRetry with invalid selector", function () {
36
36
 
@@ -52,6 +52,6 @@ describe("userInteraction - clearAndRetry with invalid selector", function () {
52
52
  const retries = 1;
53
53
  const interval = 2000;
54
54
  await expect(ui5.userInteraction.clearAndRetry(selector, index, timeout, retries, interval))
55
- .rejects.toThrow("Retries done. Failed to execute the function:");
55
+ .rejects.toThrow("Function 'clearAndRetry' failed with: Retries done. Failed to execute the function:");
56
56
  });
57
57
  });
@@ -1,7 +1,6 @@
1
1
  const { handleCookiesConsent } = require("../../../helper/utils");
2
2
 
3
3
  describe("userInteraction - click and retry", function () {
4
-
5
4
  it("Preparation", async function () {
6
5
  await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/");
7
6
  await handleCookiesConsent();
@@ -9,10 +8,10 @@ describe("userInteraction - click and retry", function () {
9
8
 
10
9
  it("Execution", async function () {
11
10
  const selector = {
12
- "elementProperties": {
13
- "viewName": "sap.ui.documentation.sdk.view.App",
14
- "metadata": "sap.m.IconTabFilter",
15
- "id": "*apiMasterTab"
11
+ elementProperties: {
12
+ viewName: "sap.ui.documentation.sdk.view.App",
13
+ metadata: "sap.m.IconTabFilter",
14
+ id: "*apiMasterTab"
16
15
  }
17
16
  };
18
17
  const index = 0;
@@ -28,7 +27,6 @@ describe("userInteraction - click and retry", function () {
28
27
  });
29
28
 
30
29
  describe("userInteraction - click and retry on not displayed element", function () {
31
-
32
30
  it("Preparation", async function () {
33
31
  await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/");
34
32
  await handleCookiesConsent();
@@ -36,17 +34,18 @@ describe("userInteraction - click and retry on not displayed element", function
36
34
 
37
35
  it("Execution & Verification", async function () {
38
36
  const selector = {
39
- "elementProperties": {
40
- "viewName": "sap.ui.documentation.sdk.view.ApiDetailInitial",
41
- "metadata": "sap.ui.documentation.TitleLink",
42
- "text": "Main Controls"
37
+ elementProperties: {
38
+ viewName: "sap.ui.documentation.sdk.view.ApiDetailInitial",
39
+ metadata: "sap.ui.documentation.TitleLink",
40
+ text: "Main Controls"
43
41
  }
44
42
  };
45
43
  const index = 0;
46
44
  const timeout = 30000;
47
45
  const retries = 3;
48
46
  const interval = 3000;
49
- await expect(ui5.userInteraction.clickAndRetry(selector, index, timeout, retries, interval))
50
- .rejects.toThrow("Retries done. Failed to execute the function");
47
+ await expect(ui5.userInteraction.clickAndRetry(selector, index, timeout, retries, interval)).rejects.toThrow(
48
+ "Function 'clickAndRetry' failed with: Retries done. Failed to execute the function:"
49
+ );
51
50
  });
52
- });
51
+ });