@camunda/e2e-test-suite 0.0.1644 → 0.0.1646

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.
@@ -7,6 +7,9 @@ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLoc
7
7
  const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
8
8
  const clusterVersions_1 = require("../../utils/clusterVersions");
9
9
  const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
10
+ // Accessible name of a cloud-provider radio: the bare code ("GCP") or the
11
+ // full name ending with the code in parentheses ("Google Cloud (GCP)").
12
+ const providerName = (code) => new RegExp(`^(?:${code}|.*\\(${code}\\))$`);
10
13
  class ClusterPage {
11
14
  page;
12
15
  defaultClusterType = 'G3-Dev';
@@ -93,7 +96,11 @@ class ClusterPage {
93
96
  this.devTab = choice(page.getByRole('tab', { name: 'Internal Dev' }), 'Internal Dev');
94
97
  this.stableTab = choice(page.getByRole('tab', { name: 'Stable' }), 'Stable');
95
98
  this.qaGenerationsTab = choice(page.getByRole('tab', { name: 'QA Generations' }), 'QA Generations');
96
- this.gcpRegion = choice(page.getByRole('tab', { name: 'GCP' }), 'GCP');
99
+ // The provider radio was renamed from "GCP" to "Google Cloud (GCP)" (and
100
+ // "AWS" to "Amazon Web Services (AWS)"), so match either name.
101
+ this.gcpRegion = page
102
+ .getByRole('tab', { name: 'GCP' })
103
+ .or(page.getByRole('radio', { name: providerName('GCP') }));
97
104
  this.belgiumRegion = choice(page.locator('label').filter({
98
105
  hasText: 'Chaos, Belgium, Europe (europe-west1)',
99
106
  }), 'Chaos, Belgium, Europe (europe-west1)');
@@ -358,7 +365,7 @@ class ClusterPage {
358
365
  await this.clickClusterType();
359
366
  await this.page
360
367
  .getByRole('tab', { name: region })
361
- .or(this.page.getByRole('radio', { name: region, exact: true }))
368
+ .or(this.page.getByRole('radio', { name: providerName(region) }))
362
369
  .click();
363
370
  await this.selectSubRegion(region);
364
371
  await this.clickClusterOption(process.env.CLUSTER_VERSION);
@@ -43,6 +43,7 @@ declare class ClusterPage {
43
43
  clickClusterTab(): Promise<void>;
44
44
  clickCreateNewClusterButton(): Promise<void>;
45
45
  clickClusterNameInput(): Promise<void>;
46
+ cloudProviderOption(region: string): Locator;
46
47
  fillClusterNameInput(name: string): Promise<void>;
47
48
  private extractClusterIdFromUrl;
48
49
  private logClusterCreationInfo;
@@ -114,7 +114,7 @@ class ClusterPage {
114
114
  this.devTab = choice(page.getByRole('tab', { name: 'Internal Dev' }), 'Internal Dev');
115
115
  this.stableTab = choice(page.getByRole('tab', { name: 'Stable' }), 'Stable');
116
116
  this.qaGenerationsTab = choice(page.getByRole('tab', { name: 'QA Generations' }), 'QA Generations');
117
- this.gcpRegion = choice(page.getByRole('tab', { name: 'GCP' }), 'GCP');
117
+ this.gcpRegion = this.cloudProviderOption('GCP');
118
118
  this.clustersList = page
119
119
  .getByRole('row')
120
120
  .filter({ hasNotText: 'Generation' }); //Filter out header row
@@ -256,6 +256,15 @@ class ClusterPage {
256
256
  },
257
257
  });
258
258
  }
259
+ // The Console's "Select cloud provider" radiogroup now names its options
260
+ // by the provider's full name with the short code in parentheses ("Google
261
+ // Cloud (GCP)", "Amazon Web Services (AWS)"); older builds named them
262
+ // "GCP"/"AWS" (or rendered Carbon tabs). Accept all three shapes.
263
+ cloudProviderOption(region) {
264
+ return this.page.getByRole('tab', { name: region }).or(this.page.getByRole('radio', {
265
+ name: new RegExp(`^(${region}|.+ \\(${region}\\))$`),
266
+ }));
267
+ }
259
268
  async fillClusterNameInput(name) {
260
269
  await this.clusterNameInput.fill(name);
261
270
  }
@@ -298,10 +307,7 @@ class ClusterPage {
298
307
  await this.clickClusterNameInput();
299
308
  await this.fillClusterNameInput(name);
300
309
  await this.clickClusterType();
301
- await this.page
302
- .getByRole('tab', { name: region })
303
- .or(this.page.getByRole('radio', { name: region, exact: true }))
304
- .click();
310
+ await this.cloudProviderOption(region).click();
305
311
  await this.selectSubRegion(region);
306
312
  await this.clickClusterOption();
307
313
  await this.determineTasklistAPI(tasklistV1Api);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1644",
3
+ "version": "0.0.1646",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",