@camunda/e2e-test-suite 0.0.645 → 0.0.646

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.
@@ -1018,6 +1018,68 @@ class ModelerCreatePage {
1018
1018
  }
1019
1019
  async completePlayConfiguration(clusterName) {
1020
1020
  const timeout = 30000;
1021
+ // New flow (8.10+): "Setup environment" panel with three steps:
1022
+ // 1. Connect cluster → "Configure environment" modal → select cluster → Save
1023
+ // 2. Deploy process → wait for success banner
1024
+ // 3. Configure scenario
1025
+ const setupDeployButton = this.page
1026
+ .getByText('Deploy process')
1027
+ .locator('..')
1028
+ .getByRole('button', { name: 'Deploy' });
1029
+ const configureScenarioButton = this.page.getByRole('button', {
1030
+ name: 'Configure scenario',
1031
+ });
1032
+ // Wait up to 15s for EITHER the new-flow setup panel OR the legacy Continue
1033
+ // button to appear. Using .or() avoids separate sequential timeouts that would
1034
+ // both expire before the page finishes loading on a slow cluster.
1035
+ const setupOrContinue = setupDeployButton.or(this.continueToPlayButton);
1036
+ const panelAppeared = await setupOrContinue
1037
+ .first()
1038
+ .isVisible({ timeout: 15000 })
1039
+ .catch(() => false);
1040
+ if (!panelAppeared) {
1041
+ // Neither appeared — Play is already configured and ready.
1042
+ return;
1043
+ }
1044
+ const isNewFlow = await setupDeployButton.isVisible().catch(() => false);
1045
+ if (isNewFlow) {
1046
+ // Step 1: connect cluster if the Deploy button is still disabled.
1047
+ // The Deploy button (data-testid="play-configuration-deploy-button") is
1048
+ // rendered disabled until a cluster is connected. Check its state to decide
1049
+ // whether the "Connect cluster" step is needed — this is more reliable than
1050
+ // a short visibility poll on the "Connect cluster" button, which can be slow
1051
+ // to render on first page load.
1052
+ const deployButtonDisabled = await setupDeployButton
1053
+ .isDisabled()
1054
+ .catch(() => true);
1055
+ if (deployButtonDisabled) {
1056
+ const connectClusterButton = this.page.getByRole('button', {
1057
+ name: 'Connect cluster',
1058
+ });
1059
+ await connectClusterButton.click({ timeout: 15000 });
1060
+ const configureEnvDialog = this.page
1061
+ .getByRole('dialog')
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 });
1067
+ await configureEnvDialog
1068
+ .getByRole('button', { name: 'Save' })
1069
+ .click({ timeout });
1070
+ // Wait for Deploy button to become enabled after cluster is saved.
1071
+ await (0, test_1.expect)(setupDeployButton).toBeEnabled({ timeout: 30000 });
1072
+ }
1073
+ // Step 2: deploy — wait for enabled; button stays disabled until the cluster
1074
+ // connection is confirmed by the backend after the Save in step 1.
1075
+ await (0, test_1.expect)(setupDeployButton).toBeEnabled({ timeout: 30000 });
1076
+ await setupDeployButton.click({ timeout });
1077
+ await (0, test_1.expect)(this.page.getByText('Process has been successfully deployed')).toBeVisible({ timeout: 90000 });
1078
+ // Step 3: configure scenario
1079
+ await configureScenarioButton.click({ timeout });
1080
+ return;
1081
+ }
1082
+ // Legacy flow: select cluster via dialog, then click Continue.
1021
1083
  let attempts = 0;
1022
1084
  const maxRetries = 2;
1023
1085
  while (attempts < maxRetries) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.645",
3
+ "version": "0.0.646",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",