@camunda/e2e-test-suite 0.0.1380 → 0.0.1382

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.
@@ -2,6 +2,7 @@ import { Page, Locator } from '@playwright/test';
2
2
  declare class ClusterPage {
3
3
  private page;
4
4
  private defaultClusterType;
5
+ private createdClusterIds;
5
6
  readonly belgiumRegion: Locator;
6
7
  readonly finlandRegion: Locator;
7
8
  readonly londonRegion: Locator;
@@ -33,8 +34,8 @@ declare class ClusterPage {
33
34
  readonly clusterHealthiness: (clusterName: string) => Locator;
34
35
  readonly clusterLink: (clusterName: string) => Locator;
35
36
  readonly dialog: Locator;
36
- private createdClusterIds;
37
37
  constructor(page: Page);
38
+ private createdClusterRow;
38
39
  clickClusterBanner(): Promise<void>;
39
40
  deleteCluster(name: string): Promise<void>;
40
41
  clickClusterTab(): Promise<void>;
@@ -45,7 +46,6 @@ declare class ClusterPage {
45
46
  selectSubRegion(region: string): Promise<void>;
46
47
  private extractClusterIdFromUrl;
47
48
  private logClusterCreationInfo;
48
- private createdClusterRow;
49
49
  clickClusterType(): Promise<void>;
50
50
  clickCreateClusterButton(): Promise<void>;
51
51
  clickClustersBreadcrumb(clusterName: string): Promise<void>;
@@ -9,6 +9,9 @@ const clusterVersions_1 = require("../../utils/clusterVersions");
9
9
  class ClusterPage {
10
10
  page;
11
11
  defaultClusterType = 'G3-Dev';
12
+ // Id of the cluster this page object created, keyed by name. Rows share the
13
+ // cluster name, so status checks must target the created row by its id.
14
+ createdClusterIds = new Map();
12
15
  belgiumRegion;
13
16
  finlandRegion;
14
17
  londonRegion;
@@ -40,10 +43,6 @@ class ClusterPage {
40
43
  clusterHealthiness;
41
44
  clusterLink;
42
45
  dialog;
43
- // Cluster names are not unique: a concurrent or leftover same-named
44
- // cluster (possibly being deleted) can be the first matching row. Remember
45
- // the id of the cluster this page created so its own row is tracked.
46
- createdClusterIds = new Map();
47
46
  constructor(page) {
48
47
  this.page = page;
49
48
  this.dialog = page.getByRole('dialog');
@@ -112,7 +111,7 @@ class ClusterPage {
112
111
  has: page.getByRole('link', { name: clusterName, exact: true }),
113
112
  })
114
113
  .first();
115
- this.clusterHealthiness = (clusterName) => this.cluster(clusterName).getByText(`Healthy`, {
114
+ this.clusterHealthiness = (clusterName) => this.createdClusterRow(clusterName).getByText(`Healthy`, {
116
115
  exact: true,
117
116
  });
118
117
  this.clusterLink = (clusterName) => this.cluster(clusterName).getByRole('link', {
@@ -120,6 +119,18 @@ class ClusterPage {
120
119
  exact: true,
121
120
  });
122
121
  }
122
+ // The row of the cluster created by createCluster(), or the first row with
123
+ // that name otherwise. A same-named leftover (e.g. still "Deleting" after
124
+ // the pre-clean on a retry, or created by a parallel run) sorts above the new
125
+ // cluster and never reaches "Creating…"/"Healthy" for this test.
126
+ createdClusterRow(clusterName) {
127
+ const clusterId = this.createdClusterIds.get(clusterName);
128
+ if (!clusterId)
129
+ return this.cluster(clusterName);
130
+ return this.clustersList
131
+ .filter({ has: this.page.locator(`a[href$="/cluster/${clusterId}"]`) })
132
+ .first();
133
+ }
123
134
  async clickClusterBanner() {
124
135
  // Camunda Hub has no `banner` landmark; "Clusters" instead lives in its
125
136
  // persistent "Main navigation" sidebar, and once the org has environments
@@ -344,14 +355,6 @@ class ClusterPage {
344
355
  console.warn(`⚠️ Could not extract cluster info for "${clusterName}": ${error}`);
345
356
  }
346
357
  }
347
- createdClusterRow(name) {
348
- const clusterId = this.createdClusterIds.get(name);
349
- if (!clusterId)
350
- return this.cluster(name);
351
- return this.clustersList
352
- .filter({ has: this.page.locator(`a[href*="${clusterId}"]`) })
353
- .first();
354
- }
355
358
  async clickClusterType() {
356
359
  if (process.env.IS_PROD !== 'true') {
357
360
  await (0, test_1.expect)(this.g3DevClusterType).toBeVisible({ timeout: 60000 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1380",
3
+ "version": "0.0.1382",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",