@camunda/e2e-test-suite 0.0.1648 → 0.0.1650

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.
@@ -81,6 +81,7 @@ declare class ClusterPage {
81
81
  clickClusterNameInput(options?: {
82
82
  recoverViaClusterList?: boolean;
83
83
  }): Promise<void>;
84
+ cloudProviderOption(region: string): Locator;
84
85
  fillClusterNameInput(name: string): Promise<void>;
85
86
  private extractClusterIdFromUrl;
86
87
  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
@@ -398,6 +398,16 @@ class ClusterPage {
398
398
  : {}),
399
399
  });
400
400
  }
401
+ // The Console's "Select cloud provider" radiogroup now names its options
402
+ // by the provider's full name with the short code in parentheses ("Google
403
+ // Cloud (GCP)", "Amazon Web Services (AWS)"); older builds named them
404
+ // "GCP"/"AWS" (or rendered Carbon tabs). Accept all three shapes. Ported
405
+ // from pages/8.9/ClusterPage.ts.
406
+ cloudProviderOption(region) {
407
+ return this.page.getByRole('tab', { name: region }).or(this.page.getByRole('radio', {
408
+ name: new RegExp(`^(${region}|.+ \\(${region}\\))$`),
409
+ }));
410
+ }
401
411
  async fillClusterNameInput(name) {
402
412
  await this.clusterNameInput.fill(name);
403
413
  }
@@ -423,14 +433,7 @@ class ClusterPage {
423
433
  await this.clickClusterNameInput();
424
434
  await this.fillClusterNameInput(name);
425
435
  await this.clickClusterType();
426
- // Same design-system role="radio" fallback as the choice()-wrapped
427
- // locators above -- `region` is a runtime parameter ('GCP'/'AWS') so
428
- // this can't reuse a named locator directly. Ported from
429
- // pages/8.9/ClusterPage.ts.
430
- await this.page
431
- .getByRole('tab', { name: region })
432
- .or(this.page.getByRole('radio', { name: region, exact: true }))
433
- .click();
436
+ await this.cloudProviderOption(region).click();
434
437
  await this.selectSubRegion(region, subRegion);
435
438
  await this.clickClusterOption();
436
439
  await this.determineTasklistAPI(tasklistV1Api);
@@ -46,6 +46,7 @@ declare class ClusterPage {
46
46
  clickClusterTab(): Promise<void>;
47
47
  clickCreateNewClusterButton(): Promise<void>;
48
48
  clickClusterNameInput(): Promise<void>;
49
+ cloudProviderOption(region: string): Locator;
49
50
  fillClusterNameInput(name: string): Promise<void>;
50
51
  private extractClusterIdFromUrl;
51
52
  private logClusterCreationInfo;
@@ -105,7 +105,7 @@ class ClusterPage {
105
105
  this.devTab = choice(page.getByRole('tab', { name: 'Internal Dev' }), 'Internal Dev');
106
106
  this.stableTab = choice(page.getByRole('tab', { name: 'Stable' }), 'Stable');
107
107
  this.qaGenerationsTab = choice(page.getByRole('tab', { name: 'QA Generations' }), 'QA Generations');
108
- this.gcpRegion = choice(page.getByRole('tab', { name: 'GCP' }), 'GCP');
108
+ this.gcpRegion = this.cloudProviderOption('GCP');
109
109
  this.clustersList = page
110
110
  .getByRole('row')
111
111
  .filter({ hasNotText: 'Generation' }); //Filter out header row
@@ -255,6 +255,16 @@ class ClusterPage {
255
255
  },
256
256
  });
257
257
  }
