@camunda/e2e-test-suite 0.0.1769 → 0.0.1770

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.
@@ -74,6 +74,7 @@ declare class ModelerHomePage {
74
74
  private clickCreateProcessApplication;
75
75
  private ensureInResourceContainer;
76
76
  returnToResourceContainer(): Promise<void>;
77
+ private gotoAcrossHubRefresh;
77
78
  private isOnHubLoginRoute;
78
79
  startBlankBpmnDiagram(): Promise<void>;
79
80
  private becameVisible;
@@ -624,9 +624,7 @@ class ModelerHomePage {
624
624
  // /login-callback. Its code is single-use, so recover with a fresh goto,
625
625
  // never a reload; any other failure still throws.
626
626
  for (let attempt = 1;; attempt++) {
627
- await this.page.goto(this.processApplicationUrl, {
628
- waitUntil: 'domcontentloaded',
629
- });
627
+ await this.gotoAcrossHubRefresh(this.processApplicationUrl);
630
628
  try {
631
629
  await this.processApplicationPage.waitForProcessApplication(attempt === 1 ? 90000 : 150000);
632
630
  break;
@@ -643,6 +641,25 @@ class ModelerHomePage {
643
641
  }
644
642
  await this.dismissOverlays();
645
643
  }
644
+ // After a Hub redeploy the server answers the stale client with status 230
645
+ // and the client reloads itself 5s later (camunda-hub handleAppRefresh);
646
+ // that reload, or the login redirect it triggers, aborts an in-flight goto
647
+ // with net::ERR_ABORTED. Let it land, then navigate again.
648
+ async gotoAcrossHubRefresh(url) {
649
+ for (let attempt = 1;; attempt++) {
650
+ try {
651
+ await this.page.goto(url, { waitUntil: 'domcontentloaded' });
652
+ return;
653
+ }
654
+ catch (error) {
655
+ if (attempt === 3 || !String(error).includes('ERR_ABORTED')) {
656
+ throw error;
657
+ }
658
+ console.warn(`goto ${url} aborted by an in-page navigation (attempt ${attempt}); retrying.`);
659
+ await this.page.waitForLoadState('load');
660
+ }
661
+ }
662
+ }
646
663
  // Hub's own /login and /login-callback routes render only a spinner
647
664
  // (camunda-hub App.tsx); the identity provider's pages are not these.
648
665
  isOnHubLoginRoute() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1769",
3
+ "version": "0.0.1770",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",