@camunda/e2e-test-suite 0.0.1679 → 0.0.1680
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.
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.KeycloakAdminPage = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
|
+
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
6
7
|
class KeycloakAdminPage {
|
|
7
8
|
page;
|
|
8
9
|
keycloakBanner;
|
|
@@ -42,7 +43,21 @@ class KeycloakAdminPage {
|
|
|
42
43
|
await this.page.click('a[id="nav-item-users"]');
|
|
43
44
|
}
|
|
44
45
|
async clickAddUser() {
|
|
45
|
-
|
|
46
|
+
// The Keycloak admin console lazy-loads the Users section. If that chunk
|
|
47
|
+
// fetch fails, it shows "Failed to fetch dynamically imported module" with
|
|
48
|
+
// a Reload link instead of the section, and it never recovers on its own.
|
|
49
|
+
// Reload the page in that case, then wait for the button again.
|
|
50
|
+
const chunkLoadError = this.page.getByText(/Failed to fetch dynamically imported module/i);
|
|
51
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.addUserButton, {
|
|
52
|
+
totalTimeout: 90000,
|
|
53
|
+
visibilityTimeout: 30000,
|
|
54
|
+
maxRetries: 3,
|
|
55
|
+
postAction: async () => {
|
|
56
|
+
if (await chunkLoadError.isVisible()) {
|
|
57
|
+
await this.page.reload();
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
});
|
|
46
61
|
await this.addUserButton.click();
|
|
47
62
|
}
|
|
48
63
|
async fillUser(username) {
|