@camunda/e2e-test-suite 0.0.860 → 0.0.861

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.
@@ -41,6 +41,8 @@ declare class ClusterDetailsPage {
41
41
  readonly clientRow: (name: string) => Locator;
42
42
  readonly clientRowDeleteButton: (name: string) => Locator;
43
43
  readonly reviewUpdateButton: Locator;
44
+ readonly selectTargetVersionDialog: Locator;
45
+ readonly targetVersionOption: (version: string) => Locator;
44
46
  readonly updateAvailableDialog: Locator;
45
47
  readonly updateButton: Locator;
46
48
  readonly nextButton: Locator;
@@ -47,6 +47,8 @@ class ClusterDetailsPage {
47
47
  clientRow;
48
48
  clientRowDeleteButton;
49
49
  reviewUpdateButton;
50
+ selectTargetVersionDialog;
51
+ targetVersionOption;
50
52
  updateAvailableDialog;
51
53
  updateButton;
52
54
  nextButton;
@@ -150,6 +152,17 @@ class ClusterDetailsPage {
150
152
  this.clientRow = (name) => this.clientsList.filter({ hasText: name });
151
153
  this.clientRowDeleteButton = (name) => this.clientRow(name).getByRole('button', { name: 'Delete' });
152
154
  this.reviewUpdateButton = page.getByRole('button', { name: 'Review Update' });
155
+ this.selectTargetVersionDialog = page
156
+ .getByRole('dialog')
157
+ .filter({ hasText: 'Select target version' });
158
+ this.targetVersionOption = (version) => {
159
+ const escaped = version.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
160
+ // Match the version as a leading token: some options are suffixed with
161
+ // "(latest)" (or similar), others (e.g. in nightly runs) are not.
162
+ return this.selectTargetVersionDialog
163
+ .locator('label')
164
+ .filter({ hasText: new RegExp(`^${escaped}(\\s|$)`) });
165
+ };
153
166
  this.updateAvailableDialog = page
154
167
  .locator('.cds--modal-container')
155
168
  .filter({ hasText: 'Update available' });
@@ -562,6 +575,23 @@ class ClusterDetailsPage {
562
575
  await (0, test_1.expect)(this.nextButton).toBeVisible({ timeout: 30000 });
563
576
  await this.nextButton.click({ timeout: 30000 });
564
577
  await this.page.waitForTimeout(500);
578
+ // When multiple target generations are available for the minor version,
579
+ // Console inserts a "Select target version" step before the final
580
+ // "Update available" step. Pick the intended generation explicitly rather
581
+ // than relying on Console's pre-selection, then advance.
582
+ const hasTargetVersionStep = await this.selectTargetVersionDialog
583
+ .waitFor({ state: 'visible', timeout: 10000 })
584
+ .then(() => true)
585
+ .catch(() => false);
586
+ if (hasTargetVersionStep) {
587
+ const version = process.env.CLUSTER_VERSION;
588
+ if (version) {
589
+ await this.targetVersionOption(version).click({ timeout: 30000 });
590
+ }
591
+ await (0, test_1.expect)(this.nextButton).toBeVisible({ timeout: 30000 });
592
+ await this.nextButton.click({ timeout: 30000 });
593
+ await this.page.waitForTimeout(500);
594
+ }
565
595
  // Final step: Click Update button
566
596
  await (0, test_1.expect)(this.updateButton).toBeVisible({ timeout: 60000 });
567
597
  await this.updateButton.click({ timeout: 60000 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.860",
3
+ "version": "0.0.861",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",