@camunda/e2e-test-suite 0.0.851 → 0.0.853

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.
@@ -46,6 +46,8 @@ declare class ClusterDetailsPage {
46
46
  readonly updateAvailableDialog: Locator;
47
47
  readonly updateButton: Locator;
48
48
  readonly mcpSupportToggle: Locator;
49
+ readonly restartRequiredDialog: Locator;
50
+ readonly restartConfirmButton: Locator;
49
51
  readonly mcpTab: Locator;
50
52
  readonly mcpTextarea: Locator;
51
53
  constructor(page: Page);
@@ -51,6 +51,8 @@ class ClusterDetailsPage {
51
51
  updateAvailableDialog;
52
52
  updateButton;
53
53
  mcpSupportToggle;
54
+ restartRequiredDialog;
55
+ restartConfirmButton;
54
56
  mcpTab;
55
57
  mcpTextarea;
56
58
  constructor(page) {
@@ -167,6 +169,12 @@ class ClusterDetailsPage {
167
169
  this.mcpSupportToggle = page.getByRole('switch', {
168
170
  name: /Enable MCP Support/i,
169
171
  });
172
+ this.restartRequiredDialog = page
173
+ .getByRole('dialog')
174
+ .filter({ hasText: 'Restart required' });
175
+ this.restartConfirmButton = this.restartRequiredDialog.getByRole('button', {
176
+ name: 'Continue',
177
+ });
170
178
  this.mcpTab = page.getByRole('tab', { name: 'MCP' });
171
179
  this.mcpTextarea = page.getByRole('textbox', { name: 'Copy to clipboard' });
172
180
  }
@@ -659,8 +667,13 @@ class ClusterDetailsPage {
659
667
  // Only click if not already enabled to avoid disabling on reruns
660
668
  if (!(await this.mcpSupportToggle.isChecked())) {
661
669
  await this.mcpSupportToggle.click({ force: true });
670
+ // Enabling MCP support restarts the cluster, so Console now surfaces a
671
+ // "Restart required" confirmation dialog. The setting is only applied
672
+ // (and the toggle only commits to checked) once it is confirmed.
673
+ await (0, test_1.expect)(this.restartConfirmButton).toBeVisible({ timeout: 30000 });
674
+ await this.restartConfirmButton.click();
662
675
  }
663
- await (0, test_1.expect)(this.mcpSupportToggle).toBeChecked();
676
+ await (0, test_1.expect)(this.mcpSupportToggle).toBeChecked({ timeout: 60000 });
664
677
  }
665
678
  async clickMCPTab() {
666
679
  await (0, test_1.expect)(this.mcpTab).toBeVisible({ timeout: 60000 });
@@ -73,6 +73,11 @@ _8_10_1.test.describe('Cluster Setup Tests', () => {
73
73
  await auditLogPage.enableClientOperationLogging();
74
74
  await clusterDetailsPage.clickSettingsTab();
75
75
  await clusterDetailsPage.checkMcpSupportToggle();
76
+ // Enabling MCP support restarts the cluster (Console shows a "Restart
77
+ // required" dialog and the cluster is briefly unavailable). Wait for it to
78
+ // come back Healthy before the UI health assertion, which would otherwise
79
+ // abort on the transient Unhealthy state during the restart.
80
+ await (0, consoleApiHelpers_1.waitForClusterRestartHealthyViaApi)(page, clusterUuid, 1500000);
76
81
  await homePage.clickClusters();
77
82
  await clusterPage.assertClusterHealthyStatusWithRetry(clusterName);
78
83
  await clusterPage.clickClusterLink(clusterName);
@@ -154,8 +154,7 @@ SM_8_8_1.test.describe('HTO User Flow Tests', () => {
154
154
  await (0, test_1.expect)(page.getByText('"testValue"')).not.toBeVisible();
155
155
  });
156
156
  });
157
- //Skipped due to bug 4920: https://github.com/camunda/camunda-platform-helm/issues/4920
158
- SM_8_8_1.test.skip('User Task Restrictions Enabled Flow - Candidate Group @tasklistV1', async ({ page, modelerHomePage, navigationPage, modelerCreatePage, operateHomePage, operateProcessInstancePage, taskDetailsPage, taskPanelPage, managementIdentityPage, keycloakAdminPage, keycloakLoginPage, ocIdentityHomePage, ocIdentityMappingRulesPage, ocIdentityRolesPage, ocIdentityGroupsPage, browser, }) => {
157
+ (0, SM_8_8_1.test)('User Task Restrictions Enabled Flow - Candidate Group @tasklistV1', async ({ page, modelerHomePage, navigationPage, modelerCreatePage, operateHomePage, operateProcessInstancePage, taskDetailsPage, taskPanelPage, managementIdentityPage, keycloakAdminPage, keycloakLoginPage, ocIdentityHomePage, ocIdentityMappingRulesPage, ocIdentityRolesPage, ocIdentityGroupsPage, browser, }) => {
159
158
  SM_8_8_1.test.slow();
160
159
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
161
160
  const userTaskName = 'candidateGroupTask' + randomString;
@@ -4,3 +4,4 @@ export declare function createClusterViaApi(page: Page, clusterName: string, reg
4
4
  export declare function ensureClusterViaApi(page: Page, clusterName: string, region?: string): Promise<string>;
5
5
  export declare function ensureTasklistV2Enabled(page: Page, clusterUuid: string): Promise<void>;
6
6
  export declare function waitForClusterHealthyViaApi(page: Page, clusterUuid: string, timeoutMs?: number): Promise<void>;
7
+ export declare function waitForClusterRestartHealthyViaApi(page: Page, clusterUuid: string, timeoutMs?: number): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.waitForClusterHealthyViaApi = exports.ensureTasklistV2Enabled = exports.ensureClusterViaApi = exports.createClusterViaApi = exports.deleteClusterViaApi = void 0;
3
+ exports.waitForClusterRestartHealthyViaApi = exports.waitForClusterHealthyViaApi = exports.ensureTasklistV2Enabled = exports.ensureClusterViaApi = exports.createClusterViaApi = exports.deleteClusterViaApi = void 0;
4
4
  const test_1 = require("@playwright/test");
5
5
  const sleep_1 = require("./sleep");
6
6
  const PLAN_TYPE_ID = '574cde5f-54ae-43c1-851a-e6fb4f03423a';
@@ -213,3 +213,36 @@ async function waitForClusterHealthyViaApi(page, clusterUuid, timeoutMs = 150000
213
213
  await (0, sleep_1.sleep)(60000);
214
214
  }
215
215
  exports.waitForClusterHealthyViaApi = waitForClusterHealthyViaApi;
216
+ async function readClusterReadyStatus(page, clusterUuid) {
217
+ const orgId = getOrgId();
218
+ const url = `${getConsoleBaseUrl()}/api/orgs/${orgId}/clusters/${clusterUuid}`;
219
+ const token = await getUserToken(page);
220
+ const response = await page.request.get(url, {
221
+ headers: { Authorization: `Bearer ${token}` },
222
+ });
223
+ if (response.status() !== 200)
224
+ return undefined;
225
+ const data = await response.json();
226
+ return (data.data ?? data).status?.ready;
227
+ }
228
+ // Some cluster setting changes (e.g. enabling MCP support) restart the cluster,
229
+ // which Console confirms via a "Restart required" dialog and warns leaves the
230
+ // cluster "briefly unavailable". During that restart the cluster reports a
231
+ // non-Healthy status, so a naive Healthy wait would observe the stale
232
+ // pre-restart "Healthy" and return too early. This helper first waits (bounded)
233
+ // for the cluster to leave the Healthy state so we know the restart has
234
+ // registered, then waits for it to become Healthy again.
235
+ async function waitForClusterRestartHealthyViaApi(page, clusterUuid, timeoutMs = 1500000) {
236
+ const restartStart = Date.now();
237
+ // If the restart is quick enough that we never catch a non-Healthy reading,
238
+ // fall through — the Healthy wait below still guards correctness.
239
+ while (Date.now() - restartStart < 240000) {
240
+ if ((await readClusterReadyStatus(page, clusterUuid)) !== 'Healthy')
241
+ break;
242
+ await (0, sleep_1.sleep)(5000);
243
+ }
244
+ await (0, test_1.expect)(async () => {
245
+ (0, test_1.expect)(await readClusterReadyStatus(page, clusterUuid)).toBe('Healthy');
246
+ }).toPass({ timeout: timeoutMs, intervals: [30000, 60000] });
247
+ }
248
+ exports.waitForClusterRestartHealthyViaApi = waitForClusterRestartHealthyViaApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.851",
3
+ "version": "0.0.853",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",