@camunda/e2e-test-suite 0.0.802 → 0.0.803
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.
|
@@ -95,26 +95,27 @@ class ModelerHomePage {
|
|
|
95
95
|
await this.projectNameInput.fill(name);
|
|
96
96
|
await this.projectNameInput.press('Enter');
|
|
97
97
|
}
|
|
98
|
-
// Wait for the Modeler
|
|
99
|
-
//
|
|
100
|
-
//
|
|
98
|
+
// Wait for the Modeler project workspace to become interactive. The caller
|
|
99
|
+
// arrives here via goToModeler(), which has already loaded and authenticated
|
|
100
|
+
// the app shell (banner visible). The nav banner mounts before the project
|
|
101
|
+
// list, which renders after an API round-trip, so gate on an actionable
|
|
102
|
+
// element — the "Create new project" button or an existing project folder —
|
|
103
|
+
// rather than the banner, which otherwise lets the caller proceed against a
|
|
104
|
+
// half-loaded shell and time out clicking "Create new project".
|
|
105
|
+
//
|
|
106
|
+
// Deliberately does NOT reload: a raw page.reload() drops the authenticated
|
|
107
|
+
// SPA state (goToModeler handles the OAuth redirect flow; reload does not),
|
|
108
|
+
// which lands on a blank page and makes the workspace element unreachable for
|
|
109
|
+
// the rest of the timeout. Transient upstream 50x is already absorbed by
|
|
110
|
+
// goToModeler's gateway-error re-navigation before we get here.
|
|
101
111
|
async waitForModelerReady(timeoutMs = 120000) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
try {
|
|
110
|
-
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
111
|
-
}
|
|
112
|
-
catch {
|
|
113
|
-
// ignore reload errors and keep polling
|
|
114
|
-
}
|
|
115
|
-
await this.page.waitForTimeout(2000);
|
|
116
|
-
}
|
|
117
|
-
throw new Error(`Modeler app shell did not render within ${timeoutMs}ms (banner not found).`);
|
|
112
|
+
// .first(): when the project folder already exists on the shared cluster,
|
|
113
|
+
// both the create-project button and the folder are present, so the .or()
|
|
114
|
+
// resolves to multiple elements — waitFor() requires a single match.
|
|
115
|
+
await this.createNewProjectButton
|
|
116
|
+
.or(this.crossComponentProjectFolder)
|
|
117
|
+
.first()
|
|
118
|
+
.waitFor({ state: 'visible', timeout: timeoutMs });
|
|
118
119
|
}
|
|
119
120
|
async createCrossComponentProjectFolder() {
|
|
120
121
|
// After a fresh user login (e.g. lisa, bart) the Modeler pod may still be
|