@camunda/e2e-test-suite 0.0.506 → 0.0.507
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.
|
@@ -20,7 +20,7 @@ declare class NavigationPage {
|
|
|
20
20
|
goToTasklist(sleepTimeout?: number): Promise<void>;
|
|
21
21
|
goToOperate(sleepTimeout?: number): Promise<void>;
|
|
22
22
|
goToOptimize(sleepTimeout?: number): Promise<void>;
|
|
23
|
-
goToKeycloak(): Promise<void>;
|
|
23
|
+
goToKeycloak(maxRetries?: number): Promise<void>;
|
|
24
24
|
goToIdentity(sleepTimeout?: number): Promise<void>;
|
|
25
25
|
goToConsole(sleepTimeout?: number): Promise<void>;
|
|
26
26
|
}
|
|
@@ -123,12 +123,27 @@ class NavigationPage {
|
|
|
123
123
|
async goToOptimize(sleepTimeout) {
|
|
124
124
|
await this.goTo('/optimize', this.optimizePageBanner, sleepTimeout);
|
|
125
125
|
}
|
|
126
|
-
async goToKeycloak() {
|
|
126
|
+
async goToKeycloak(maxRetries = 5) {
|
|
127
127
|
const keycloakUrl = process.env.KEYCLOAK_URL
|
|
128
128
|
? `${process.env.KEYCLOAK_URL}/auth`
|
|
129
129
|
: '/auth';
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
let lastError;
|
|
131
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
132
|
+
try {
|
|
133
|
+
await this.page.goto(keycloakUrl);
|
|
134
|
+
await (0, test_1.expect)(this.keyboardPageBanner).toBeVisible({ timeout: 60000 });
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
lastError = error;
|
|
139
|
+
if (attempt < maxRetries - 1) {
|
|
140
|
+
await (0, sleep_1.sleep)(5000);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
throw lastError instanceof Error
|
|
145
|
+
? lastError
|
|
146
|
+
: new Error(`goToKeycloak failed after ${maxRetries} attempts`);
|
|
132
147
|
}
|
|
133
148
|
async goToIdentity(sleepTimeout) {
|
|
134
149
|
await this.goTo('/identity', this.identityPageBanner, sleepTimeout);
|