@camunda/e2e-test-suite 0.0.655 → 0.0.657

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.
@@ -1043,19 +1043,36 @@ class ModelerCreatePage {
1043
1043
  }
1044
1044
  const isNewFlow = await setupDeployButton.isVisible().catch(() => false);
1045
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
- });
1046
+ // Step 1: connect a cluster only if none is connected yet.
1047
+ //
1048
+ // The panel may auto-connect to a previously used cluster: on load the
1049
+ // Deploy button is transiently disabled and, once a cluster is connected,
1050
+ // the "Connect cluster" button is replaced by a "Change" button. So
1051
+ // neither the Deploy button's disabled state nor a single visibility poll
1052
+ // is a reliable signal on its own — checking too early sees a disabled
1053
+ // Deploy button and then waits forever for a "Connect cluster" button that
1054
+ // never renders (it has become "Change").
1055
+ //
1056
+ // Wait until the panel settles into one of two stable states before
1057
+ // deciding, then branch:
1058
+ // - "Connect cluster" button visible → no cluster connected, connect one
1059
+ // - Deploy button enabled → a cluster is already connected
1060
+ const connectClusterButton = this.page.getByRole('button', {
1061
+ name: 'Connect cluster',
1062
+ });
1063
+ await (0, test_1.expect)(async () => {
1064
+ const connectVisible = await connectClusterButton
1065
+ .isVisible()
1066
+ .catch(() => false);
1067
+ const deployEnabled = await setupDeployButton
1068
+ .isEnabled()
1069
+ .catch(() => false);
1070
+ (0, test_1.expect)(connectVisible || deployEnabled).toBe(true);
1071
+ }).toPass({ timeout: 30000 });
1072
+ const needsClusterConnect = await connectClusterButton
1073
+ .isVisible()
1074
+ .catch(() => false);
1075
+ if (needsClusterConnect) {
1059
1076
  await connectClusterButton.click({ timeout: 15000 });
1060
1077
  const configureEnvDialog = this.page
1061
1078
  .getByRole('dialog')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.655",
3
+ "version": "0.0.657",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",