@sap_oss/wdio-qmate-service 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/{test/core/package-lock.json → docs/bestPractices/spec.md} +0 -0
- package/docs/doc.md +176 -353
- package/docs/gettingStarted/setup.md +2 -2
- package/docs/index.md +1 -1
- package/docs/sections/bestPractices/authentication.md +151 -0
- package/docs/sections/bestPractices/dataHandling.md +61 -0
- package/docs/sections/bestPractices/selectors.md +44 -0
- package/docs/{contact.md → sections/contact.md} +0 -0
- package/docs/sections/features/advancedDataHandling.md +252 -0
- package/docs/sections/features/config.md +171 -0
- package/docs/sections/features/dataHandling.md +83 -0
- package/docs/{gettingStarted → sections/features}/selectors.md +0 -0
- package/docs/sections/features/spec.md +0 -0
- package/docs/sections/gettingStarted/config.md +18 -0
- package/docs/sections/gettingStarted/execution.md +7 -0
- package/docs/sections/gettingStarted/setup.md +9 -0
- package/docs/sections/gettingStarted/spec.md +31 -0
- package/docs/sections/gettingStarted/specs.md +19 -0
- package/docs/sections/support/bugReporting.md +19 -0
- package/docs/sections/support/knownIssuesAndLimitations.md +0 -0
- package/docs/sections/support/troubleshooting.md +16 -0
- package/docs/sources/images/fiori_form.PNG +0 -0
- package/docs/sources/images/sapCloud_form.PNG +0 -0
- package/lib/index.js +59 -82
- package/lib/index.js.map +1 -1
- package/lib/reuse/authenticator/authHandler.js +12 -23
- package/lib/reuse/authenticator/authHandler.js.map +1 -1
- package/lib/reuse/authenticator/basicUrlAuthenticator.js +21 -32
- package/lib/reuse/authenticator/basicUrlAuthenticator.js.map +1 -1
- package/lib/reuse/authenticator/customAuthenticator.js +42 -55
- package/lib/reuse/authenticator/customAuthenticator.js.map +1 -1
- package/lib/reuse/authenticator/formAuthenticator.js +37 -50
- package/lib/reuse/authenticator/formAuthenticator.js.map +1 -1
- package/lib/reuse/authenticator/plainAuthenticator.js +5 -16
- package/lib/reuse/authenticator/plainAuthenticator.js.map +1 -1
- package/lib/reuse/helper/jsDocGen.js +4 -12
- package/lib/reuse/helper/jsDocGen.js.map +1 -1
- package/lib/reuse/index.js +20 -5
- package/lib/reuse/index.js.map +1 -1
- package/lib/reuse/modules/common/navigation.js +10 -23
- package/lib/reuse/modules/common/navigation.js.map +1 -1
- package/lib/reuse/modules/common/userInteraction.js +40 -73
- package/lib/reuse/modules/common/userInteraction.js.map +1 -1
- package/lib/reuse/modules/nonUi5/assertion.js +31 -52
- package/lib/reuse/modules/nonUi5/assertion.js.map +1 -1
- package/lib/reuse/modules/nonUi5/element.js +266 -331
- package/lib/reuse/modules/nonUi5/element.js.map +1 -1
- package/lib/reuse/modules/nonUi5/navigation.js +10 -21
- package/lib/reuse/modules/nonUi5/navigation.js.map +1 -1
- package/lib/reuse/modules/nonUi5/userInteraction.js +176 -215
- package/lib/reuse/modules/nonUi5/userInteraction.js.map +1 -1
- package/lib/reuse/modules/service/odata.d.ts +106 -94
- package/lib/reuse/modules/service/odata.js +209 -204
- package/lib/reuse/modules/service/odata.js.map +1 -1
- package/lib/reuse/modules/service/rest.js +64 -81
- package/lib/reuse/modules/service/rest.js.map +1 -1
- package/lib/reuse/modules/ui5/assertion.js +217 -268
- package/lib/reuse/modules/ui5/assertion.js.map +1 -1
- package/lib/reuse/modules/ui5/confirmationDialog.js +17 -42
- package/lib/reuse/modules/ui5/confirmationDialog.js.map +1 -1
- package/lib/reuse/modules/ui5/control.js +12 -33
- package/lib/reuse/modules/ui5/control.js.map +1 -1
- package/lib/reuse/modules/ui5/date.js +70 -89
- package/lib/reuse/modules/ui5/date.js.map +1 -1
- package/lib/reuse/modules/ui5/element.js +121 -156
- package/lib/reuse/modules/ui5/element.js.map +1 -1
- package/lib/reuse/modules/ui5/errorDialog.js +4 -17
- package/lib/reuse/modules/ui5/errorDialog.js.map +1 -1
- package/lib/reuse/modules/ui5/footerBar.js +28 -63
- package/lib/reuse/modules/ui5/footerBar.js.map +1 -1
- package/lib/reuse/modules/ui5/mockserver.js +390 -427
- package/lib/reuse/modules/ui5/mockserver.js.map +1 -1
- package/lib/reuse/modules/ui5/navigation.js +105 -132
- package/lib/reuse/modules/ui5/navigation.js.map +1 -1
- package/lib/reuse/modules/ui5/navigationBar.js +58 -77
- package/lib/reuse/modules/ui5/navigationBar.js.map +1 -1
- package/lib/reuse/modules/ui5/qunit.js +16 -27
- package/lib/reuse/modules/ui5/qunit.js.map +1 -1
- package/lib/reuse/modules/ui5/session.js +200 -236
- package/lib/reuse/modules/ui5/session.js.map +1 -1
- package/lib/reuse/modules/ui5/table.js +79 -98
- package/lib/reuse/modules/ui5/table.js.map +1 -1
- package/lib/reuse/modules/ui5/userInteraction.js +264 -335
- package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
- package/lib/reuse/modules/util/browser.js +131 -178
- package/lib/reuse/modules/util/browser.js.map +1 -1
- package/lib/reuse/modules/util/data.js +3 -2
- package/lib/reuse/modules/util/data.js.map +1 -1
- package/lib/reuse/modules/util/file.js +71 -90
- package/lib/reuse/modules/util/file.js.map +1 -1
- package/lib/reuse/modules/util/function.js +68 -87
- package/lib/reuse/modules/util/function.js.map +1 -1
- package/lib/reuse/modules/util/system.js +22 -33
- package/lib/reuse/modules/util/system.js.map +1 -1
- package/lib/scripts/dataExchange/dataExchange.js +145 -160
- package/lib/scripts/dataExchange/dataExchange.js.map +1 -1
- package/lib/scripts/dataExchange/dataExchangeUtil.js +93 -114
- package/lib/scripts/dataExchange/dataExchangeUtil.js.map +1 -1
- package/lib/scripts/hooks/after.js +3 -14
- package/lib/scripts/hooks/after.js.map +1 -1
- package/lib/scripts/hooks/before.js +9 -20
- package/lib/scripts/hooks/before.js.map +1 -1
- package/lib/scripts/hooks/beforeSession.js +7 -18
- package/lib/scripts/hooks/beforeSession.js.map +1 -1
- package/lib/scripts/hooks/onComplete.js +2 -13
- package/lib/scripts/hooks/onComplete.js.map +1 -1
- package/lib/scripts/hooks/onPrepare.js +9 -20
- package/lib/scripts/hooks/onPrepare.js.map +1 -1
- package/lib/scripts/hooks/utils/addLocatorCommands.js +109 -172
- package/lib/scripts/hooks/utils/addLocatorCommands.js.map +1 -1
- package/lib/scripts/hooks/utils/browserLog.js +18 -31
- package/lib/scripts/hooks/utils/browserLog.js.map +1 -1
- package/lib/scripts/hooks/utils/dataExchangeCommands.js +13 -24
- package/lib/scripts/hooks/utils/dataExchangeCommands.js.map +1 -1
- package/lib/scripts/hooks/utils/decryption.d.ts +1 -1
- package/lib/scripts/hooks/utils/decryption.js +33 -14
- package/lib/scripts/hooks/utils/decryption.js.map +1 -1
- package/lib/scripts/hooks/utils/lib.js +249 -272
- package/lib/scripts/hooks/utils/lib.js.map +1 -1
- package/lib/scripts/hooks/utils/locatorCommands.js +154 -183
- package/lib/scripts/hooks/utils/locatorCommands.js.map +1 -1
- package/mkdocs.yml +16 -3
- package/package.json +14 -11
- package/test/authenticator/staticLogin/specs/custom.spec.js +30 -1
- package/test/reuse/nonUi5/element/getById.spec.js +17 -0
- package/test/reuse/service/odata/get.spec.js +61 -0
- package/test/reuse/service/odata/getEntitySet.spec.js +87 -0
- package/test/reuse/service/odata/test.odata.conf.js +15 -0
- package/test/reuse/ui5/confirmationDialog/clickButton.spec.js +87 -0
- package/test/reuse/ui5/confirmationDialog/test.confirmationDialog.conf.js +2 -1
- package/test/reuse/ui5/element/test.element.conf.js +2 -1
- package/test/reuse/ui5/element/waitForAll.spec.js +46 -0
- package/test/reuse/ui5/userInteraction/clearAndFillSmartFieldInputAndRetry.spec.js +28 -0
- package/test/reuse/ui5/userInteraction/test.userInteraction.conf.js +1 -0
- package/test/reuse/util/browser/switchToNewWindow.spec.js +2 -2
- package/test/reuse/util/console/console.spec.js +27 -0
- package/test/reuse/util/console/test.console.conf.js +12 -0
- package/test/reuse/util/data/data/test.secure.json +7 -3
- package/test/reuse/util/data/getSecureData.spec.js +9 -3
- package/test/reuse/util/file/pdfParser.spec.js +33 -8
- package/test/reuse/util/system/system.spec.js +16 -0
- package/test/reuse/util/system/test.system.conf.js +12 -0
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
describe("odata - getEntitySet", function () {
|
|
4
|
+
let srv;
|
|
5
|
+
let res;
|
|
6
|
+
it("Preparation", async function () {
|
|
7
|
+
srv = await service.odata.init(browser.config.baseUrl, "", "", false, {}, "none");
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it("Execution", async function () {
|
|
11
|
+
res = await service.odata.getEntitySet(srv, "People");
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it("Verification", async function () {
|
|
15
|
+
await common.assertion.expectTrue(res.length > 0);
|
|
16
|
+
await common.assertion.expectDefined(res[0].UserName);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
describe("odata - getEntitySet with selected fields", function () {
|
|
22
|
+
let srv;
|
|
23
|
+
let res;
|
|
24
|
+
it("Preparation", async function () {
|
|
25
|
+
srv = await service.odata.init(browser.config.baseUrl, "", "", false, {}, "none");
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("Execution", async function () {
|
|
29
|
+
res = await service.odata.getEntitySet(srv, "People", "", "FirstName,LastName");
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it("Verification", async function () {
|
|
33
|
+
await common.assertion.expectTrue(res.length > 0);
|
|
34
|
+
await common.assertion.expectDefined(res[0].FirstName);
|
|
35
|
+
await common.assertion.expectUndefined(res[0].UserName);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
describe("odata - getEntitySet with filter", function () {
|
|
41
|
+
let srv;
|
|
42
|
+
let resBudgetLow, resBudgetHigh;
|
|
43
|
+
it("Preparation", async function () {
|
|
44
|
+
srv = await service.odata.init(browser.config.baseUrl, "", "", false, {}, "none");
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("Execution", async function () {
|
|
48
|
+
resBudgetLow = await service.odata.getEntitySet(srv, "People", "Trips/any(d:d/Budget gt 3000)");
|
|
49
|
+
resBudgetHigh = await service.odata.getEntitySet(srv, "People", "Trips/any(d:d/Budget gt 300000)");
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it("Verification", async function () {
|
|
53
|
+
await common.assertion.expectTrue(resBudgetLow.length > 0);
|
|
54
|
+
await common.assertion.expectTrue(resBudgetHigh.length === 0);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
describe("odata - getEntitySet with params", function () {
|
|
60
|
+
let srv;
|
|
61
|
+
let res;
|
|
62
|
+
it("Preparation", async function () {
|
|
63
|
+
srv = await service.odata.init(browser.config.baseUrl, "", "", false, {}, "none");
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it("Execution", async function () {
|
|
67
|
+
res = await service.odata.getEntitySet(srv, "People", "", "", { "$top": 2 });
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it("Verification", async function () {
|
|
71
|
+
await common.assertion.expectTrue(res.length === 2);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
describe("odata - getEntitySet - wrong entity set", function () {
|
|
77
|
+
let srv;
|
|
78
|
+
it("Preparation", async function () {
|
|
79
|
+
srv = await service.odata.init(browser.config.baseUrl, "", "", false, {}, "none");
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("Execution and Verification", async function () {
|
|
83
|
+
await expect(service.odata.getEntitySet(srv, "WrongEntitySet"))
|
|
84
|
+
.rejects.toThrow(/No entity set .* available in service/);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const merge = require("deepmerge");
|
|
3
|
+
const profile = require("../../../helper/configurations/chrome.headless.conf");
|
|
4
|
+
|
|
5
|
+
exports.config = merge(profile.config, {
|
|
6
|
+
maxInstances: 6,
|
|
7
|
+
specFileRetries: 2,
|
|
8
|
+
|
|
9
|
+
baseUrl: "https://services.odata.org/v4/TripPinServiceRW/",
|
|
10
|
+
|
|
11
|
+
specs: [
|
|
12
|
+
path.resolve(__dirname, "getEntitySet.spec.js"),
|
|
13
|
+
path.resolve(__dirname, "get.spec.js")
|
|
14
|
+
]
|
|
15
|
+
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const {
|
|
3
|
+
handleCookiesConsent
|
|
4
|
+
} = require("../../../helper/utils");
|
|
5
|
+
const selectorForPopupOkButton = {
|
|
6
|
+
"elementProperties": {
|
|
7
|
+
"metadata": "sap.m.Button",
|
|
8
|
+
"text": "OK"
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
describe("confirmationDialog - clickButton - text 'OK'", function () {
|
|
13
|
+
it("Preparation", async function () {
|
|
14
|
+
await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.Input/sample/sap.m.sample.InputChecked");
|
|
15
|
+
await handleCookiesConsent();
|
|
16
|
+
|
|
17
|
+
const submitButtonSelector = {
|
|
18
|
+
"elementProperties": {
|
|
19
|
+
"viewName": "sap.m.sample.InputChecked.V",
|
|
20
|
+
"metadata": "sap.m.Button"
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
await ui5.userInteraction.click(submitButtonSelector);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("Execution", async function () {
|
|
28
|
+
await ui5.confirmationDialog.clickButton("OK");
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("Verification", async function () {
|
|
32
|
+
// After we close Dialog window, we have a validation error
|
|
33
|
+
const inputFieldWithCheckSelector = {
|
|
34
|
+
"elementProperties": {
|
|
35
|
+
"viewName": "sap.m.sample.InputChecked.V",
|
|
36
|
+
"metadata": "sap.m.Input",
|
|
37
|
+
"value": [{
|
|
38
|
+
"path": "/email"
|
|
39
|
+
}]
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
await ui5.assertion.expectValidationError(inputFieldWithCheckSelector);
|
|
43
|
+
|
|
44
|
+
await expect(ui5.element.getDisplayed(selectorForPopupOkButton))
|
|
45
|
+
.rejects.toThrow(/uiControlExecuteLocator\(\): No visible elements found/);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
describe("confirmationDialog - clickButton - text 'OK' without confirmation dialog (unhappy case)", function () {
|
|
50
|
+
it("Preparation", async function () {
|
|
51
|
+
await browser.url("#/categories");
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("Execution and Verification", async function () {
|
|
55
|
+
await expect(ui5.element.getDisplayed(selectorForPopupOkButton))
|
|
56
|
+
.rejects.toThrow(/uiControlExecuteLocator\(\): No visible elements found/);
|
|
57
|
+
|
|
58
|
+
await expect(ui5.confirmationDialog.clickButton("OK"))
|
|
59
|
+
.rejects.toThrow(/waitUntil condition failed/);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
describe("confirmationDialog - clickButton - text 'Cancel'", function () {
|
|
64
|
+
it("Preparation", async function () {
|
|
65
|
+
await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.MessageBox/sample/sap.m.sample.MessageBox");
|
|
66
|
+
await handleCookiesConsent();
|
|
67
|
+
|
|
68
|
+
const confirmButtonSelector = {
|
|
69
|
+
"elementProperties": {
|
|
70
|
+
"viewName": "sap.m.sample.MessageBox.V",
|
|
71
|
+
"metadata": "sap.m.Button",
|
|
72
|
+
"text": "Confirm"
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
await ui5.userInteraction.click(confirmButtonSelector);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it("Execution", async function () {
|
|
80
|
+
await ui5.confirmationDialog.clickButton("Cancel");
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it("Verification", async function () {
|
|
84
|
+
await expect(ui5.element.getDisplayed(selectorForPopupOkButton))
|
|
85
|
+
.rejects.toThrow(/uiControlExecuteLocator\(\): No visible elements found/);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
@@ -15,6 +15,7 @@ exports.config = merge(profile.config, {
|
|
|
15
15
|
path.resolve(__dirname, "clickNo.spec.js"),
|
|
16
16
|
path.resolve(__dirname, "clickDelete.spec.js"),
|
|
17
17
|
path.resolve(__dirname, "clickRevokeApproval.spec.js"),
|
|
18
|
-
path.resolve(__dirname, "clickCreate.spec.js")
|
|
18
|
+
path.resolve(__dirname, "clickCreate.spec.js"),
|
|
19
|
+
path.resolve(__dirname, "clickButton.spec.js"),
|
|
19
20
|
]
|
|
20
21
|
});
|
|
@@ -17,6 +17,7 @@ exports.config = merge(profile.config, {
|
|
|
17
17
|
path.resolve(__dirname, "getId.spec.js"),
|
|
18
18
|
path.resolve(__dirname, "getPropertyValue.spec.js"),
|
|
19
19
|
path.resolve(__dirname, "highlight.spec.js"),
|
|
20
|
-
path.resolve(__dirname, "isVisible.spec.js")
|
|
20
|
+
path.resolve(__dirname, "isVisible.spec.js"),
|
|
21
|
+
path.resolve(__dirname, "waitForAll.spec.js")
|
|
21
22
|
]
|
|
22
23
|
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const {
|
|
3
|
+
handleCookiesConsent
|
|
4
|
+
} = require("../../../helper/utils");
|
|
5
|
+
|
|
6
|
+
describe("element - waitForAll", function () {
|
|
7
|
+
|
|
8
|
+
const selector = {
|
|
9
|
+
"elementProperties": {
|
|
10
|
+
"viewName": "sap.tnt.sample.NavigationList.V",
|
|
11
|
+
"metadata": "sap.tnt.NavigationListItem"
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
it("Preparation", async function () {
|
|
15
|
+
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.tnt.NavigationList/sample/sap.tnt.sample.NavigationList");
|
|
16
|
+
await handleCookiesConsent();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it("Execution", async function () {
|
|
20
|
+
await ui5.element.waitForAll(selector, 30000);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("Verification", async function () {
|
|
24
|
+
await ui5.assertion.expectToBeVisible(selector);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
describe("element - waitForAll - error case", function () {
|
|
29
|
+
|
|
30
|
+
const selector = {
|
|
31
|
+
"elementProperties": {
|
|
32
|
+
"viewName": "sap.tnt.sample.NavigationList.V",
|
|
33
|
+
"metadata": "sap.tnt.NavigationListItem",
|
|
34
|
+
"text": "No such element"
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
it("Preparation", async function () {
|
|
38
|
+
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.tnt.NavigationList/sample/sap.tnt.sample.NavigationList");
|
|
39
|
+
await handleCookiesConsent();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("Execution and Verification", async function () {
|
|
43
|
+
await expect(ui5.element.waitForAll(selector, 4000))
|
|
44
|
+
.rejects.toThrow("Function 'waitForAll' failed");
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const {
|
|
2
|
+
handleCookiesConsent
|
|
3
|
+
} = require("../../../helper/utils");
|
|
4
|
+
|
|
5
|
+
describe("userInteraction - clearAndFillSmartFieldInputAndRetry", function () {
|
|
6
|
+
it("Preparation", async function () {
|
|
7
|
+
await browser.navigateTo("https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.ui.comp.smartfield.SmartField/sample/sap.ui.comp.sample.smartfield.Overview");
|
|
8
|
+
await handleCookiesConsent();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it("Execution & Verification", async function () {
|
|
12
|
+
const selector = {
|
|
13
|
+
"elementProperties": {
|
|
14
|
+
"viewName": "sap.ui.comp.sample.smartfield.Overview.Main",
|
|
15
|
+
"metadata": "sap.m.Input",
|
|
16
|
+
"id": "*idWhitespace-input"
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const value = "smart field with spaces";
|
|
21
|
+
const index = 0;
|
|
22
|
+
const timeout = 30000;
|
|
23
|
+
const retries = 2;
|
|
24
|
+
const interval = 2000;
|
|
25
|
+
const verify = true;
|
|
26
|
+
await ui5.userInteraction.clearAndFillSmartFieldInputAndRetry(selector, value, index, timeout, retries, interval, verify);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -14,6 +14,7 @@ exports.config = merge(profile.config, {
|
|
|
14
14
|
path.resolve(__dirname, "clearAndFillSmartFieldInput.spec.js"),
|
|
15
15
|
path.resolve(__dirname, "clearAndRetry.spec.js"),
|
|
16
16
|
path.resolve(__dirname, "clearAndFillAndRetry.spec.js"),
|
|
17
|
+
path.resolve(__dirname, "clearAndFillSmartFieldInputAndRetry.spec.js"),
|
|
17
18
|
path.resolve(__dirname, "click.spec.js"),
|
|
18
19
|
path.resolve(__dirname, "clickAndRetry.spec.js"),
|
|
19
20
|
path.resolve(__dirname, "clickSelectArrow.spec.js"),
|
|
@@ -67,7 +67,7 @@ describe("browser - switchToNewWindow - title (RegExp)", function () {
|
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
describe("browser - switchToNewWindow - url", function () {
|
|
70
|
-
const shoppingCartUrl = "https://sapui5.hana.ondemand.com/test-resources/sap/m/demokit/cart/webapp/index.html?sap-ui-theme=
|
|
70
|
+
const shoppingCartUrl = "https://sapui5.hana.ondemand.com/test-resources/sap/m/demokit/cart/webapp/index.html?sap-ui-theme=sap_horizon";
|
|
71
71
|
|
|
72
72
|
it("Preparation", async function () {
|
|
73
73
|
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/#/demoapps");
|
|
@@ -114,7 +114,7 @@ describe("browser - switchToNewWindow - url (RegExp)", function () {
|
|
|
114
114
|
});
|
|
115
115
|
|
|
116
116
|
it("Verification", async function () {
|
|
117
|
-
const urlExp = "https://sapui5.hana.ondemand.com/test-resources/sap/m/demokit/cart/webapp/index.html?sap-ui-theme=
|
|
117
|
+
const urlExp = "https://sapui5.hana.ondemand.com/test-resources/sap/m/demokit/cart/webapp/index.html?sap-ui-theme=sap_horizon";
|
|
118
118
|
const urlAct = await util.browser.getCurrentUrl();
|
|
119
119
|
await common.assertion.expectEqual(urlAct, urlExp);
|
|
120
120
|
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
describe("console", function () {
|
|
2
|
+
|
|
3
|
+
describe("log", function () {
|
|
4
|
+
it("Execution", async function () {
|
|
5
|
+
await util.console.log("Test log message");
|
|
6
|
+
});
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
describe("error", function () {
|
|
10
|
+
it("Execution", async function () {
|
|
11
|
+
await util.console.error("Test error message");
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe("warn", function () {
|
|
16
|
+
it("Execution", async function () {
|
|
17
|
+
await util.console.warn("Test warning message");
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
describe("info", function () {
|
|
22
|
+
it("Execution", async function () {
|
|
23
|
+
await util.console.log("Test info message");
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const merge = require("deepmerge");
|
|
3
|
+
const qmateConfiguration = require("../../../helper/configurations/chrome.headless.conf");
|
|
4
|
+
exports.config = merge(qmateConfiguration.config, {
|
|
5
|
+
maxInstances: 1,
|
|
6
|
+
|
|
7
|
+
baseUrl: "https://sapui5.hana.ondemand.com",
|
|
8
|
+
|
|
9
|
+
specs: [
|
|
10
|
+
path.resolve(__dirname, "console.spec.js"),
|
|
11
|
+
]
|
|
12
|
+
});
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"session": {
|
|
3
|
-
"password": "
|
|
3
|
+
"password": "abc58265b20c8cf7c29d92f31f37530d78eaafbca59af332efdd6cc3d82fa8792bfa1dfd0db43c156291d0d30e411015cb7cad0173248bcdaa36b491a3ca7da027f57d5fee5ef8a1ef5d85f62115415739afd8c72594aade979c53398c22d4671cde7638ac158db914e0eaf6ce4274f1ca4564f5359b2d005e8747dea39548d6fe0502cb6e493bd77da40f29ffbc7ce874822ab309c3de0f4b368ec883370a19a87b8b26c99e63bf7ff7cfb1f2bf1ef0cb3b002573a36c5a95749ef077eb0f12406cd547b97b6ef18b4d8f19c6aaff3842e31176c22de9122d0b7c6c0db7b054c82c23e6fbce1a25107a59e9b137961022f19b3c7729764bcd1c1546267962af0d256794d1105c4988f098d04af45190915a0fc7fb3683c2a3af1f2ec12881df74a0de278c5bf6974928f3d93db0adeb4cd04ea364c66985c2e53eb7f184c15003555219f71c0c517f2f72e08a3565622c89e1184b6e55fcf2aad30edb0a1028"
|
|
4
4
|
},
|
|
5
5
|
"test": {
|
|
6
6
|
"number": 42,
|
|
7
7
|
"inner": {
|
|
8
|
-
"value": "
|
|
8
|
+
"value": "a1084621beba77429f4e8252e51c74203ae7bfbea3b437f53f18baf0ac0dd29facc02bd9e5068c382bddcd50539f784ff81508585f5284afa3b9efcee305f7da161230259a8eaa9728e524576e4226dbca892df9a07f2cc21f70b9e59ec9d0d8593108ed36da535663b3fa6ddd8ce61fa5b712875e091f87e78cba5c644cbb93246af1f3f1e8bccddb107d3662fe1b2fd15dba8f17d7f4179a4135703950e6ef979152b9b3391f3f227e2161fb1106c97c2ee19dcc5c58752a6b4ab85fc86fee40b9d4b0197aa06a4f2e3fe6963d47095981cab1a1dc8432173eebab9b81322595061216285c17188a6acb99fc3eb436158328943090043929774a84c0c3f81b65b18c2d8bc85b36aa79668b28d045c6752c834238f4612a0db6d5f13649a02be4eecd88291a3dda978191d946b49948fe2f2ba6d77598302800a75fa07312332853e334f612af3957db307b45d9cb286bef119641cd104d3fcc1d7e9bb31c9a"
|
|
9
9
|
}
|
|
10
|
-
}
|
|
10
|
+
},
|
|
11
|
+
"alternatives": [
|
|
12
|
+
"abc58265b20c8cf7c29d92f31f37530d78eaafbca59af332efdd6cc3d82fa8792bfa1dfd0db43c156291d0d30e411015cb7cad0173248bcdaa36b491a3ca7da027f57d5fee5ef8a1ef5d85f62115415739afd8c72594aade979c53398c22d4671cde7638ac158db914e0eaf6ce4274f1ca4564f5359b2d005e8747dea39548d6fe0502cb6e493bd77da40f29ffbc7ce874822ab309c3de0f4b368ec883370a19a87b8b26c99e63bf7ff7cfb1f2bf1ef0cb3b002573a36c5a95749ef077eb0f12406cd547b97b6ef18b4d8f19c6aaff3842e31176c22de9122d0b7c6c0db7b054c82c23e6fbce1a25107a59e9b137961022f19b3c7729764bcd1c1546267962af0d256794d1105c4988f098d04af45190915a0fc7fb3683c2a3af1f2ec12881df74a0de278c5bf6974928f3d93db0adeb4cd04ea364c66985c2e53eb7f184c15003555219f71c0c517f2f72e08a3565622c89e1184b6e55fcf2aad30edb0a1028",
|
|
13
|
+
"551e59de54cb81abb64f7c9db2fae03ab9f1d3273d4de50c76494b64493e17facab795812f38fc19a8696d811e8f2f492b9988836424b7e335ff4c17dc28e697cab2fcf76ddf128390820422ba716bae8d286d9c288a621ed2c4f433e3a9d9a1b29626661bbcc6d587eca064635bb2526875207e75a3747d35ef41873a3002af6b81e1f18d5ff99eab470d7aca4f2b5fa23df7224291bd98abef484477380d06f768a94ff425d5a4ba51e1f9854c96b37a4055c2035758db9ce13a08e890c022255fa360165c8cc230bc949a557b013a1472f5258e4e62aace43da79af7b0b77d5401a9fed60a7ea574a3ebed9c2c58b537e7bec55c9941b2cb9f1d5ee1c71fcf224af4685f83e4bed7dcb305896b79739d996061c1c61ce23707f08d1ef28144c160545b10b7fefbc620313edae477808165df484bd3d25a4e4a5ca36e61dfbd91802b356e82d2b39547bd31e8c28f50da6eff8ba741407d945e0a1c512ba24"
|
|
14
|
+
]
|
|
11
15
|
}
|
|
@@ -6,24 +6,30 @@ describe("data - getSecureData", function() {
|
|
|
6
6
|
data = util.data.getSecureData("test");
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
it("Verification
|
|
9
|
+
it("Verification 1 - hashed value", function () {
|
|
10
10
|
const dataExp = "Welcome1!";
|
|
11
11
|
const dataAct = data.session.password;
|
|
12
12
|
common.assertion.expectEqual(dataAct, dataExp);
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
it("Verification
|
|
15
|
+
it("Verification 2 - plain value", function () {
|
|
16
16
|
const dataExp = 42;
|
|
17
17
|
const dataAct = data.test.number;
|
|
18
18
|
common.assertion.expectEqual(dataAct, dataExp);
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
it("Verification
|
|
21
|
+
it("Verification 3 - nested value", function () {
|
|
22
22
|
const dataExp = "TEST";
|
|
23
23
|
const dataAct = data.test.inner.value;
|
|
24
24
|
common.assertion.expectEqual(dataAct, dataExp);
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
+
it("Verification 4 - alternatives from different keys", function () {
|
|
28
|
+
const dataExp = "Welcome1!";
|
|
29
|
+
const dataAct = data.alternatives;
|
|
30
|
+
common.assertion.expectEqual(dataAct, dataExp);
|
|
31
|
+
});
|
|
32
|
+
|
|
27
33
|
});
|
|
28
34
|
|
|
29
35
|
// =================================== KEEP DISABLED ===================================
|
|
@@ -1,29 +1,55 @@
|
|
|
1
1
|
const path = require("path");
|
|
2
|
+
const fs = require("fs");
|
|
2
3
|
|
|
3
4
|
describe("PDF Parser", function () {
|
|
4
5
|
|
|
5
|
-
describe("
|
|
6
|
-
|
|
6
|
+
describe("parsePdf - from file", function () {
|
|
7
|
+
let text;
|
|
8
|
+
it("Execution", async function () {
|
|
9
|
+
const pdfPath = path.resolve(__dirname, "./testFiles/sample.pdf");
|
|
10
|
+
text = await util.file.parsePdf(pdfPath);
|
|
11
|
+
});
|
|
12
|
+
it("Verification", async function () {
|
|
13
|
+
await common.assertion.expectDefined(text);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
describe("parsePdf - from buffer", function () {
|
|
18
|
+
let text;
|
|
19
|
+
it("Execution", async function () {
|
|
20
|
+
const pdfPath = path.resolve(__dirname, "./testFiles/sample.pdf");
|
|
21
|
+
const buffer = fs.readFileSync(pdfPath);
|
|
22
|
+
text = await util.file.parsePdf(buffer);
|
|
23
|
+
});
|
|
24
|
+
it("Verification", async function () {
|
|
25
|
+
await common.assertion.expectDefined(text);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
describe("expectPdfContainsText - from URL", function () {
|
|
30
|
+
it("Execution and Verification", async function () {
|
|
7
31
|
const pdfPath = "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf";
|
|
8
32
|
// await util.file.expectPdfContainsText(pdfPath, "Dummy PDF file");
|
|
9
33
|
await util.file.expectPdfContainsText(pdfPath, "Dumm y PDF fi le");
|
|
10
34
|
});
|
|
11
35
|
});
|
|
12
36
|
|
|
13
|
-
describe("
|
|
14
|
-
it("
|
|
37
|
+
describe("expectPdfContainsText - local PDF file", function () {
|
|
38
|
+
it("Execution and Verification", async function () {
|
|
15
39
|
const pdfPath = path.resolve(__dirname, "./testFiles/sample.pdf");
|
|
16
40
|
await util.file.expectPdfContainsText(pdfPath, "A Simple PDF File");
|
|
17
41
|
});
|
|
18
|
-
|
|
42
|
+
});
|
|
43
|
+
describe("expectPdfNotContainsText - local PDF file", function () {
|
|
44
|
+
it("Execution and Verification", async function () {
|
|
19
45
|
const pdfPath = path.resolve(__dirname, "./testFiles/sample.pdf");
|
|
20
46
|
await util.file.expectPdfNotContainsText(pdfPath, "Some random text");
|
|
21
47
|
});
|
|
22
48
|
});
|
|
23
49
|
|
|
24
|
-
describe("
|
|
50
|
+
describe("expectPdfContainsText - local PDF file with custom parser", function () {
|
|
25
51
|
|
|
26
|
-
it("
|
|
52
|
+
it("Execution and Verification", async function () {
|
|
27
53
|
const pdfPath = path.resolve(__dirname, "./testFiles/sample.pdf");
|
|
28
54
|
function customParser(pageData) {
|
|
29
55
|
const render_options = {
|
|
@@ -35,7 +61,6 @@ describe("PDF Parser", function () {
|
|
|
35
61
|
|
|
36
62
|
return pageData.getTextContent(render_options)
|
|
37
63
|
.then(function (textContent) {
|
|
38
|
-
//console.log(JSON.stringify(textContent));
|
|
39
64
|
let lastY, text = "";
|
|
40
65
|
for (const item of textContent.items) {
|
|
41
66
|
if (lastY == item.transform[5] || !lastY) {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
|
|
4
|
+
describe("system", function () {
|
|
5
|
+
|
|
6
|
+
describe("getOS", function () {
|
|
7
|
+
let osName;
|
|
8
|
+
it("Execution", async function () {
|
|
9
|
+
osName = await util.system.getOS();
|
|
10
|
+
});
|
|
11
|
+
it("Verification", async function () {
|
|
12
|
+
await common.assertion.expectDefined(osName);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const merge = require("deepmerge");
|
|
3
|
+
const qmateConfiguration = require("../../../helper/configurations/chrome.headless.conf");
|
|
4
|
+
exports.config = merge(qmateConfiguration.config, {
|
|
5
|
+
maxInstances: 1,
|
|
6
|
+
|
|
7
|
+
baseUrl: "https://sapui5.hana.ondemand.com/1.99.0/#/entity/sap.m.UploadCollection/sample/sap.m.sample.UploadCollection",
|
|
8
|
+
|
|
9
|
+
specs: [
|
|
10
|
+
path.resolve(__dirname, "system.spec.js"),
|
|
11
|
+
]
|
|
12
|
+
});
|
package/tsconfig.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"watch": false,
|
|
4
|
-
"target": "
|
|
4
|
+
"target": "es2019" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
|
5
5
|
"module": "commonjs" /* Specify what module code is generated. */,
|
|
6
6
|
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
7
7
|
"paths": {
|