@camunda/e2e-test-suite 0.0.1491 → 0.0.1493
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.
|
@@ -305,8 +305,24 @@ class OCIdentityRolesPage {
|
|
|
305
305
|
.then(() => true)
|
|
306
306
|
.catch(() => false);
|
|
307
307
|
if (!shellVisible) {
|
|
308
|
-
|
|
309
|
-
|
|
308
|
+
// A reload can land on a transient ingress 503 page with no app shell,
|
|
309
|
+
// so reload again with backoff before asserting the nav is back.
|
|
310
|
+
const maxReloads = 3;
|
|
311
|
+
for (let reload = 1; reload <= maxReloads; reload++) {
|
|
312
|
+
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
313
|
+
if (reload === maxReloads) {
|
|
314
|
+
await (0, test_1.expect)(this.rolesNavTab).toBeVisible({ timeout });
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
const navBack = await this.rolesNavTab
|
|
318
|
+
.waitFor({ state: 'visible', timeout: Math.min(timeout, 20000) })
|
|
319
|
+
.then(() => true)
|
|
320
|
+
.catch(() => false);
|
|
321
|
+
if (navBack) {
|
|
322
|
+
break;
|
|
323
|
+
}
|
|
324
|
+
await this.page.waitForTimeout(5000 * reload);
|
|
325
|
+
}
|
|
310
326
|
}
|
|
311
327
|
await this.rolesNavTab.click({ timeout });
|
|
312
328
|
await (0, test_1.expect)(this.createRoleButton.first()).toBeVisible({ timeout });
|
|
@@ -322,11 +338,16 @@ class OCIdentityRolesPage {
|
|
|
322
338
|
.isVisible()
|
|
323
339
|
.catch(() => false);
|
|
324
340
|
if (modalOpen) {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
.
|
|
341
|
+
// The first Escape only closes the MultiSelect popover when it is open,
|
|
342
|
+
// so press it once more if the dialog is still up.
|
|
343
|
+
let closed = false;
|
|
344
|
+
for (let press = 0; press < 2 && !closed; press++) {
|
|
345
|
+
await this.page.keyboard.press('Escape');
|
|
346
|
+
closed = await this.assignMappingModal
|
|
347
|
+
.waitFor({ state: 'hidden', timeout: press === 0 ? 5000 : 15000 })
|
|
348
|
+
.then(() => true)
|
|
349
|
+
.catch(() => false);
|
|
350
|
+
}
|
|
330
351
|
if (!closed) {
|
|
331
352
|
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
332
353
|
}
|
|
@@ -66,6 +66,7 @@ declare class OCTenantPage {
|
|
|
66
66
|
clickRoleIdSearchBox(): Promise<void>;
|
|
67
67
|
private ensureRoleIdSearchBoxOpen;
|
|
68
68
|
fillRoleIdSearchBox(roleId: string, roleIdentifier: string): Promise<void>;
|
|
69
|
+
private closeRoleIdPopover;
|
|
69
70
|
clickAssignRoleSubButton(): Promise<void>;
|
|
70
71
|
private isRoleAssigned;
|
|
71
72
|
assignRoleToTenant(roleId: string, roleIdentifier: string): Promise<void>;
|
|
@@ -356,6 +356,24 @@ class OCTenantPage {
|
|
|
356
356
|
` any of: ${searchTerms.join(', ')}`);
|
|
357
357
|
}).toPass({ timeout: 120000, intervals: [2000] });
|
|
358
358
|
await result.click();
|
|
359
|
+
await this.closeRoleIdPopover();
|
|
360
|
+
}
|
|
361
|
+
// The MultiSelect popover stays open after an option is picked, and its
|
|
362
|
+
// portalled listbox overlays the dialog footer, intercepting the click on
|
|
363
|
+
// the Assign role button. Escape is only sent while the popover is open: in
|
|
364
|
+
// the legacy shell there is none, and Escape would close the dialog itself.
|
|
365
|
+
async closeRoleIdPopover() {
|
|
366
|
+
const popover = this.page.locator('[data-slot="multi-select-content"]');
|
|
367
|
+
if (!(await popover.isVisible().catch(() => false))) {
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
await (0, test_1.expect)(async () => {
|
|
371
|
+
if (await popover.isVisible()) {
|
|
372
|
+
await this.page.keyboard.press('Escape');
|
|
373
|
+
}
|
|
374
|
+
await (0, test_1.expect)(popover).toBeHidden({ timeout: 5000 });
|
|
375
|
+
}).toPass({ timeout: 30000, intervals: [1000] });
|
|
376
|
+
await (0, test_1.expect)(this.assignRoleSubButton).toBeVisible();
|
|
359
377
|
}
|
|
360
378
|
async clickAssignRoleSubButton() {
|
|
361
379
|
await this.assignRoleSubButton.click();
|