@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,34 +1,23 @@
|
|
|
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
|
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;KAC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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,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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,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"}
|
|
@@ -1,30 +1,22 @@
|
|
|
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
|
const glob = require("glob");
|
|
13
4
|
const fs = require("fs");
|
|
14
5
|
const path = require("path");
|
|
15
6
|
const jsdoc2md = require("jsdoc-to-markdown");
|
|
16
7
|
const readPath = path.join(__dirname, "../");
|
|
8
|
+
const readPosixPath = readPath.replace(/\\/g, "/");
|
|
17
9
|
const writePath = path.join(__dirname, "../../../docs");
|
|
18
10
|
const filesToInclude = `{index.js,modules/**/*.js}`;
|
|
19
11
|
function generateDoc() {
|
|
20
|
-
glob(
|
|
12
|
+
glob(readPosixPath + filesToInclude, async (err, files) => {
|
|
21
13
|
if (err) {
|
|
22
14
|
throw err;
|
|
23
15
|
}
|
|
24
16
|
console.log(files);
|
|
25
17
|
let markdownFile;
|
|
26
18
|
try {
|
|
27
|
-
markdownFile =
|
|
19
|
+
markdownFile = await jsdoc2md.render({
|
|
28
20
|
"files": files
|
|
29
21
|
});
|
|
30
22
|
}
|
|
@@ -39,7 +31,7 @@ function generateDoc() {
|
|
|
39
31
|
}
|
|
40
32
|
console.log("The files has been saved.");
|
|
41
33
|
});
|
|
42
|
-
})
|
|
34
|
+
});
|
|
43
35
|
}
|
|
44
36
|
generateDoc();
|
|
45
37
|
//# sourceMappingURL=jsDocGen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsDocGen.js","sourceRoot":"","sources":["../../../src/reuse/helper/jsDocGen.js"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"jsDocGen.js","sourceRoot":"","sources":["../../../src/reuse/helper/jsDocGen.js"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,YAAY,CAAC;AAEb,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAE9C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAC7C,MAAM,aAAa,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;AAExD,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAEpD,SAAS,WAAW;IAClB,IAAI,CAAC,aAAa,GAAG,cAAc,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;QAExD,IAAI,GAAG,EAAE;YACP,MAAM,GAAG,CAAC;SACX;QACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAEnB,IAAI,YAAY,CAAC;QACjB,IAAI;YACF,YAAY,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;gBACnC,OAAO,EAAE,KAAK;aACf,CAAC,CAAC;SACJ;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,sDAAsD,CAAC,CAAC;YACzF,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrB,OAAO;SACR;QAED,EAAE,CAAC,SAAS,CAAC,SAAS,GAAG,SAAS,EAAE,YAAY,EAAE,CAAC,GAAG,EAAE,EAAE;YACxD,IAAI,GAAG,EAAE;gBACP,MAAM,GAAG,CAAC;aACX;YACD,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IAEL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,WAAW,EAAE,CAAC"}
|
package/lib/reuse/index.js
CHANGED
|
@@ -23,7 +23,10 @@ class ReuseLibrary {
|
|
|
23
23
|
navigation: Common_1.default.navigation,
|
|
24
24
|
userInteraction: Common_1.default.userInteraction
|
|
25
25
|
};
|
|
26
|
-
global.common =
|
|
26
|
+
global.common = {
|
|
27
|
+
...common,
|
|
28
|
+
...global.common
|
|
29
|
+
};
|
|
27
30
|
/**
|
|
28
31
|
* @global
|
|
29
32
|
* @description Global namespace for util modules.
|
|
@@ -37,7 +40,10 @@ class ReuseLibrary {
|
|
|
37
40
|
function: Util_1.default.function,
|
|
38
41
|
system: Util_1.default.system
|
|
39
42
|
};
|
|
40
|
-
global.util =
|
|
43
|
+
global.util = {
|
|
44
|
+
...util,
|
|
45
|
+
...global.util
|
|
46
|
+
};
|
|
41
47
|
/**
|
|
42
48
|
* @global
|
|
43
49
|
* @description Global namespace for UI5 modules.
|
|
@@ -60,7 +66,10 @@ class ReuseLibrary {
|
|
|
60
66
|
// data
|
|
61
67
|
authenticators: authenticators_json_1.default,
|
|
62
68
|
};
|
|
63
|
-
global.ui5 =
|
|
69
|
+
global.ui5 = {
|
|
70
|
+
...ui5,
|
|
71
|
+
...global.ui5
|
|
72
|
+
};
|
|
64
73
|
/**
|
|
65
74
|
* @global
|
|
66
75
|
* @description Global namespace for non UI5 modules.
|
|
@@ -71,7 +80,10 @@ class ReuseLibrary {
|
|
|
71
80
|
navigation: NonUi5_1.default.navigation,
|
|
72
81
|
userInteraction: NonUi5_1.default.userInteraction
|
|
73
82
|
};
|
|
74
|
-
global.nonUi5 =
|
|
83
|
+
global.nonUi5 = {
|
|
84
|
+
...nonUi5,
|
|
85
|
+
...global.nonUi5
|
|
86
|
+
};
|
|
75
87
|
/**
|
|
76
88
|
* @global
|
|
77
89
|
* @description Global namespace for service modules.
|
|
@@ -80,7 +92,10 @@ class ReuseLibrary {
|
|
|
80
92
|
odata: Service_1.default.odata,
|
|
81
93
|
rest: Service_1.default.rest
|
|
82
94
|
};
|
|
83
|
-
global.service =
|
|
95
|
+
global.service = {
|
|
96
|
+
...service,
|
|
97
|
+
...global.service
|
|
98
|
+
};
|
|
84
99
|
}
|
|
85
100
|
;
|
|
86
101
|
}
|
package/lib/reuse/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reuse/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;AAEb,UAAU;AACV,+DAA2C;AAC3C,qEAAiD;AACjD,4DAAyC;AACzC,qEAAkD;AAClD,wEAAoD;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AAE,CAAC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.Navigation = void 0;
|
|
13
4
|
/**
|
|
@@ -22,16 +13,14 @@ class Navigation {
|
|
|
22
13
|
* @param {String} url - The url.
|
|
23
14
|
* @example await common.navigation.navigateToUrl("www.sap.com");
|
|
24
15
|
*/
|
|
25
|
-
navigateToUrl(url) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
});
|
|
16
|
+
async navigateToUrl(url) {
|
|
17
|
+
if (url) {
|
|
18
|
+
await browser.navigateTo(url);
|
|
19
|
+
await util.browser.logCurrentUrl();
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
throw new Error("Function 'navigateToUrl' failed: Please provide an url as argument.");
|
|
23
|
+
}
|
|
35
24
|
}
|
|
36
25
|
;
|
|
37
26
|
/**
|
|
@@ -43,10 +32,8 @@ class Navigation {
|
|
|
43
32
|
* @param {Integer} [interval=5000] - The interval of the retries (ms), can be set in config for all functions under params stepRetriesIntervals.
|
|
44
33
|
* @example await common.navigation.navigateToUrlAndRetry("www.sap.com");
|
|
45
34
|
*/
|
|
46
|
-
navigateToUrlAndRetry(url, retries = 3, interval = 5000) {
|
|
47
|
-
|
|
48
|
-
yield util.function.retry(this.navigateToUrl, [url], retries, interval, this);
|
|
49
|
-
});
|
|
35
|
+
async navigateToUrlAndRetry(url, retries = 3, interval = 5000) {
|
|
36
|
+
await util.function.retry(this.navigateToUrl, [url], retries, interval, this);
|
|
50
37
|
}
|
|
51
38
|
;
|
|
52
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../../src/reuse/modules/common/navigation.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../../src/reuse/modules/common/navigation.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb;;;GAGG;AACH,MAAa,UAAU;IAErB;;;;;;OAMG;IACH,KAAK,CAAC,aAAa,CAAE,GAAW;QAC9B,IAAI,GAAG,EAAE;YACP,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YAC9B,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;SACpC;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;SACxF;IACH,CAAC;IAAA,CAAC;IAEF;;;;;;;;OAQG;IACH,KAAK,CAAC,qBAAqB,CAAE,GAAW,EAAE,UAAkB,CAAC,EAAE,WAAmB,IAAI;QACpF,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IAChF,CAAC;IAAA,CAAC;CAEH;AA/BD,gCA+BC;AAAA,CAAC;AACF,kBAAe,IAAI,UAAU,EAAE,CAAC"}
|