@camunda/e2e-test-suite 0.0.675 → 0.0.677

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.
@@ -50,6 +50,13 @@ class HomePage {
50
50
  }
51
51
  async clickClusters() {
52
52
  await (0, test_1.expect)(this.clusterTab).toBeVisible({ timeout: 30000 });
53
+ // Dismiss any modal that may be intercepting pointer events on the nav link.
54
+ if (await this.informationDialog
55
+ .last()
56
+ .isVisible({ timeout: 2000 })
57
+ .catch(() => false)) {
58
+ await this.closeInformationDialog();
59
+ }
53
60
  await this.clusterTab.click({ timeout: 15000 });
54
61
  }
55
62
  async clickDashboard() {
@@ -287,7 +287,7 @@ async function disableRBA(clusterName, homePage, clusterPage, clusterDetailsPage
287
287
  await clusterDetailsPage.clickSettingsTab();
288
288
  await clusterDetailsPage.disableAuthorizations();
289
289
  await homePage.clickClusters();
290
- await clusterPage.assertClusterHealthyStatusWithRetry(clusterName);
290
+ await clusterPage.assertClusterHealthyStatusWithRetry(clusterName, 120000, 600000);
291
291
  await clusterPage.clickClusterLink(clusterName);
292
292
  await (0, test_1.expect)(clusterDetailsPage.rbaEnabledMessage.first()).not.toBeVisible({
293
293
  timeout: 30000,
@@ -321,7 +321,7 @@ async function enableAuthorizations(clusterName, homePage, clusterPage, clusterD
321
321
  await clusterDetailsPage.clickSettingsTab();
322
322
  await clusterDetailsPage.enableAuthorizations();
323
323
  await homePage.clickClusters();
324
- await clusterPage.assertClusterHealthyStatusWithRetry(clusterName);
324
+ await clusterPage.assertClusterHealthyStatusWithRetry(clusterName, 120000, 600000);
325
325
  await clusterPage.clickClusterLink(clusterName);
326
326
  await clusterDetailsPage.assertComponentsHealth();
327
327
  }
@@ -13,6 +13,7 @@ declare class IdentityHomePage {
13
13
  readonly select: Locator;
14
14
  constructor(page: Page);
15
15
  private selectAllCheckboxes;
16
+ private hasWritePermission;
16
17
  private assignPermissions;
17
18
  assignPermissionToTasklistAPI(): Promise<void>;
18
19
  assignPermissionToOperateAPI(): Promise<void>;
@@ -47,45 +47,46 @@ class IdentityHomePage {
47
47
  return false;
48
48
  }
49
49
  }
50
+ async hasWritePermission() {
51
+ return this.page
52
+ .getByRole('cell')
53
+ .filter({ hasText: /^write/ })
54
+ .isVisible();
55
+ }
50
56
  async assignPermissions(appCell, apiName) {
51
57
  await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, appCell);
52
58
  await appCell.click();
53
59
  await this.accessToAPIsTab.click();
54
60
  await (0, sleep_1.sleep)(2000);
55
- if (await this.page
56
- .getByRole('cell')
57
- .filter({ hasText: /^write/ })
58
- .isVisible()) {
61
+ if (await this.hasWritePermission()) {
59
62
  console.log(`Permissions already assigned to ${apiName}`);
60
63
  return;
61
64
  }
62
- await this.assignPermissionsButton.click();
63
- await this.selectOptionFromDropdown(apiName);
64
- await (0, test_1.expect)(this.dialog).toBeVisible();
65
- const checked = await this.selectAllCheckboxes(apiName);
66
- if (!checked) {
67
- return;
68
- }
69
- await (0, sleep_1.sleep)(1000);
70
- // Retry clicking Add until the dialog closes — the button can be
71
- // present but unresponsive if the form hasn't registered the
72
- // checkbox state yet (seen in docker compose: dialog stays open).
73
65
  for (let attempt = 1; attempt <= 3; attempt++) {
66
+ await this.assignPermissionsButton.click();
67
+ await this.selectOptionFromDropdown(apiName);
68
+ await (0, test_1.expect)(this.dialog).toBeVisible();
69
+ const checked = await this.selectAllCheckboxes(apiName);
70
+ if (!checked) {
71
+ return;
72
+ }
73
+ await (0, sleep_1.sleep)(1000);
74
+ await (0, test_1.expect)(this.addButton).toBeVisible();
74
75
  await this.addButton.click();
75
76
  try {
76
77
  await this.dialog.waitFor({ state: 'hidden', timeout: 5000 });
77
- console.log(`Dialog closed after Add click (attempt ${attempt})`);
78
- break;
78
+ await (0, sleep_1.sleep)(3000);
79
+ return;
79
80
  }
80
81
  catch {
81
- console.log(`Dialog still open after Add attempt ${attempt}, retrying...`);
82
- if (attempt === 3) {
83
- throw new Error(`Dialog did not close after ${attempt} Add attempts for ${apiName}`);
84
- }
85
- await (0, sleep_1.sleep)(1000);
82
+ console.log(`Add failed for ${apiName} on attempt ${attempt}, reloading...`);
83
+ await this.page.reload();
84
+ await (0, sleep_1.sleep)(2000);
85
+ await this.accessToAPIsTab.click();
86
+ await (0, sleep_1.sleep)(2000);
86
87
  }
87
88
  }
88
- await (0, sleep_1.sleep)(3000);
89
+ throw new Error(`Failed to assign permissions for ${apiName} after 3 attempts`);
89
90
  }
90
91
  async assignPermissionToTasklistAPI() {
91
92
  await this.assignPermissions(this.tasklistCell, 'Tasklist API');
@@ -176,22 +176,25 @@ _8_10_1.test.describe('Orchestration Cluster MCP Server — /mcp/processes tools
176
176
  const apiContext = await (0, apiHelpers_1.getApiRequestContext)();
177
177
  let instanceKey = smokeProcessInstanceKey;
178
178
  await _8_10_1.test.step('Resolve process instance key', async () => {
179
- if (!instanceKey) {
180
- // Attempt to find any mcpAsToolProcess instance via the search API.
181
- const searchRes = await apiContext.post(processInstancesSearchUrl, {
182
- headers: (0, mcpHelpers_1.buildMcpHeaders)(authToken, mcpSessionId),
183
- data: {
184
- filter: { processDefinitionId: 'mcpAsToolProcess' },
185
- sort: [{ field: 'processInstanceKey', order: 'desc' }],
186
- page: { limit: 1 },
187
- },
188
- });
189
- if (searchRes.ok()) {
190
- const searchJson = (await searchRes.json());
191
- instanceKey = searchJson.items[0]?.processInstanceKey ?? null;
179
+ await (0, test_1.expect)(async () => {
180
+ if (!instanceKey) {
181
+ // Attempt to find any mcpAsToolProcess instance via the search API.
182
+ // Wrapped in toPass so propagation lag doesn't cause a one-shot failure.
183
+ const searchRes = await apiContext.post(processInstancesSearchUrl, {
184
+ headers: (0, mcpHelpers_1.buildMcpHeaders)(authToken, mcpSessionId),
185
+ data: {
186
+ filter: { processDefinitionId: 'mcpAsToolProcess' },
187
+ sort: [{ field: 'processInstanceKey', order: 'desc' }],
188
+ page: { limit: 1 },
189
+ },
190
+ });
191
+ if (searchRes.ok()) {
192
+ const searchJson = (await searchRes.json());
193
+ instanceKey = searchJson.items[0]?.processInstanceKey ?? null;
194
+ }
192
195
  }
193
- }
194
- (0, test_1.expect)(instanceKey, 'No mcpAsToolProcess instance available for getProcessInstance smoke test').not.toBeNull();
196
+ (0, test_1.expect)(instanceKey, 'No mcpAsToolProcess instance available for getProcessInstance smoke test').not.toBeNull();
197
+ }).toPass(constants_1.defaultAssertionOptions);
195
198
  });
196
199
  await _8_10_1.test.step('Call getProcessInstance tool and verify response', async () => {
197
200
  const body = await (0, mcpHelpers_1.callTool)(apiContext, mcpProcessesUrl, authToken, mcpSessionId, 'getProcessInstance', { processInstanceKey: instanceKey });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.675",
3
+ "version": "0.0.677",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",