@camunda/e2e-test-suite 0.0.948 → 0.0.949

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.
@@ -19,6 +19,7 @@ declare class AppsPage {
19
19
  readonly camundaComponentsButton: Locator;
20
20
  readonly camundaAppsButton: Locator;
21
21
  constructor(page: Page);
22
+ private reloadForRecovery;
22
23
  clickCluster(component: Locator, name: string): Promise<void>;
23
24
  clickModeler(): Promise<void>;
24
25
  private isModelerAuthTransit;
@@ -62,6 +62,41 @@ class AppsPage {
62
62
  name: /^(Admin|Identity)$/, // Identity Should be removed after https://github.com/camunda/camunda/issues/46447 is fixed
63
63
  });
64
64
  }
65
+ // Recovery step of the app hand-off loops below (`clickTasklist`,
66
+ // `clickOperate`, `clickOptimize`). Each of those clicks starts the cluster
67
+ // SSO hand-off, so when the attempt fails the tab usually still has a
68
+ // navigation in flight — and a reload that races one fails with
69
+ // `net::ERR_ABORTED; maybe frame was detached?`. Called unguarded from
70
+ // inside the loop's own `catch`, that rejection escaped the very loop that
71
+ // was about to re-click the link, so the run ended on the RECOVERY step
72
+ // with no failing assertion and no named hop. That is the signature three
73
+ // consecutive 8.10 nightlies reported from `clickOperate` (runs
74
+ // 31477774469, 31667751303, 31770471935) and the one the smoke flow failed
75
+ // 3/3 on. Let the in-flight hand-off settle first, then treat a
76
+ // re-navigation that still fails as one spent attempt: a link that
77
+ // genuinely never opens the app still fails through each loop's own
78
+ // attempt limit and its existing "Failed to click the <app> link after N
79
+ // attempts" diagnostic. The same guarding pattern is already used in
80
+ // `OptimizeHomePage.assertProcessImportedWithRetry`,
81
+ // `OperateProcessesPage.returnToProcessesList` and
82
+ // `OperateProcessInstancePage.reload`.
83
+ async reloadForRecovery(whileDoing) {
84
+ if (this.page.isClosed()) {
85
+ return;
86
+ }
87
+ try {
88
+ await this.page.waitForLoadState('load', { timeout: 20000 });
89
+ }
90
+ catch (error) {
91
+ console.warn(`Page did not settle before reloading while ${whileDoing}: ${error}`);
92
+ }
93
+ try {
94
+ await this.page.reload();
95
+ }
96
+ catch (error) {
97
+ console.warn(`Could not reload while ${whileDoing}: ${error}`);
98
+ }
99
+ }
65
100
  async clickCluster(component, name) {
66
101
  const cluster = component.getByRole('link', { name: name, exact: true });
67
102
  await (0, test_1.expect)(cluster).toBeVisible({ timeout: 30000 });
@@ -240,10 +275,7 @@ class AppsPage {
240
275
  catch (error) {
241
276
  console.warn(`Click attempt ${retries + 1} failed: ${error}`);
242
277
  if (!this.page.isClosed()) {
243
- await this.page
244
- .waitForLoadState('load', { timeout: 20000 })
245
- .catch(() => { });
246
- await this.page.reload();
278
+ await this.reloadForRecovery('opening Tasklist');
247
279
  await (0, sleep_1.sleep)(20000);
248
280
  }
249
281
  }
@@ -410,8 +442,7 @@ class AppsPage {
410
442
  }
411
443
  catch (error) {
412
444
  console.warn(`Click attempt ${retries + 1} failed: ${error}`);
413
- await this.page.waitForLoadState('domcontentloaded');
414
- await this.page.reload();
445
+ await this.reloadForRecovery('opening Operate');
415
446
  await (0, sleep_1.sleep)(20000);
416
447
  }
417
448
  }
@@ -444,8 +475,7 @@ class AppsPage {
444
475
  }
445
476
  catch (error) {
446
477
  console.warn(`Click attempt ${retries + 1} failed: ${error}`);
447
- await this.page.waitForLoadState('domcontentloaded');
448
- await this.page.reload();
478
+ await this.reloadForRecovery('opening Optimize');
449
479
  await (0, sleep_1.sleep)(20000);
450
480
  }
451
481
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.948",
3
+ "version": "0.0.949",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",