@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
|
@@ -1,128 +1,92 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
const lib = require("./lib");
|
|
12
3
|
module.exports = {
|
|
13
|
-
ui5ControlLocator: function (ui5Selector, index = 0, timeout = 60000, rootElement, returnAllDomElements = false) {
|
|
14
|
-
return
|
|
15
|
-
return lib.uiControlExecuteLocator(ui5Selector, index, timeout, rootElement, returnAllDomElements);
|
|
16
|
-
});
|
|
4
|
+
ui5ControlLocator: async function (ui5Selector, index = 0, timeout = 60000, rootElement, returnAllDomElements = false) {
|
|
5
|
+
return lib.uiControlExecuteLocator(ui5Selector, index, timeout, rootElement, returnAllDomElements);
|
|
17
6
|
},
|
|
18
|
-
ui5ControlsLocators: function (ui5Selector, timeout = 60000, rootElement) {
|
|
19
|
-
return
|
|
20
|
-
return lib.uiControlExecuteLocator(ui5Selector, null, timeout, rootElement);
|
|
21
|
-
});
|
|
7
|
+
ui5ControlsLocators: async function (ui5Selector, timeout = 60000, rootElement) {
|
|
8
|
+
return lib.uiControlExecuteLocator(ui5Selector, null, timeout, rootElement);
|
|
22
9
|
},
|
|
23
|
-
getUI5Property: function (propName, selectorOrElement) {
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}, selectorOrElement, propName);
|
|
37
|
-
});
|
|
10
|
+
getUI5Property: async function (propName, selectorOrElement) {
|
|
11
|
+
return lib.controlActionInBrowser(function (control, propName, done) {
|
|
12
|
+
let val = null;
|
|
13
|
+
try {
|
|
14
|
+
val = control.getProperty(propName);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
// exception ignore it for now, need to check further
|
|
18
|
+
}
|
|
19
|
+
// Need to stringify array values
|
|
20
|
+
val = val && val.hasOwnProperty("length") ? val.toString() : val; // need to stringify arrays and objects
|
|
21
|
+
done(val);
|
|
22
|
+
}, selectorOrElement, propName);
|
|
38
23
|
},
|
|
39
|
-
getUI5Aggregation: function (propName, selectorOrElement) {
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}, selectorOrElement, propName);
|
|
51
|
-
});
|
|
24
|
+
getUI5Aggregation: async function (propName, selectorOrElement) {
|
|
25
|
+
return lib.controlActionInBrowser(function (control, propName, done) {
|
|
26
|
+
let value = null;
|
|
27
|
+
try {
|
|
28
|
+
value = control.getAggregation(propName);
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
// exception ignore it for now, need to check further
|
|
32
|
+
}
|
|
33
|
+
done(value);
|
|
34
|
+
}, selectorOrElement, propName);
|
|
52
35
|
},
|
|
53
|
-
getUI5Association: function (propName, selectorOrElement) {
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}, selectorOrElement, propName);
|
|
65
|
-
});
|
|
36
|
+
getUI5Association: async function (propName, selectorOrElement) {
|
|
37
|
+
return lib.controlActionInBrowser(function (control, propName, done) {
|
|
38
|
+
let value = null;
|
|
39
|
+
try {
|
|
40
|
+
value = control.getAssociation(propName);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
// exception ignore it for now, need to check further
|
|
44
|
+
}
|
|
45
|
+
done(value);
|
|
46
|
+
}, selectorOrElement, propName);
|
|
66
47
|
},
|
|
67
|
-
getBindingContextPath: function (selectorOrElement) {
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
finalContexts[key] = bindingContexts[key];
|
|
76
|
-
}
|
|
77
|
-
return finalContexts;
|
|
78
|
-
}, {});
|
|
79
|
-
if (bindingContexts && Object.keys(bindingContexts).length > 0) {
|
|
80
|
-
const aKeys = Object.keys(bindingContexts);
|
|
81
|
-
for (let index = 0; index < aKeys.length; index++) {
|
|
82
|
-
const oBindingContext = bindingContexts[aKeys[index]];
|
|
83
|
-
if (oBindingContext &&
|
|
84
|
-
oBindingContext.getPath &&
|
|
85
|
-
oBindingContext.getPath())
|
|
86
|
-
bindingContextPath = oBindingContext.getPath();
|
|
87
|
-
}
|
|
48
|
+
getBindingContextPath: async function (selectorOrElement) {
|
|
49
|
+
return lib.controlActionInBrowser(function (control, done) {
|
|
50
|
+
let bindingContextPath = null;
|
|
51
|
+
let bindingContexts = jQuery.extend({}, control.oPropagatedProperties && control.oPropagatedProperties.oBindingContexts, control.oBindingContexts, control.mElementBindingContexts);
|
|
52
|
+
// reduce object to non-empty contexts
|
|
53
|
+
bindingContexts = Object.keys(bindingContexts).reduce(function (finalContexts, key) {
|
|
54
|
+
if (bindingContexts[key]) {
|
|
55
|
+
finalContexts[key] = bindingContexts[key];
|
|
88
56
|
}
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
|
|
57
|
+
return finalContexts;
|
|
58
|
+
}, {});
|
|
59
|
+
if (bindingContexts && Object.keys(bindingContexts).length > 0) {
|
|
60
|
+
const aKeys = Object.keys(bindingContexts);
|
|
61
|
+
for (let index = 0; index < aKeys.length; index++) {
|
|
62
|
+
const oBindingContext = bindingContexts[aKeys[index]];
|
|
63
|
+
if (oBindingContext &&
|
|
64
|
+
oBindingContext.getPath &&
|
|
65
|
+
oBindingContext.getPath())
|
|
66
|
+
bindingContextPath = oBindingContext.getPath();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
done(bindingContextPath);
|
|
70
|
+
}, selectorOrElement);
|
|
92
71
|
},
|
|
93
|
-
getBindingProperty: function (propName, selectorOrElement) {
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
for (let i = 0; i < aBindings.length; i++) {
|
|
103
|
-
for (let j = 0; j < aBindingInfos.length; j++) {
|
|
104
|
-
try {
|
|
105
|
-
if (!aBindings[i].getBindings &&
|
|
106
|
-
aBindingInfos[j].path === aBindings[i].getPath() &&
|
|
107
|
-
aBindings[i].getValue) {
|
|
108
|
-
aBindingInfos[j].value = aBindings[i].getValue();
|
|
109
|
-
}
|
|
110
|
-
else if (aBindings[i].getBindings) {
|
|
111
|
-
retrieveCompositeBindings(aBindings[i], aBindingInfos);
|
|
112
|
-
}
|
|
113
|
-
// eslint-disable-next-line no-empty
|
|
114
|
-
}
|
|
115
|
-
catch (error) {
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
else if (!oBinding.getBindings && aBindingInfos) {
|
|
72
|
+
getBindingProperty: async function (propName, selectorOrElement) {
|
|
73
|
+
return lib.controlActionInBrowser(function (control, propertyName, done) {
|
|
74
|
+
let aBindingInfos = [];
|
|
75
|
+
function retrieveCompositeBindings(oBinding, aBindingInfos) {
|
|
76
|
+
if (!oBinding)
|
|
77
|
+
return;
|
|
78
|
+
if (oBinding.getBindings && oBinding.getBindings() && aBindingInfos) {
|
|
79
|
+
const aBindings = oBinding.getBindings();
|
|
80
|
+
for (let i = 0; i < aBindings.length; i++) {
|
|
121
81
|
for (let j = 0; j < aBindingInfos.length; j++) {
|
|
122
82
|
try {
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
|
|
83
|
+
if (!aBindings[i].getBindings &&
|
|
84
|
+
aBindingInfos[j].path === aBindings[i].getPath() &&
|
|
85
|
+
aBindings[i].getValue) {
|
|
86
|
+
aBindingInfos[j].value = aBindings[i].getValue();
|
|
87
|
+
}
|
|
88
|
+
else if (aBindings[i].getBindings) {
|
|
89
|
+
retrieveCompositeBindings(aBindings[i], aBindingInfos);
|
|
126
90
|
}
|
|
127
91
|
// eslint-disable-next-line no-empty
|
|
128
92
|
}
|
|
@@ -131,86 +95,93 @@ module.exports = {
|
|
|
131
95
|
}
|
|
132
96
|
}
|
|
133
97
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
let sModel = "";
|
|
141
|
-
if (!aBindingInfoParts[i].path)
|
|
142
|
-
continue;
|
|
143
|
-
if (aBindingInfoParts[i].model)
|
|
144
|
-
sModel = aBindingInfoParts[i].model;
|
|
145
|
-
aBindingInfos.push({
|
|
146
|
-
model: sModel,
|
|
147
|
-
path: aBindingInfoParts[i].path,
|
|
148
|
-
value: ""
|
|
149
|
-
});
|
|
98
|
+
else if (!oBinding.getBindings && aBindingInfos) {
|
|
99
|
+
for (let j = 0; j < aBindingInfos.length; j++) {
|
|
100
|
+
try {
|
|
101
|
+
if (aBindingInfos[j].path === oBinding.getPath() &&
|
|
102
|
+
oBinding.getValue) {
|
|
103
|
+
aBindingInfos[j].value = oBinding.getValue();
|
|
150
104
|
}
|
|
105
|
+
// eslint-disable-next-line no-empty
|
|
151
106
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
107
|
+
catch (error) {
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function retrieverBindingPaths(oControl, sPropKey) {
|
|
113
|
+
const aBindingInfos = [];
|
|
114
|
+
const aBindingInfoParts = oControl.getBindingInfo(sPropKey).parts;
|
|
115
|
+
try {
|
|
116
|
+
if (aBindingInfoParts && aBindingInfoParts.length > 0) {
|
|
117
|
+
for (let i = 0; i < aBindingInfoParts.length; i++) {
|
|
118
|
+
let sModel = "";
|
|
119
|
+
if (!aBindingInfoParts[i].path)
|
|
120
|
+
continue;
|
|
121
|
+
if (aBindingInfoParts[i].model)
|
|
122
|
+
sModel = aBindingInfoParts[i].model;
|
|
123
|
+
aBindingInfos.push({
|
|
124
|
+
model: sModel,
|
|
125
|
+
path: aBindingInfoParts[i].path,
|
|
126
|
+
value: ""
|
|
127
|
+
});
|
|
162
128
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
const sBindingDataStr = oControl.getBindingInfo(sPropKey).path;
|
|
132
|
+
const sBindingDataModelStr = oControl.getBindingInfo(sPropKey).model;
|
|
133
|
+
if (sBindingDataStr) {
|
|
134
|
+
aBindingInfos.push({
|
|
135
|
+
model: sBindingDataModelStr,
|
|
136
|
+
path: sBindingDataStr,
|
|
137
|
+
value: ""
|
|
138
|
+
});
|
|
167
139
|
}
|
|
168
140
|
}
|
|
169
|
-
|
|
170
|
-
|
|
141
|
+
// Get values
|
|
142
|
+
if (oControl.getBinding && oControl.getBinding(sPropKey)) {
|
|
143
|
+
const oBinding = oControl.getBinding(sPropKey);
|
|
144
|
+
retrieveCompositeBindings(oBinding, aBindingInfos);
|
|
171
145
|
}
|
|
172
|
-
return aBindingInfos;
|
|
173
146
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}, selectorOrElement, propName);
|
|
177
|
-
});
|
|
178
|
-
},
|
|
179
|
-
getAllUI5Properties: function (selectorOrElement) {
|
|
180
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
-
return lib.controlActionInBrowser(function (control, done) {
|
|
182
|
-
let allProps = null;
|
|
183
|
-
if (control.getMetadata()) {
|
|
184
|
-
const controlMetadata = control.getMetadata();
|
|
185
|
-
allProps = Object.keys(controlMetadata.getAllProperties());
|
|
147
|
+
catch (error) {
|
|
148
|
+
//Continue
|
|
186
149
|
}
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
|
|
150
|
+
return aBindingInfos;
|
|
151
|
+
}
|
|
152
|
+
aBindingInfos = retrieverBindingPaths(control, propertyName);
|
|
153
|
+
done(aBindingInfos);
|
|
154
|
+
}, selectorOrElement, propName);
|
|
190
155
|
},
|
|
191
|
-
|
|
192
|
-
return
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}, selectorOrElement);
|
|
201
|
-
});
|
|
156
|
+
getAllUI5Properties: async function (selectorOrElement) {
|
|
157
|
+
return lib.controlActionInBrowser(function (control, done) {
|
|
158
|
+
let allProps = null;
|
|
159
|
+
if (control.getMetadata()) {
|
|
160
|
+
const controlMetadata = control.getMetadata();
|
|
161
|
+
allProps = Object.keys(controlMetadata.getAllProperties());
|
|
162
|
+
}
|
|
163
|
+
done(allProps);
|
|
164
|
+
}, selectorOrElement);
|
|
202
165
|
},
|
|
203
|
-
|
|
204
|
-
return
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
166
|
+
getAllUI5Aggregations: async function (selectorOrElement) {
|
|
167
|
+
return lib.controlActionInBrowser(function (control, done) {
|
|
168
|
+
let allProps = null;
|
|
169
|
+
if (control.getMetadata()) {
|
|
170
|
+
const controlMetadata = control.getMetadata();
|
|
171
|
+
allProps = Object.keys(controlMetadata.getAllAggregations());
|
|
172
|
+
}
|
|
173
|
+
done(allProps);
|
|
174
|
+
}, selectorOrElement);
|
|
175
|
+
},
|
|
176
|
+
getAllUI5Associations: async function (selectorOrElement) {
|
|
177
|
+
return lib.controlActionInBrowser(function (control, done) {
|
|
178
|
+
let allProps = null;
|
|
179
|
+
if (control.getMetadata()) {
|
|
180
|
+
const controlMetadata = control.getMetadata();
|
|
181
|
+
allProps = Object.keys(controlMetadata.getAllAssociations());
|
|
182
|
+
}
|
|
183
|
+
done(allProps);
|
|
184
|
+
}, selectorOrElement);
|
|
214
185
|
}
|
|
215
186
|
};
|
|
216
187
|
//# sourceMappingURL=locatorCommands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locatorCommands.js","sourceRoot":"","sources":["../../../../src/scripts/hooks/utils/locatorCommands.js"],"names":[],"mappings":"AAAA,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"locatorCommands.js","sourceRoot":"","sources":["../../../../src/scripts/hooks/utils/locatorCommands.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE7B,MAAM,CAAC,OAAO,GAAG;IACf,iBAAiB,EAAE,KAAK,WAAW,WAAW,EAAE,KAAK,GAAG,CAAC,EAAE,OAAO,GAAG,KAAK,EAAE,WAAW,EAAE,oBAAoB,GAAG,KAAK;QACnH,OAAO,GAAG,CAAC,uBAAuB,CAAC,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,oBAAoB,CAAC,CAAC;IACrG,CAAC;IAED,mBAAmB,EAAE,KAAK,WAAW,WAAW,EAAE,OAAO,GAAG,KAAK,EAAE,WAAW;QAC5E,OAAO,GAAG,CAAC,uBAAuB,CAAC,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC9E,CAAC;IAED,cAAc,EAAE,KAAK,WAAW,QAAQ,EAAE,i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AE,EAAE;gBACzB,MAAM,eAAe,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;gBAC9C,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,kBAAkB,EAAE,CAAC,CAAC;aAC9D;YACD,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjB,CAAC,EAAE,iBAAiB,CAAC,CAAC;IACxB,CAAC;IAED,qBAAqB,EAAE,KAAK,WAAW,iBAAiB;QACtD,OAAO,GAAG,CAAC,sBAAsB,CAAC,UAAU,OAAO,EAAE,IAAI;YACvD,IAAI,QAAQ,GAAG,IAAI,CAAC;YACpB,IAAI,OAAO,CAAC,WAAW,EAAE,EAAE;gBACzB,MAAM,eAAe,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;gBAC9C,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,kBAAkB,EAAE,CAAC,CAAC;aAC9D;YACD,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjB,CAAC,EAAE,iBAAiB,CAAC,CAAC;IACxB,CAAC;CACF,CAAC"}
|
package/mkdocs.yml
CHANGED
|
@@ -4,9 +4,22 @@ nav:
|
|
|
4
4
|
- About: index.md
|
|
5
5
|
- ☰ Reuse API: doc.md
|
|
6
6
|
- Getting Started:
|
|
7
|
-
- Setup: gettingStarted/setup.md
|
|
8
|
-
-
|
|
9
|
-
|
|
7
|
+
- Setup: sections/gettingStarted/setup.md
|
|
8
|
+
- Config: sections/gettingStarted/config.md
|
|
9
|
+
- Spec: sections/gettingStarted/spec.md
|
|
10
|
+
- Execution: sections/gettingStarted/execution.md
|
|
11
|
+
- Features:
|
|
12
|
+
- Config: sections/features/config.md
|
|
13
|
+
- Selectors: sections/features/selectors.md
|
|
14
|
+
- Best Practices:
|
|
15
|
+
- Selectors: sections/bestPractices/selectors.md
|
|
16
|
+
- Authentication: sections/bestPractices/authentication.md
|
|
17
|
+
- Data Handling: sections/bestPractices/dataHandling.md
|
|
18
|
+
- Support:
|
|
19
|
+
- Issues & Feature Requests: sections/support/bugReporting.md
|
|
20
|
+
- Troubleshooting: sections/support/troubleshooting.md
|
|
21
|
+
- Known Issues & Limitations: sections/support/knownIssuesAndLimitations.md
|
|
22
|
+
- Contact: sections/contact.md
|
|
10
23
|
theme:
|
|
11
24
|
name: 'material'
|
|
12
25
|
features:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap_oss/wdio-qmate-service",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"author": "SAP SE",
|
|
5
5
|
"types": "./@types/index.d.ts",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
|
-
"update-chromedriver": "npm install chromedriver
|
|
27
|
-
"before_install": "npm config set chromedriver_skip_download=true && npm install chromedriver@latest --chromedriver_skip_download=true",
|
|
28
|
-
"after_install": "npm config set chromedriver_skip_download=false",
|
|
26
|
+
"update-chromedriver": "npm install chromedriver --chromedriver-force-download --detect_chromedriver_version",
|
|
29
27
|
"prepare": "npm run build",
|
|
30
28
|
"clean": "npx rimraf lib",
|
|
31
29
|
"lint": "eslint .",
|
|
@@ -89,17 +87,20 @@
|
|
|
89
87
|
"test:reuse:util:browser": "npx wdio ./test/reuse/util/browser/test.browser.conf.js",
|
|
90
88
|
"test:reuse:util:data": "npx wdio ./test/reuse/util/data/test.data.conf.js",
|
|
91
89
|
"test:reuse:util:file": "npx wdio ./test/reuse/util/file/test.file.conf.js",
|
|
90
|
+
"test:reuse:util:console": "npx wdio ./test/reuse/util/console/test.console.conf.js",
|
|
91
|
+
"test:reuse:util:system": "npx wdio ./test/reuse/util/system/test.system.conf.js",
|
|
92
92
|
"test:reuse:util:formatter": "npx wdio ./test/reuse/util/formatter/test.formatter.conf.js",
|
|
93
93
|
"test:reuse:util:temp": "npm run test:reuse:util:browser && npm run test:reuse:util:file && npm run test:reuse:util:formatter",
|
|
94
|
-
"test:reuse:util": "npm run test:reuse:util:browser && npm run test:reuse:util:data && npm run test:reuse:util:file && npm run test:reuse:util:formatter",
|
|
94
|
+
"test:reuse:util": "npm run test:reuse:util:browser && npm run test:reuse:util:data && npm run test:reuse:util:file && npm run test:reuse:util:formatter && npm run test:reuse:util:system && npm run test:reuse:util:console",
|
|
95
95
|
"test:reuse:common:assertion": "npx wdio ./test/reuse/common/assertion/test.assertion.conf.js",
|
|
96
96
|
"test:reuse:common:navigation": "npx wdio ./test/reuse/common/navigation/test.navigation.conf.js",
|
|
97
97
|
"test:reuse:common:date": "npx wdio ./test/reuse/common/date/test.date.conf.js",
|
|
98
98
|
"test:reuse:common:userInteraction": "npx wdio ./test/reuse/common/userInteraction/test.userInteraction.conf.js",
|
|
99
99
|
"test:reuse:common": "npm run test:reuse:common:assertion && npm run test:reuse:common:navigation && npm run test:reuse:common:date && npm run test:reuse:common:userInteraction",
|
|
100
|
-
"test:reuse:service:rest:startJsonServer": "cd
|
|
101
|
-
"test:reuse:service:rest": "npx wdio
|
|
102
|
-
"test:reuse": "
|
|
100
|
+
"test:reuse:service:rest:startJsonServer": "cd test/reuse/service/rest && json-server --watch db.json",
|
|
101
|
+
"test:reuse:service:rest": "npx wdio test/reuse/service/rest/test.rest.conf.js",
|
|
102
|
+
"test:reuse:service:odata": "npx wdio test/reuse/service/odata/test.odata.conf.js",
|
|
103
|
+
"test:reuse": "npm run test:reuse:common && npm run test:reuse:nonUi5 && npm run test:reuse:ui5 && npm run test:reuse:util && npm run test:reuse:service:odata",
|
|
103
104
|
"test": "npm run test:authenticator:staticLogin && npm run test:core && npm run test:reuse"
|
|
104
105
|
},
|
|
105
106
|
"homepage": "https://github.com/SAP/wdio-qmate-service",
|
|
@@ -118,7 +119,7 @@
|
|
|
118
119
|
],
|
|
119
120
|
"license": "Apache-2.0",
|
|
120
121
|
"dependencies": {
|
|
121
|
-
"@sap_oss/odata-library": "^1.0.
|
|
122
|
+
"@sap_oss/odata-library": "^1.0.6",
|
|
122
123
|
"axios": "^0.24.0",
|
|
123
124
|
"curl": "^0.1.4",
|
|
124
125
|
"fs-extra": "^10.0.0",
|
|
@@ -138,13 +139,15 @@
|
|
|
138
139
|
"@wdio/spec-reporter": "^7.20.8",
|
|
139
140
|
"@wdio/static-server-service": "^7.10.1",
|
|
140
141
|
"chai": "^4.3.4",
|
|
141
|
-
"chromedriver": "^
|
|
142
|
+
"chromedriver": "^105.0.0",
|
|
142
143
|
"deepmerge": "^4.2.2",
|
|
143
144
|
"eslint": "^6.8.0",
|
|
144
145
|
"eslint-plugin-wdio": "^6.0.12",
|
|
146
|
+
"glob": "^8.0.3",
|
|
147
|
+
"glob-promise": "^5.0.0",
|
|
145
148
|
"jsdoc-to-markdown": "^7.1.1",
|
|
146
149
|
"json-server": "^0.17.0",
|
|
147
|
-
"npx": "^
|
|
150
|
+
"npx": "^10.2.2",
|
|
148
151
|
"rimraf": "^3.0.2",
|
|
149
152
|
"typescript": "^4.6.3",
|
|
150
153
|
"wdio-chromedriver-service": "^7.3.2"
|
|
@@ -1,6 +1,35 @@
|
|
|
1
|
-
describe("
|
|
1
|
+
describe("loginCustom - using params in config.js", function () {
|
|
2
2
|
it("Verification", async function () {
|
|
3
3
|
const elem = await nonUi5.element.getById("shellAppTitle");
|
|
4
4
|
await nonUi5.assertion.expectToBeVisible(elem);
|
|
5
5
|
});
|
|
6
6
|
});
|
|
7
|
+
|
|
8
|
+
describe("loginCustom", function () {
|
|
9
|
+
|
|
10
|
+
it("Preparation", async function () {
|
|
11
|
+
await common.navigation.navigateToUrl("http://localhost:34005/custom.html");
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it("Execution", async function () {
|
|
15
|
+
await ui5.session.loginCustom("PURCHASER", "Welcome1!", "#username", "#password", "#logon", false);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("Verification", async function () {
|
|
19
|
+
const elem = await nonUi5.element.getById("shellAppTitle");
|
|
20
|
+
await nonUi5.assertion.expectToBeVisible(elem);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
describe("loginCustom - error case", function () {
|
|
25
|
+
|
|
26
|
+
it("Preparation", async function () {
|
|
27
|
+
await common.navigation.navigateToUrl("http://localhost:34005/custom.html");
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it("Execution and Verification", async function () {
|
|
31
|
+
await expect(ui5.session.loginCustom("PURCHASER", "Welcome1!", "#wrongusernamefield", "#wrongpasswordfield", "#wrongsubmitbutton", false))
|
|
32
|
+
.rejects.toThrow("Function 'loginCustom' failed");
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
});
|
|
@@ -32,4 +32,21 @@ describe("element - getById and catch error", function () {
|
|
|
32
32
|
await expect(nonUi5.element.getById("sdk---app--apiTab-text"))
|
|
33
33
|
.rejects.toThrow("Function 'getById' failed");
|
|
34
34
|
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
describe("element - getById - error case, verify error stack", function () {
|
|
38
|
+
|
|
39
|
+
it("Preparation", async function () {
|
|
40
|
+
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.99.0/");
|
|
41
|
+
await handleCookiesConsent();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("Execution & Verification", async function () {
|
|
45
|
+
try {
|
|
46
|
+
await nonUi5.element.getById("sdk---app--apiTab-text");
|
|
47
|
+
} catch (error) {
|
|
48
|
+
await expect(error.stack).toMatch(/at.*getById\.spec\.js/);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
});
|
|
35
52
|
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
describe("odata - get", 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.get(srv, "People", {"UserName": "willieashmore", "LastName": "Ashmore"});
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it("Verification", async function () {
|
|
15
|
+
await common.assertion.expectDefined(res);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
describe("odata - get - wrong value", function () {
|
|
21
|
+
let srv;
|
|
22
|
+
let res;
|
|
23
|
+
it("Preparation", async function () {
|
|
24
|
+
srv = await service.odata.init(browser.config.baseUrl, "", "", false, {}, "none");
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("Execution", async function () {
|
|
28
|
+
res = await service.odata.get(srv, "People", {"UserName": "wrongvalue"});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("Verification", async function () {
|
|
32
|
+
await common.assertion.expectTrue(res === null);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
describe("odata - get - wrong key", function () {
|
|
38
|
+
let srv;
|
|
39
|
+
it("Preparation", async function () {
|
|
40
|
+
srv = await service.odata.init(browser.config.baseUrl, "", "", false, {}, "none");
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it("Execution and Verification", async function () {
|
|
44
|
+
await expect(service.odata.get(srv, "People", {"WrongKey": "SomeValue"}))
|
|
45
|
+
.rejects.toThrow(/Key property UserName is not defined/);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
describe("odata - get - wrong entity set", function () {
|
|
51
|
+
let srv;
|
|
52
|
+
it("Preparation", async function () {
|
|
53
|
+
srv = await service.odata.init(browser.config.baseUrl, "", "", false, {}, "none");
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it("Execution and Verification", async function () {
|
|
57
|
+
await expect(service.odata.get(srv, "WrongEntitySet", {"UserName": "willieashmore"}))
|
|
58
|
+
.rejects.toThrow(/No entity set .* available in service/);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
});
|