@camunda/e2e-test-suite 0.0.743 → 0.0.744

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.
@@ -10,6 +10,7 @@ declare class NavigationPage {
10
10
  readonly keyboardPageBanner: Locator;
11
11
  readonly managementIdentityPageBanner: Locator;
12
12
  constructor(page: Page);
13
+ private isGatewayErrorPage;
13
14
  goTo(url: string, banner: Locator, sleepTimeout?: number, { username, password, }?: {
14
15
  username?: string;
15
16
  password?: string;
@@ -54,6 +54,15 @@ class NavigationPage {
54
54
  .first();
55
55
  this.keyboardPageBanner = page.locator('#keycloak-bg');
56
56
  }
57
+ async isGatewayErrorPage() {
58
+ return this.page
59
+ .getByRole('heading', {
60
+ name: /50[234]\s+(Bad Gateway|Service Temporarily Unavailable|Gateway Time-?out)/i,
61
+ })
62
+ .first()
63
+ .isVisible()
64
+ .catch(() => false);
65
+ }
57
66
  async goTo(url, banner, sleepTimeout, { username = IDENTITY_FIRSTUSER_USERNAME, password = IDENTITY_FIRSTUSER_PASSWORD, } = {}, maxRetries = 5) {
58
67
  const startTime = Date.now();
59
68
  let timeout = constants_1._1_SECOND_IN_MS * 10;
@@ -69,6 +78,19 @@ class NavigationPage {
69
78
  timeout: 60000,
70
79
  waitUntil: 'domcontentloaded',
71
80
  });
81
+ // A transient ingress or pod-reschedule blip on the shared cluster
82
+ // serves an nginx 50x gateway page in place of the app. Reload with a
83
+ // bounded budget so a short blip self-heals; a sustained outage
84
+ // exhausts the budget and still surfaces as a failed navigation.
85
+ let gatewayReloads = 0;
86
+ while (gatewayReloads < 8 && (await this.isGatewayErrorPage())) {
87
+ await (0, sleep_1.sleep)(constants_1._1_SECOND_IN_MS * 5);
88
+ await this.page.goto(url, {
89
+ timeout: 60000,
90
+ waitUntil: 'domcontentloaded',
91
+ });
92
+ gatewayReloads++;
93
+ }
72
94
  const loginPage = new LoginPage_1.LoginPage(this.page);
73
95
  const loginEntryPoint = banner
74
96
  .or(loginPage.usernameInput)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.743",
3
+ "version": "0.0.744",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",