@camunda/e2e-test-suite 0.0.670 → 0.0.672

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.
@@ -1060,10 +1060,27 @@ class ModelerCreatePage {
1060
1060
  const configureEnvDialog = this.page
1061
1061
  .getByRole('dialog')
1062
1062
  .filter({ hasText: 'Configure environment' });
1063
- await configureEnvDialog.getByRole('combobox').click({ timeout });
1064
- await this.page
1065
- .getByRole('option', { name: new RegExp(clusterName, 'i') })
1066
- .click({ timeout });
1063
+ await (0, test_1.expect)(configureEnvDialog).toBeVisible({ timeout });
1064
+ // The "Configure environment" modal lists each available cluster as a
1065
+ // labelled toggle switch (cds--toggle), not as a combobox+option list.
1066
+ // Mirror the legacy `selectCluster` deploy-dialog logic: scope by the
1067
+ // cluster's label, toggle it on, and confirm the switch is checked
1068
+ // before saving. This handles environments with multiple clusters.
1069
+ const clusterLabel = configureEnvDialog
1070
+ .locator('label')
1071
+ .filter({ hasText: clusterName });
1072
+ const clusterSwitch = clusterLabel.getByRole('switch');
1073
+ await (0, test_1.expect)(clusterLabel).toBeVisible({ timeout });
1074
+ const alreadyChecked = (await clusterSwitch.getAttribute('aria-checked')) === 'true';
1075
+ if (!alreadyChecked) {
1076
+ await clusterLabel.click({ timeout });
1077
+ }
1078
+ await (0, test_1.expect)(clusterSwitch).toBeChecked({ timeout });
1079
+ // Wait for "Healthy" status before saving so the deploy step
1080
+ // doesn't race the backend's health check.
1081
+ await (0, test_1.expect)(configureEnvDialog).toContainText('Healthy', {
1082
+ timeout: 30000,
1083
+ });
1067
1084
  await configureEnvDialog
1068
1085
  .getByRole('button', { name: 'Save' })
1069
1086
  .click({ timeout });
@@ -27,6 +27,7 @@ declare class PlayPage {
27
27
  waitForInstanceDetailsToBeLoaded(): Promise<void>;
28
28
  waitForNextElementToBeActive(historyItem: string): Promise<void>;
29
29
  waitForProcessToBeCompleted(): Promise<void>;
30
+ private dismissNotifications;
30
31
  clickSaveScenarioButton(): Promise<void>;
31
32
  clickViewScenarioButton(): Promise<void>;
32
33
  enterScenarioName(scenarioName: string): Promise<void>;
@@ -166,11 +166,32 @@ class PlayPage {
166
166
  timeout: maxWaitTimeSeconds,
167
167
  });
168
168
  }
169
- async clickSaveScenarioButton() {
169
+ // The "<task> completed manually" success toast renders in the top-right
170
+ // corner, directly on top of the "Save scenario" button. These Play toasts
171
+ // do not auto-dismiss, so passively waiting for them to hide times out and a
172
+ // force-click then lands on the toast instead of the button — leaving the
173
+ // save-scenario modal closed. Actively close every open toast before
174
+ // interacting with the button.
175
+ async dismissNotifications() {
176
+ const closeButtons = this.page.getByLabel('Close notification');
177
+ for (let i = 0; i < 5; i++) {
178
+ const count = await closeButtons.count().catch(() => 0);
179
+ if (count === 0) {
180
+ break;
181
+ }
182
+ await closeButtons
183
+ .first()
184
+ .click({ timeout: 5000 })
185
+ .catch(() => { });
186
+ await this.page.waitForTimeout(300);
187
+ }
170
188
  await this.notifications
171
189
  .first()
172
- .waitFor({ state: 'hidden', timeout: 60000 })
190
+ .waitFor({ state: 'hidden', timeout: 10000 })
173
191
  .catch(() => { });
192
+ }
193
+ async clickSaveScenarioButton() {
194
+ await this.dismissNotifications();
174
195
  const isModalVisible = await this.saveScenarioModal
175
196
  .isVisible()
176
197
  .catch(() => false);
@@ -194,6 +215,9 @@ class PlayPage {
194
215
  async enterScenarioName(scenarioName) {
195
216
  await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.dialog, {
196
217
  postAction: async () => {
218
+ // A lingering success toast can cover the "Save scenario" button and
219
+ // swallow the recovery click, so clear it before re-clicking.
220
+ await this.dismissNotifications();
197
221
  await this.saveScenarioButton.click({ timeout: 5000 }).catch(() => { });
198
222
  },
199
223
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.670",
3
+ "version": "0.0.672",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",