@camunda/e2e-test-suite 0.0.140 → 0.0.141
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.
|
@@ -5,7 +5,13 @@ const test_1 = require("@playwright/test");
|
|
|
5
5
|
const LoginPage_1 = require("./LoginPage");
|
|
6
6
|
const sleep_1 = require("../../utils/sleep");
|
|
7
7
|
const constants_1 = require("../../utils/constants");
|
|
8
|
-
const ORCHESTRATION_CONTEXT_PATH = process.env.ORCHESTRATION_CONTEXT_PATH
|
|
8
|
+
const ORCHESTRATION_CONTEXT_PATH = process.env.ORCHESTRATION_CONTEXT_PATH ?? '/orchestration';
|
|
9
|
+
const MODELER_CONTEXT_PATH = process.env.MODELER_CONTEXT_PATH ?? '/modeler';
|
|
10
|
+
const OPTIMIZE_CONTEXT_PATH = process.env.OPTIMIZE_CONTEXT_PATH ?? '/optimize';
|
|
11
|
+
const CONSOLE_CONTEXT_PATH = process.env.CONSOLE_CONTEXT_PATH ?? '/console';
|
|
12
|
+
const MANAGEMENT_IDENTITY_CONTEXT_PATH = process.env.MANAGEMENT_IDENTITY_CONTEXT_PATH ?? '/identity';
|
|
13
|
+
const IDENTITY_FIRSTUSER_USERNAME = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_USERNAME || 'demo';
|
|
14
|
+
const IDENTITY_FIRSTUSER_PASSWORD = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD || 'demo';
|
|
9
15
|
class NavigationPage {
|
|
10
16
|
page;
|
|
11
17
|
modelerPageBanner;
|
|
@@ -41,8 +47,7 @@ class NavigationPage {
|
|
|
41
47
|
});
|
|
42
48
|
this.keyboardPageBanner = page.locator('#keycloak-bg');
|
|
43
49
|
}
|
|
44
|
-
async goTo(url, banner, sleepTimeout, { username =
|
|
45
|
-
'demo', } = {}, maxRetries = 3) {
|
|
50
|
+
async goTo(url, banner, sleepTimeout, { username = IDENTITY_FIRSTUSER_USERNAME, password = IDENTITY_FIRSTUSER_PASSWORD, } = {}, maxRetries = 3) {
|
|
46
51
|
const startTime = Date.now();
|
|
47
52
|
let timeout = constants_1._1_SECOND_IN_MS * 1;
|
|
48
53
|
if (url === '/modeler') {
|
|
@@ -97,7 +102,7 @@ class NavigationPage {
|
|
|
97
102
|
}
|
|
98
103
|
}
|
|
99
104
|
async goToModeler(sleepTimeout, credentials) {
|
|
100
|
-
await this.goTo(
|
|
105
|
+
await this.goTo(MODELER_CONTEXT_PATH, this.modelerPageBanner, sleepTimeout, credentials);
|
|
101
106
|
}
|
|
102
107
|
async goToTasklist(sleepTimeout, credentials) {
|
|
103
108
|
await this.goTo(`${ORCHESTRATION_CONTEXT_PATH}/tasklist`, this.tasklistPageBanner, sleepTimeout, credentials);
|
|
@@ -106,7 +111,7 @@ class NavigationPage {
|
|
|
106
111
|
await this.goTo(`${ORCHESTRATION_CONTEXT_PATH}/operate`, this.operatePageBanner, sleepTimeout, credentials);
|
|
107
112
|
}
|
|
108
113
|
async goToOptimize(sleepTimeout, credentials) {
|
|
109
|
-
await this.goTo(
|
|
114
|
+
await this.goTo(OPTIMIZE_CONTEXT_PATH, this.optimizePageBanner, sleepTimeout, credentials);
|
|
110
115
|
}
|
|
111
116
|
async goToKeycloak() {
|
|
112
117
|
const keycloakUrl = process.env.KEYCLOAK_URL
|
|
@@ -119,10 +124,10 @@ class NavigationPage {
|
|
|
119
124
|
await this.goTo(`${ORCHESTRATION_CONTEXT_PATH}/identity`, this.identityPageBanner, sleepTimeout, credentials);
|
|
120
125
|
}
|
|
121
126
|
async goToConsole(sleepTimeout, credentials) {
|
|
122
|
-
await this.goTo(
|
|
127
|
+
await this.goTo(CONSOLE_CONTEXT_PATH, this.consolePageBanner, sleepTimeout, credentials);
|
|
123
128
|
}
|
|
124
129
|
async goToManagementIdentity(sleepTimeout, credentials) {
|
|
125
|
-
await this.goTo(
|
|
130
|
+
await this.goTo(MANAGEMENT_IDENTITY_CONTEXT_PATH, this.managementIdentityPageBanner, sleepTimeout, credentials);
|
|
126
131
|
}
|
|
127
132
|
}
|
|
128
133
|
exports.NavigationPage = NavigationPage;
|