@camunda/e2e-test-suite 0.0.802 → 0.0.804

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 app shell to render, reloading on transient upstream
99
- // errors (e.g. nginx 503 during pod restarts). Uses the banner link as a
100
- // stable signal that the SPA has mounted successfully.
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
- const startTime = Date.now();
103
- while (Date.now() - startTime < timeoutMs) {
104
- if (await this.modelerPageBanner.isVisible().catch(() => false)) {
105
- return;
106
- }
107
- // The Modeler upstream can return a transient 503 (nginx) while its
108
- // pod restarts. Reload the error page until the app shell renders.
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.802",
3
+ "version": "0.0.804",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",