@sap_oss/wdio-qmate-service 1.0.1 → 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/docs/sections/gettingStarted/config.md +2 -2
- 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 +3 -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.js +110 -139
- 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/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.js +2 -0
- 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/package.json +2 -2
- package/test/reuse/nonUi5/element/getById.spec.js +17 -0
- package/tsconfig.json +1 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Enable Qmate Service
|
|
4
4
|
|
|
5
|
-
To use our service you have to enable `@wdio
|
|
5
|
+
To use our service you have to enable `@sap_oss/wdio-qmate-service` in your *config.js*.
|
|
6
6
|
|
|
7
7
|
```js title="config.js"
|
|
8
|
-
const QmateService = require("@wdio
|
|
8
|
+
const QmateService = require("@sap_oss/wdio-qmate-service");
|
|
9
9
|
|
|
10
10
|
exports.config = {
|
|
11
11
|
// ...
|
package/lib/index.js
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
"use strict";
|
|
3
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
8
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
9
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
3
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
5
|
};
|
|
@@ -38,23 +29,21 @@ module.exports = class CustomWorkerService {
|
|
|
38
29
|
* @param {Array.<Object>} capabilities list of capabilities details
|
|
39
30
|
*/
|
|
40
31
|
// @ts-ignore
|
|
41
|
-
onPrepare(config, capabilities) {
|
|
42
|
-
|
|
43
|
-
const logo = ` __
|
|
32
|
+
async onPrepare(config, capabilities) {
|
|
33
|
+
const logo = ` __
|
|
44
34
|
____ _____ ___ ____ _/ /____
|
|
45
35
|
/ __ \`/ __ \`__ \\/ __ \`/ __/ _ \\
|
|
46
36
|
/ /_/ / / / / / / /_/ / /_/ __/
|
|
47
37
|
\\__, /_/ /_/ /_/\__,_/\\__/\\___/
|
|
48
38
|
/_/ \x1b[3m service v.${pj.version}\x1b[0m
|
|
49
39
|
`;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
});
|
|
40
|
+
console.log(logo);
|
|
41
|
+
try {
|
|
42
|
+
await (0, onPrepare_1.default)(config, capabilities);
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
console.error(`onPrepare hook failed: ${e}`);
|
|
46
|
+
}
|
|
58
47
|
}
|
|
59
48
|
/**
|
|
60
49
|
* Gets executed just before initializing the webdriver session and test framework. It allows you
|
|
@@ -64,21 +53,19 @@ module.exports = class CustomWorkerService {
|
|
|
64
53
|
* @param {Array.<String>} specs List of spec file paths that are to be run
|
|
65
54
|
*/
|
|
66
55
|
// @ts-ignore
|
|
67
|
-
beforeSession(config, capabilities, specs) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
56
|
+
async beforeSession(config, capabilities, specs) {
|
|
57
|
+
try {
|
|
58
|
+
await (0, beforeSession_1.default)(config, capabilities, specs);
|
|
59
|
+
}
|
|
60
|
+
catch (e) {
|
|
61
|
+
if (specs && specs[0]) {
|
|
62
|
+
// `specs` variable is an array, but includes only one current spec
|
|
63
|
+
console.error(`qmateLoader() in 'beforeSession' hook failed for spec '${specs[0]}'. ${e}`);
|
|
71
64
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
// `specs` variable is an array, but includes only one current spec
|
|
75
|
-
console.error(`qmateLoader() in 'beforeSession' hook failed for spec '${specs[0]}'. ${e}`);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
console.error(`qmateLoader() in 'beforeSession' hook failed. ${e}`);
|
|
79
|
-
}
|
|
65
|
+
else {
|
|
66
|
+
console.error(`qmateLoader() in 'beforeSession' hook failed. ${e}`);
|
|
80
67
|
}
|
|
81
|
-
}
|
|
68
|
+
}
|
|
82
69
|
}
|
|
83
70
|
/**
|
|
84
71
|
* Gets executed before test execution begins. At this point you can access to all global
|
|
@@ -88,49 +75,43 @@ module.exports = class CustomWorkerService {
|
|
|
88
75
|
* @param {Object} browser instance of created browser/device session
|
|
89
76
|
*/
|
|
90
77
|
// @ts-ignore
|
|
91
|
-
before(capabilities, specs, browser) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
78
|
+
async before(capabilities, specs, browser) {
|
|
79
|
+
// Errors in WDIO hooks are suppressed by default => we call process.exit(1). It will mark all specs as failed
|
|
80
|
+
try {
|
|
81
|
+
await (0, before_1.default)(capabilities, specs, browser);
|
|
82
|
+
}
|
|
83
|
+
catch (e) {
|
|
84
|
+
if (specs && specs[0]) {
|
|
85
|
+
// `specs` variable is an array, but includes only one current spec
|
|
86
|
+
util.console.error(`qmateLoader() in 'before' hook failed for spec '${specs[0]}'. ${e}`);
|
|
96
87
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
// `specs` variable is an array, but includes only one current spec
|
|
100
|
-
util.console.error(`qmateLoader() in 'before' hook failed for spec '${specs[0]}'. ${e}`);
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
util.console.error(`qmateLoader() in 'before' hook failed. ${e}`);
|
|
104
|
-
}
|
|
88
|
+
else {
|
|
89
|
+
util.console.error(`qmateLoader() in 'before' hook failed. ${e}`);
|
|
105
90
|
}
|
|
106
|
-
}
|
|
91
|
+
}
|
|
107
92
|
}
|
|
108
93
|
/**
|
|
109
94
|
* Gets executed before the suite starts.
|
|
110
95
|
* @param {Object} suite suite details
|
|
111
96
|
*/
|
|
112
|
-
beforeSuite(suite) {
|
|
113
|
-
|
|
114
|
-
util.console.log(` ${suite.fullTitle} `, "black", "white");
|
|
115
|
-
});
|
|
97
|
+
async beforeSuite(suite) {
|
|
98
|
+
util.console.log(` ${suite.fullTitle} `, "black", "white");
|
|
116
99
|
}
|
|
117
100
|
/**
|
|
118
101
|
* Function to be executed after a test (in Mocha/Jasmine)
|
|
119
102
|
*/
|
|
120
103
|
// @ts-ignore
|
|
121
|
-
afterTest(test, context, { error, result, duration, passed, retries }) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
});
|
|
104
|
+
async afterTest(test, context, { error, result, duration, passed, retries }) {
|
|
105
|
+
// test.title - for mocha framework
|
|
106
|
+
// test.description - for jasmine framework
|
|
107
|
+
const testName = test.title || test.description;
|
|
108
|
+
// Print test titles as in vyperForAll during test run
|
|
109
|
+
if (!error && passed === true) {
|
|
110
|
+
util.console.info(`\x1b[32m\t✓ ${testName}\x1b[0m (${Math.round(duration / 1000)}s)`);
|
|
111
|
+
}
|
|
112
|
+
else if (error || passed !== true) {
|
|
113
|
+
util.console.error(`\x1b[31m\t✗ ${testName}\x1b[0m (${Math.round(duration / 1000)}s)`);
|
|
114
|
+
}
|
|
134
115
|
}
|
|
135
116
|
/**
|
|
136
117
|
* Gets executed after all tests are done. You still have access to all global variables from
|
|
@@ -139,15 +120,13 @@ module.exports = class CustomWorkerService {
|
|
|
139
120
|
* @param {Array.<Object>} capabilities list of capabilities details
|
|
140
121
|
* @param {Array.<String>} specs List of spec file paths that ran
|
|
141
122
|
*/
|
|
142
|
-
after(result, capabilities, specs) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
});
|
|
123
|
+
async after(result, capabilities, specs) {
|
|
124
|
+
try {
|
|
125
|
+
(0, after_1.default)(result, capabilities, specs);
|
|
126
|
+
}
|
|
127
|
+
catch (e) {
|
|
128
|
+
util.console.error(`after hook failed: ${e}`);
|
|
129
|
+
}
|
|
151
130
|
}
|
|
152
131
|
/**
|
|
153
132
|
* Gets executed after all workers have shut down and the process is about to exit.
|
|
@@ -157,15 +136,13 @@ module.exports = class CustomWorkerService {
|
|
|
157
136
|
* @param {Array.<Object>} capabilities list of capabilities details
|
|
158
137
|
* @param {<Object>} results object containing test results
|
|
159
138
|
*/
|
|
160
|
-
onComplete(exitCode, config, capabilities, results) {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
});
|
|
139
|
+
async onComplete(exitCode, config, capabilities, results) {
|
|
140
|
+
try {
|
|
141
|
+
await (0, onComplete_1.default)(exitCode, config, capabilities, results);
|
|
142
|
+
}
|
|
143
|
+
catch (e) {
|
|
144
|
+
util.console.error(`onComplete hook failed: ${e}`);
|
|
145
|
+
}
|
|
169
146
|
}
|
|
170
147
|
};
|
|
171
148
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,YAAY,CAAC;;;;;AAEb,kFAA+D;AAC/D,oEAAiD;AACjD,0EAAsD;AACtD,4EAAwD;AACxD,kEAA8C;AAC9C,MAAM,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEtC,MAAM,CAAC,OAAO,GAAG,MAAM,mBAAmB;IACxC;;;;;;;;;OASG;IACH,aAAa;IACb,YAAY,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,IAAI,CAAC;IAE9D;;;;OAIG;IACH,aAAa;IACb,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,YAAY;QAClC,MAAM,IAAI,GAAG;;;;;4BAKW,EAAE,CAAC,OAAO;OAC/B,CAAC;QACJ,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,IAAI;YACF,MAAM,IAAA,mBAAa,EAAC,MAAM,EAAE,YAAY,CAAC,CAAC;SAC3C;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;SAC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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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
class AuthHandler {
|
|
13
4
|
constructor() {
|
|
14
5
|
this.path = require("path");
|
|
15
6
|
}
|
|
16
|
-
attachAuthHandling() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (formType
|
|
22
|
-
|
|
23
|
-
throw new Error(`Please provide a valid 'formType' instead of '${formType}'.`);
|
|
24
|
-
}
|
|
25
|
-
// eslint-disable-next-line no-console
|
|
26
|
-
console.log(this.path.resolve(authConfig[formType].name));
|
|
27
|
-
const execAuthenticator = require(authConfig[formType].name);
|
|
28
|
-
yield execAuthenticator();
|
|
7
|
+
async attachAuthHandling() {
|
|
8
|
+
const authConfig = require("./authConfig.js");
|
|
9
|
+
if (browser.config.params && browser.config.params.auth) {
|
|
10
|
+
const formType = browser.config.params.auth.formType;
|
|
11
|
+
if (formType && formType !== "skip") {
|
|
12
|
+
if (!authConfig[formType] || !authConfig[formType].name || !this.path.resolve(authConfig[formType].name)) {
|
|
13
|
+
throw new Error(`Please provide a valid 'formType' instead of '${formType}'.`);
|
|
29
14
|
}
|
|
15
|
+
// eslint-disable-next-line no-console
|
|
16
|
+
console.log(this.path.resolve(authConfig[formType].name));
|
|
17
|
+
const execAuthenticator = require(authConfig[formType].name);
|
|
18
|
+
await execAuthenticator();
|
|
30
19
|
}
|
|
31
|
-
}
|
|
20
|
+
}
|
|
32
21
|
}
|
|
33
22
|
;
|
|
34
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authHandler.js","sourceRoot":"","sources":["../../../src/reuse/authenticator/authHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authHandler.js","sourceRoot":"","sources":["../../../src/reuse/authenticator/authHandler.ts"],"names":[],"mappings":";;AAAA,MAAM,WAAW;IAAjB;QAEU,SAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAmBjC,CAAC;IAjBC,KAAK,CAAC,kBAAkB;QACtB,MAAM,UAAU,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;QAE9C,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;YACvD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;YACrD,IAAI,QAAQ,IAAI,QAAQ,KAAK,MAAM,EAAE;gBACnC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE;oBACxG,MAAM,IAAI,KAAK,CAAC,iDAAiD,QAAQ,IAAI,CAAC,CAAC;iBAChF;gBACD,sCAAsC;gBACtC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;gBAC1D,MAAM,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC;gBAC7D,MAAM,iBAAiB,EAAE,CAAC;aAC3B;SACF;IACH,CAAC;IAAA,CAAC;CAEH;AAAA,CAAC;AACF,kBAAe,IAAI,WAAW,EAAE,CAAC"}
|
|
@@ -1,36 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
throw new Error("Please provide a 'baseUrl' in the config.");
|
|
24
|
-
}
|
|
25
|
-
// prepare basic auth url
|
|
26
|
-
const urlMatches = url.match(/(\w*\:?\/\/)(.+)/);
|
|
27
|
-
if (urlMatches === null) {
|
|
28
|
-
throw new Error(`Could not parse url: ${url}.`);
|
|
29
|
-
}
|
|
30
|
-
const urlWithAuth = urlMatches[1] + username + ":" + password + "@" + urlMatches[2];
|
|
31
|
-
// get the url
|
|
32
|
-
yield browser.url(urlWithAuth);
|
|
33
|
-
});
|
|
2
|
+
async function BasicUrlAuthenticator() {
|
|
3
|
+
const username = browser.config.params ? browser.config.params.auth.username : undefined;
|
|
4
|
+
if (!username) {
|
|
5
|
+
throw new Error("Please provide a 'username' in the config.");
|
|
6
|
+
}
|
|
7
|
+
const password = browser.config.params ? browser.config.params.auth.password : undefined;
|
|
8
|
+
if (!password) {
|
|
9
|
+
throw new Error("Please provide a 'password' in the config.");
|
|
10
|
+
}
|
|
11
|
+
const url = browser.config.baseUrl;
|
|
12
|
+
if (!url) {
|
|
13
|
+
throw new Error("Please provide a 'baseUrl' in the config.");
|
|
14
|
+
}
|
|
15
|
+
// prepare basic auth url
|
|
16
|
+
const urlMatches = url.match(/(\w*\:?\/\/)(.+)/);
|
|
17
|
+
if (urlMatches === null) {
|
|
18
|
+
throw new Error(`Could not parse url: ${url}.`);
|
|
19
|
+
}
|
|
20
|
+
const urlWithAuth = urlMatches[1] + username + ":" + password + "@" + urlMatches[2];
|
|
21
|
+
// get the url
|
|
22
|
+
await browser.url(urlWithAuth);
|
|
34
23
|
}
|
|
35
24
|
module.exports = BasicUrlAuthenticator;
|
|
36
25
|
//# sourceMappingURL=basicUrlAuthenticator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basicUrlAuthenticator.js","sourceRoot":"","sources":["../../../src/reuse/authenticator/basicUrlAuthenticator.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"basicUrlAuthenticator.js","sourceRoot":"","sources":["../../../src/reuse/authenticator/basicUrlAuthenticator.js"],"names":[],"mappings":";AAAA,KAAK,UAAU,qBAAqB;IAElC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IACzF,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;KAC/D;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IACzF,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;KAC/D;IACD,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;IACnC,IAAI,CAAC,GAAG,EAAE;QACR,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;KAC9D;IAED,yBAAyB;IACzB,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACjD,IAAI,UAAU,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,GAAG,CAAC,CAAC;KACjD;IACD,MAAM,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IAEpF,cAAc;IACd,MAAM,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACjC,CAAC;AACD,MAAM,CAAC,OAAO,GAAG,qBAAqB,CAAC"}
|
|
@@ -1,60 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
yield browser.waitUntil(function () {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
userNameField = yield $(usernameFieldSelector);
|
|
44
|
-
passwordField = yield $(passwordFieldSelector);
|
|
45
|
-
logonField = yield $(logonButtonSelector);
|
|
46
|
-
return userNameField.isDisplayedInViewport() &&
|
|
47
|
-
passwordField.isDisplayedInViewport() &&
|
|
48
|
-
logonField.isDisplayedInViewport();
|
|
49
|
-
});
|
|
50
|
-
}, {
|
|
51
|
-
timeout: 60000,
|
|
52
|
-
timeoutMsg: "Expected user name field to be present after 60s"
|
|
53
|
-
});
|
|
54
|
-
yield userNameField.setValue(username);
|
|
55
|
-
yield passwordField.setValue(password);
|
|
56
|
-
yield logonField.click();
|
|
2
|
+
async function CustomAuthenticator() {
|
|
3
|
+
const username = browser.config.params.auth.username;
|
|
4
|
+
if (!username) {
|
|
5
|
+
throw new Error("Please provide a 'username' in the config.");
|
|
6
|
+
}
|
|
7
|
+
const password = browser.config.params.auth.password;
|
|
8
|
+
if (!password) {
|
|
9
|
+
throw new Error("Please provide a 'password' in the config.");
|
|
10
|
+
}
|
|
11
|
+
const usernameFieldSelector = browser.config.params.auth.usernameFieldSelector;
|
|
12
|
+
if (!usernameFieldSelector) {
|
|
13
|
+
throw new Error("Please provide a 'usernameFieldSelector' in the config.");
|
|
14
|
+
}
|
|
15
|
+
const passwordFieldSelector = browser.config.params.auth.passwordFieldSelector;
|
|
16
|
+
if (!passwordFieldSelector) {
|
|
17
|
+
throw new Error("Please provide a 'passwordFieldSelector' in the config.");
|
|
18
|
+
}
|
|
19
|
+
const logonButtonSelector = browser.config.params.auth.logonButtonSelector;
|
|
20
|
+
if (!logonButtonSelector) {
|
|
21
|
+
throw new Error("Please provide a 'logonButtonSelector' in the config.");
|
|
22
|
+
}
|
|
23
|
+
const url = browser.config.baseUrl;
|
|
24
|
+
if (!url) {
|
|
25
|
+
throw new Error("Please provide a 'baseUrl'.");
|
|
26
|
+
}
|
|
27
|
+
let userNameField = null;
|
|
28
|
+
let passwordField = null;
|
|
29
|
+
let logonField = null;
|
|
30
|
+
await browser.url(url);
|
|
31
|
+
await browser.waitUntil(async function () {
|
|
32
|
+
userNameField = await $(usernameFieldSelector);
|
|
33
|
+
passwordField = await $(passwordFieldSelector);
|
|
34
|
+
logonField = await $(logonButtonSelector);
|
|
35
|
+
return userNameField.isDisplayedInViewport() &&
|
|
36
|
+
passwordField.isDisplayedInViewport() &&
|
|
37
|
+
logonField.isDisplayedInViewport();
|
|
38
|
+
}, {
|
|
39
|
+
timeout: 60000,
|
|
40
|
+
timeoutMsg: "Expected user name field to be present after 60s"
|
|
57
41
|
});
|
|
42
|
+
await userNameField.setValue(username);
|
|
43
|
+
await passwordField.setValue(password);
|
|
44
|
+
await logonField.click();
|
|
58
45
|
}
|
|
59
46
|
module.exports = CustomAuthenticator;
|
|
60
47
|
//# sourceMappingURL=customAuthenticator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customAuthenticator.js","sourceRoot":"","sources":["../../../src/reuse/authenticator/customAuthenticator.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"customAuthenticator.js","sourceRoot":"","sources":["../../../src/reuse/authenticator/customAuthenticator.js"],"names":[],"mappings":";AAAA,KAAK,UAAU,mBAAmB;IAEhC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACrD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;KAC/D;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACrD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;KAC/D;IACD,MAAM,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC;IAC/E,IAAI,CAAC,qBAAqB,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;KAC5E;IACD,MAAM,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC;IAC/E,IAAI,CAAC,qBAAqB,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;KAC5E;IACD,MAAM,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC;IAC3E,IAAI,CAAC,mBAAmB,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;IAED,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;IACnC,IAAI,CAAC,GAAG,EAAE;QACR,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;KAChD;IAED,IAAI,aAAa,GAAG,IAAI,CAAC;IACzB,IAAI,aAAa,GAAG,IAAI,CAAC;IACzB,IAAI,UAAU,GAAG,IAAI,CAAC;IAEtB,MAAM,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvB,MAAM,OAAO,CAAC,SAAS,CAAC,KAAK;QAC3B,aAAa,GAAG,MAAM,CAAC,CAAC,qBAAqB,CAAC,CAAC;QAC/C,aAAa,GAAG,MAAM,CAAC,CAAC,qBAAqB,CAAC,CAAC;QAC/C,UAAU,GAAG,MAAM,CAAC,CAAC,mBAAmB,CAAC,CAAC;QAC1C,OAAO,aAAa,CAAC,qBAAqB,EAAE;YAC1C,aAAa,CAAC,qBAAqB,EAAE;YACrC,UAAU,CAAC,qBAAqB,EAAE,CAAC;IACvC,CAAC,EAAE;QACD,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,kDAAkD;KAC/D,CAAC,CAAC;IAEH,MAAM,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACvC,MAAM,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACvC,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC;AAC3B,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,mBAAmB,CAAC"}
|
|
@@ -1,57 +1,44 @@
|
|
|
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
|
/* eslint-disable no-return-await */
|
|
12
3
|
const authConfig = require("./authConfig");
|
|
13
|
-
function FormAuthenticator() {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, {
|
|
48
|
-
timeout: 60000,
|
|
49
|
-
timeoutMsg: "Expected user name field to be present after 60s"
|
|
50
|
-
});
|
|
51
|
-
yield userNameField.setValue(username);
|
|
52
|
-
yield passwordField.setValue(password);
|
|
53
|
-
yield logonField.click();
|
|
4
|
+
async function FormAuthenticator() {
|
|
5
|
+
const username = browser.config.params.auth.username;
|
|
6
|
+
if (!username) {
|
|
7
|
+
throw new Error("Please provide a 'username' in the config.");
|
|
8
|
+
}
|
|
9
|
+
const password = browser.config.params.auth.password;
|
|
10
|
+
if (!password) {
|
|
11
|
+
throw new Error("Please provide a 'password' in the config.");
|
|
12
|
+
}
|
|
13
|
+
const formType = browser.config.params.auth.formType;
|
|
14
|
+
if (!authConfig[formType]) {
|
|
15
|
+
throw new Error("Please provide a valid 'formType' in the config.");
|
|
16
|
+
}
|
|
17
|
+
const usernameFieldSelector = authConfig[browser.config.params.auth.formType].usernameFieldSelector;
|
|
18
|
+
const passwordFieldSelector = authConfig[browser.config.params.auth.formType].passwordFieldSelector;
|
|
19
|
+
const logonButtonSelector = authConfig[browser.config.params.auth.formType].logonButtonSelector;
|
|
20
|
+
const url = browser.config.baseUrl;
|
|
21
|
+
if (!url) {
|
|
22
|
+
throw new Error("Please provide a 'baseUrl' in the config.");
|
|
23
|
+
}
|
|
24
|
+
let userNameField = null;
|
|
25
|
+
let passwordField = null;
|
|
26
|
+
let logonField = null;
|
|
27
|
+
await browser.url(url);
|
|
28
|
+
await browser.waitUntil(async function () {
|
|
29
|
+
userNameField = await $(usernameFieldSelector);
|
|
30
|
+
passwordField = await $(passwordFieldSelector);
|
|
31
|
+
logonField = await $(logonButtonSelector);
|
|
32
|
+
return await userNameField.isDisplayedInViewport() &&
|
|
33
|
+
await passwordField.isDisplayedInViewport() &&
|
|
34
|
+
await logonField.isDisplayedInViewport();
|
|
35
|
+
}, {
|
|
36
|
+
timeout: 60000,
|
|
37
|
+
timeoutMsg: "Expected user name field to be present after 60s"
|
|
54
38
|
});
|
|
39
|
+
await userNameField.setValue(username);
|
|
40
|
+
await passwordField.setValue(password);
|
|
41
|
+
await logonField.click();
|
|
55
42
|
}
|
|
56
43
|
module.exports = FormAuthenticator;
|
|
57
44
|
//# sourceMappingURL=formAuthenticator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formAuthenticator.js","sourceRoot":"","sources":["../../../src/reuse/authenticator/formAuthenticator.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formAuthenticator.js","sourceRoot":"","sources":["../../../src/reuse/authenticator/formAuthenticator.js"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,MAAM,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAE3C,KAAK,UAAU,iBAAiB;IAE9B,MAAM,QAAQ,GAAG,OAAO,CAAC,MAA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AM,CAAC,CAAC,qBAAqB,CAAC,CAAC;QAC/C,aAAa,GAAG,MAAM,CAAC,CAAC,qBAAqB,CAAC,CAAC;QAC/C,UAAU,GAAG,MAAM,CAAC,CAAC,mBAAmB,CAAC,CAAC;QAC1C,OAAO,MAAM,aAAa,CAAC,qBAAqB,EAAE;YAChD,MAAM,aAAa,CAAC,qBAAqB,EAAE;YAC3C,MAAM,UAAU,CAAC,qBAAqB,EAAE,CAAC;IAC7C,CAAC,EAAE;QACD,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,kDAAkD;KAC/D,CAAC,CAAC;IAEH,MAAM,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACvC,MAAM,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACvC,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC;AAC3B,CAAC;AACD,MAAM,CAAC,OAAO,GAAG,iBAAiB,CAAC"}
|
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
function PlainAuthenticator() {
|
|
12
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
13
|
-
if (browser.config.baseUrl) {
|
|
14
|
-
const url = browser.config.baseUrl;
|
|
15
|
-
yield browser.navigateTo(url);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
2
|
+
async function PlainAuthenticator() {
|
|
3
|
+
if (browser.config.baseUrl) {
|
|
4
|
+
const url = browser.config.baseUrl;
|
|
5
|
+
await browser.navigateTo(url);
|
|
6
|
+
}
|
|
18
7
|
}
|
|
19
8
|
module.exports = PlainAuthenticator;
|
|
20
9
|
//# sourceMappingURL=plainAuthenticator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plainAuthenticator.js","sourceRoot":"","sources":["../../../src/reuse/authenticator/plainAuthenticator.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plainAuthenticator.js","sourceRoot":"","sources":["../../../src/reuse/authenticator/plainAuthenticator.js"],"names":[],"mappings":";AAAA,KAAK,UAAU,kBAAkB;IAC/B,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE;QAC1B,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;QACnC,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;KAC/B;AACH,CAAC;AACD,MAAM,CAAC,OAAO,GAAG,kBAAkB,CAAC"}
|