@camunda/e2e-test-suite 0.0.1320 → 0.0.1321

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.
@@ -313,7 +313,15 @@ class ModelerHomePage {
313
313
  // resource is one level down, so re-enter the container first.
314
314
  async clickProcessDiagram(name) {
315
315
  await this.ensureInResourceContainer();
316
- const process = this.rows.filter({ hasText: name }).getByTitle(name).first();
316
+ // A Design System table row opens through a link laid over the row, which
317
+ // sits on top of the title text and takes its clicks -- so click the link.
318
+ // The link comes before the title in DOM order, so `first()` picks it
319
+ // whenever it exists; the title stays as the fallback for the classic table.
320
+ const row = this.rows.filter({ hasText: name });
321
+ const process = row
322
+ .getByRole('link', { name })
323
+ .or(row.getByTitle(name))
324
+ .first();
317
325
  await (0, test_1.expect)(process).toBeVisible({ timeout: 90000 });
318
326
  await process.click();
319
327
  }
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProcessApplicationPage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
5
  const submitModalWithRetry_1 = require("../../utils/assertionHelpers/submitModalWithRetry");
6
+ const sessionRecovery_1 = require("../../utils/sessionRecovery");
6
7
  // Which process application holds the current test's resources, and which
7
8
  // cluster its development stage currently points at. Keyed by the Playwright
8
9
  // Page because the object that creates the container (ModelerHomePage) and the
@@ -135,6 +136,11 @@ class ProcessApplicationPage {
135
136
  const perAttempt = Math.ceil(timeout / attempts);
136
137
  const remaining = () => Math.max(deadline - Date.now(), 1000);
137
138
  for (let attempt = 1; attempt < attempts; attempt++) {
139
+ // Hub can drop its session on a navigation and bounce through
140
+ // /login-callback to the identity provider, where neither reloading nor
141
+ // waiting renders the content -- re-authenticate first.
142
+ await (0, sessionRecovery_1.recoverStuckModelerLogin)(this.page);
143
+ await (0, sessionRecovery_1.restoreSessionIfLoggedOut)(this.page);
138
144
  const ready = await target
139
145
  .waitFor({ state: 'visible', timeout: Math.min(perAttempt, remaining()) })
140
146
  .then(() => true)
@@ -143,8 +149,15 @@ class ProcessApplicationPage {
143
149
  return;
144
150
  }
145
151
  console.warn(`Process application content did not render (attempt ${attempt}/${attempts}); reloading.`);
146
- await this.page.reload({ waitUntil: 'load', timeout: remaining() });
152
+ // 'domcontentloaded': a reload that bounces through /login-callback
153
+ // never reaches "load", and recovery above needs the page back.
154
+ await this.page.reload({
155
+ waitUntil: 'domcontentloaded',
156
+ timeout: remaining(),
157
+ });
147
158
  }
159
+ await (0, sessionRecovery_1.recoverStuckModelerLogin)(this.page);
160
+ await (0, sessionRecovery_1.restoreSessionIfLoggedOut)(this.page);
148
161
  await (0, test_1.expect)(target).toBeVisible({ timeout: remaining() });
149
162
  }
150
163
  async clickCreateProcessApplicationButton() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1320",
3
+ "version": "0.0.1321",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",