@camunda/e2e-test-suite 0.0.1726 → 0.0.1727

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.
@@ -59,7 +59,7 @@ declare class ClusterPage {
59
59
  clickClusterOption(version: string): Promise<void>;
60
60
  createClusterIfNotExists(clusterName: string, region?: string): Promise<void>;
61
61
  waitForClusterRestartToStart(name: string, timeout?: number): Promise<void>;
62
- assertClusterHealthyStatusWithRetry(name: string, visibilityTimeout?: number, totalTimeout?: number, isUpgradeScenario?: boolean): Promise<void>;
62
+ assertClusterHealthyStatusWithRetry(name: string, visibilityTimeout?: number, totalTimeout?: number, isUpgradeScenario?: boolean, reauthenticate?: () => Promise<void>): Promise<void>;
63
63
  clickAlphaTab(): Promise<void>;
64
64
  clickDevTab(): Promise<void>;
65
65
  clickStableTab(): Promise<void>;
@@ -528,7 +528,7 @@ class ClusterPage {
528
528
  ? `${name}: restart started, status left Healthy.`
529
529
  : `${name}: status stayed Healthy for ${timeout / 1000}s after the change.`);
530
530
  }
531
- async assertClusterHealthyStatusWithRetry(name, visibilityTimeout = 100000, totalTimeout = 420000, isUpgradeScenario = false) {
531
+ async assertClusterHealthyStatusWithRetry(name, visibilityTimeout = 100000, totalTimeout = 420000, isUpgradeScenario = false, reauthenticate) {
532
532
  // For upgrade scenarios, use much longer timeouts and more retries instead of fixed waits.
533
533
  // After the 8.7->8.8 upgrade the cluster's components report healthy and the generation
534
534
  // flips to 8.8 well before the cluster-list overall Status leaves "Updating"; that overall
@@ -550,6 +550,15 @@ class ClusterPage {
550
550
  maxRetries: maxRetries,
551
551
  preAction: async () => {
552
552
  await this.page.reload();
553
+ // The upgrade wait outlives the Console session: in the 8.7 -> 8.8
554
+ // weekly run, the reload on attempt 10 landed on
555
+ // hub.ultrawombat.com/login and every remaining attempt then polled
556
+ // the login form. Let the caller sign back in and return to the
557
+ // cluster list instead of burning the rest of the budget there.
558
+ if (reauthenticate && /\/login|weblogin\./.test(this.page.url())) {
559
+ console.warn(`${name}: session expired during health wait.`);
560
+ await reauthenticate();
561
+ }
553
562
  await (0, test_1.expect)(this.cluster(name).first()).toBeVisible({ timeout: 60000 });
554
563
  },
555
564
  });
@@ -35,14 +35,29 @@ _8_8_1.test.describe('SaaS Migration Path Tests', () => {
35
35
  await (0, _setup_1.captureScreenshot)(page, testInfo);
36
36
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
37
37
  });
38
- (0, _8_8_1.test)('SaaS UI Upgrade Flow Automation @saasUpgrade', async ({ homePage, clusterPage, clusterDetailsPage, }) => {
38
+ (0, _8_8_1.test)('SaaS UI Upgrade Flow Automation @saasUpgrade', async ({ page, loginPage, homePage, clusterPage, clusterDetailsPage, }, testInfo) => {
39
39
  _8_8_1.test.slow();
40
40
  await _8_8_1.test.step('Navigate to SaaS Upgrade Section', async () => {
41
41
  await homePage.clickClusters();
42
- await clusterPage.clickClusterLink('Test Cluster');
43
- await clusterDetailsPage.performClusterUpdate();
44
- await homePage.clickClusters();
45
- await clusterPage.assertClusterHealthyStatusWithRetry('Test Cluster', undefined, undefined, true);
42
+ await (0, test_1.expect)(clusterPage.cluster('Test Cluster').first()).toBeVisible({
43
+ timeout: 60000,
44
+ });
45
+ // A Playwright retry runs against the same org, so the first attempt
46
+ // may already have moved the cluster to 8.8. Starting the wizard again
47
+ // would then offer (and apply) the next generation, 8.9.
48
+ const alreadyUpgraded = await clusterPage
49
+ .clusterVersion('Test Cluster', '8.8')
50
+ .first()
51
+ .isVisible();
52
+ if (!alreadyUpgraded) {
53
+ await clusterPage.clickClusterLink('Test Cluster');
54
+ await clusterDetailsPage.performClusterUpdate();
55
+ await homePage.clickClusters();
56
+ }
57
+ await clusterPage.assertClusterHealthyStatusWithRetry('Test Cluster', undefined, undefined, true, async () => {
58
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
59
+ await homePage.clickClusters();
60
+ });
46
61
  await (0, test_1.expect)(clusterPage.clusterVersion('Test Cluster', '8.8')).toBeVisible();
47
62
  });
48
63
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1726",
3
+ "version": "0.0.1727",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",