258
+ // The Console's "Select cloud provider" radiogroup now names its options
259
+ // by the provider's full name with the short code in parentheses ("Google
260
+ // Cloud (GCP)", "Amazon Web Services (AWS)"); older builds named them
261
+ // "GCP"/"AWS" (or rendered Carbon tabs). Accept all three shapes. Ported
262
+ // from pages/8.9/ClusterPage.ts.
263
+ cloudProviderOption(region) {
264
+ return this.page.getByRole('tab', { name: region }).or(this.page.getByRole('radio', {
265
+ name: new RegExp(`^(${region}|.+ \\(${region}\\))$`),
266
+ }));
267
+ }
258
268
  async fillClusterNameInput(name) {
259
269
  await this.clusterNameInput.fill(name);
260
270
  }
@@ -280,14 +290,7 @@ class ClusterPage {
280
290
  await this.clickClusterNameInput();
281
291
  await this.fillClusterNameInput(name);
282
292
  await this.clickClusterType();
283
- // Same design-system role="radio" fallback as the choice()-wrapped
284
- // locators above -- `region` is a runtime parameter ('GCP'/'AWS') so
285
- // this can't reuse a named locator directly. Ported from
286
- // pages/8.9/ClusterPage.ts.
287
- await this.page
288
- .getByRole('tab', { name: region })
289
- .or(this.page.getByRole('radio', { name: region, exact: true }))
290
- .click();
293
+ await this.cloudProviderOption(region).click();
291
294
  await this.selectSubRegion(region);
292
295
  await this.clickClusterOption();
293
296
  await this.determineTasklistAPI(tasklistV1Api);
@@ -9,6 +9,9 @@ const clusterVersions_1 = require("../../utils/clusterVersions");
9
9
  // Classic Console renders the status as "Creating"; Camunda Hub's cluster
10
10
  // table renders "Creating…" (Unicode ellipsis), which an exact match misses.
11
11
  const CREATING_STATUS = /^Creating(…|\.\.\.)?$/;
12
+ // Accessible name of a cloud-provider radio: the bare code ("GCP") or the
13
+ // full name ending with the code in parentheses ("Google Cloud (GCP)").
14
+ const providerName = (code) => new RegExp(`^(?:${code}|.*\\(${code}\\))$`);
12
15
  class ClusterPage {
13
16
  page;
14
17
  defaultClusterType = 'G3-Dev';
@@ -110,7 +113,11 @@ class ClusterPage {
110
113
  // a nightly trace's DOM has
111
114
  // <button role="radio" aria-checked="true" data-slot="toggle-group-item">GCP</button>
112
115
  // inside a role="radiogroup", and no role="tab" anywhere on the form.
113
- this.gcpRegion = choice(page.getByRole('tab', { name: 'GCP' }), 'GCP');
116
+ // The radio was later renamed from "GCP" to "Google Cloud (GCP)" (and
117
+ // "AWS" to "Amazon Web Services (AWS)"), so match either name.
118
+ this.gcpRegion = page
119
+ .getByRole('tab', { name: 'GCP' })
120
+ .or(page.getByRole('radio', { name: providerName('GCP') }));
114
121
  this.clustersList = page
115
122
  .getByRole('row')
116
123
  .filter({ hasNotText: 'Generation' }); //Filter out header row
@@ -313,10 +320,14 @@ class ClusterPage {
313
320
  // GCP already selected -- so a `role=tab` click both targeted nothing and
314
321
  // was unnecessary. Accept either shape and skip the click when the option is
315
322
  // already the selected one.
323
+ //
324
+ // The provider radios are now named "Google Cloud (GCP)" / "Amazon Web
325
+ // Services (AWS)" instead of the bare "GCP" / "AWS", so match the bare code
326
+ // or the code in trailing parentheses.
316
327
  async clickProviderOption(region) {
317
328
  const providerOption = this.page
318
329
  .getByRole('tab', { name: region })
319
- .or(this.page.getByRole('radio', { name: region, exact: true }))
330
+ .or(this.page.getByRole('radio', { name: providerName(region) }))
320
331
  .first();
321
332
  await (0, test_1.expect)(providerOption).toBeVisible({ timeout: 40000 });
322
333
  if ((await providerOption.getAttribute('aria-checked')) === 'true') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1648",
3
+ "version": "0.0.1650",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",