@camunda/e2e-test-suite 0.0.1701 → 0.0.1703

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.
@@ -351,6 +351,20 @@ class ClusterSecretsPage {
351
351
  const mapped = secrets
352
352
  .map((secret) => `${secret.name}=${secret.value}`)
353
353
  .join('\n');
354
+ // The secrets panel can render Carbon's "Oops ... something went wrong."
355
+ // state when a background request fails -- the same transient
356
+ // createNewSecret() handles below. It only clears on a reload, and the
357
+ // menu-open loop that follows merely reopens the dropdown, so it can
358
+ // never bring back an Import button the panel failed to render. Reload
359
+ // and re-select the tab until the panel's own Import control is present.
360
+ await (0, test_1.expect)(async () => {
361
+ if (await this.importButton.isVisible({ timeout: 5000 }).catch(() => false)) {
362
+ return;
363
+ }
364
+ await this.page.reload({ waitUntil: 'domcontentloaded' });
365
+ await this.clusterSecretTab.first().click({ timeout: 15000 });
366
+ await (0, test_1.expect)(this.importButton).toBeVisible({ timeout: 15000 });
367
+ }).toPass({ timeout: 90000 });
354
368
  // Hub's Import button opens a Radix dropdown whose "from File" item can
355
369
  // detach before the click lands: the previous set's search-box fill
356
370
  // re-filters the table right as the menu opens, which closes it (nightly
@@ -710,9 +710,22 @@ class ModelerCreatePage {
710
710
  // bootstrap; on slower clusters this can take several minutes.
711
711
  // On a second visit the env is already provisioned — Play loads
712
712
  // directly without the toast, so accept either condition.
713
- await (0, test_1.expect)(this.page
714
- .getByText('Play environment is ready')
715
- .or(this.page.getByTestId('undefined-Start instance'))).toBeVisible({ timeout: 180000 });
713
+ // .first(): the toast and the canvas button can both be visible at
714
+ // once, which is a strict-mode violation without it.
715
+ const envReadyText = this.page.getByText('Play environment is ready');
716
+ const canvasStartButton = this.page.getByTestId('undefined-Start instance');
717
+ await (0, test_1.expect)(envReadyText.or(canvasStartButton).first()).toBeVisible({
718
+ timeout: 180000,
719
+ });
720
+ // The canvas Start button is rendered (and "visible") underneath the
721
+ // provisioning overlay while it still says "Auto-deploying supporting
722
+ // files...". Wait until provisioning has finished (overlay reports
723
+ // ready) or the canvas button actually receives pointer events.
724
+ await (0, test_1.expect)(async () => {
725
+ if (await envReadyText.isVisible())
726
+ return;
727
+ await canvasStartButton.click({ trial: true, timeout: 5000 });
728
+ }).toPass({ timeout: 180000 });
716
729
  return; // Exit if successful
717
730
  }
718
731
  catch (error) {
@@ -23,6 +23,7 @@ declare class PlayPage {
23
23
  waitForCompleteJobButtonToBeAvailable(): Promise<void>;
24
24
  clickCompleteJobButton(): Promise<void>;
25
25
  clickStartInstanceButton(): Promise<void>;
26
+ dismissPlayEnvironmentOverlay(): Promise<void>;
26
27
  dismissStartModal(): Promise<void>;
27
28
  waitForInstanceDetailsToBeLoaded(): Promise<void>;
28
29
  waitForNextElementToBeActive(historyItem: string): Promise<void>;
@@ -83,6 +83,7 @@ class PlayPage {
83
83
  while (attempts < maxRetries) {
84
84
  try {
85
85
  await this.diagram.waitFor({ state: 'visible', timeout: 30000 });
86
+ await this.dismissPlayEnvironmentOverlay();
86
87
  await this.startInstanceButton.click({ timeout: 30000 });
87
88
  await (0, test_1.expect)(this.loadingInstanceDetailsText).toBeVisible();
88
89
  await (0, test_1.expect)(this.loadingInstanceDetailsText).not.toBeVisible({
@@ -100,7 +101,23 @@ class PlayPage {
100
101
  }
101
102
  }
102
103
  }
104
+ // Once Play provisioning finishes, the overlay covering the canvas shows
105
+ // "Play environment is ready" plus a "Start a process instance" button. The
106
+ // overlay is a plain div (not role="dialog") and keeps intercepting clicks
107
+ // on the canvas Start button until it is dismissed via that button. Its
108
+ // exact name never matches the canvas button ("Start instance").
109
+ async dismissPlayEnvironmentOverlay() {
110
+ const overlayButton = this.page.getByRole('button', {
111
+ name: 'Start a process instance',
112
+ exact: true,
113
+ });
114
+ if (await overlayButton.isVisible()) {
115
+ await overlayButton.click({ timeout: 30000 });
116
+ await (0, test_1.expect)(overlayButton).toBeHidden({ timeout: 30000 });
117
+ }
118
+ }
103
119
  async dismissStartModal() {
120
+ await this.dismissPlayEnvironmentOverlay();
104
121
  const buttonVariations = [
105
122
  'Start a process instance',
106
123
  'Start another instance',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1701",
3
+ "version": "0.0.1703",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",