@camunda/e2e-test-suite 0.0.1019 → 0.0.1021

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.
@@ -38,6 +38,11 @@ class AuditLogPage {
38
38
  await (0, test_1.expect)(checkbox).toBeChecked();
39
39
  return true;
40
40
  }
41
+ // Not used by cluster setup: Console re-seeds this panel's checkbox state
42
+ // from the cluster on every background refresh, so selections made before
43
+ // "Update" is pressed can be dropped and only some categories get saved. Use
44
+ // ensureClientAuditLoggingViaApi (utils/consoleApiHelpers) to configure a
45
+ // cluster; drive this only when the UI itself is what is under test.
41
46
  async enableClientOperationLogging() {
42
47
  const categories = [
43
48
  'Administration',
@@ -27,7 +27,7 @@ declare class ManagementIdentityPage {
27
27
  clickUser(username: string): Promise<void>;
28
28
  clickAssignedRolesTab(): Promise<void>;
29
29
  clickDemoUser(): Promise<void>;
30
- clickDeleteAccessButton(accessToDelete: string): Promise<void>;
30
+ clickDeleteAccessButton(accessToDelete: string | string[]): Promise<void>;
31
31
  clickConfirmDeleteButton(): Promise<void>;
32
32
  clickAssignRolesButton(): Promise<void>;
33
33
  clickAddButton(): Promise<void>;
@@ -46,9 +46,16 @@ class ManagementIdentityPage {
46
46
  this.optimizeCheckbox = page
47
47
  .locator('label')
48
48
  .filter({ hasText: 'Optimize (Grants full access to Optimize)' });
49
- this.modelerCheckbox = page
50
- .locator('label')
51
- .filter({ hasText: 'Hub (Grants full access to Hub)' });
49
+ // Mid-rename: camunda/identity#4541 moves these role descriptions from Web
50
+ // Modeler to Hub, and the role names follow only later. Depending on which
51
+ // Identity image the deployed chart carries, the same checkbox renders as
52
+ // "Web Modeler (Grants full access to Web Modeler)", the half-renamed
53
+ // "Web Modeler (Grants full access to Hub)", or "Hub (Grants full access to
54
+ // Hub)". Match all three so the suite stays green on either side of the
55
+ // rollout. The " (" after the name keeps this off the Admin row.
56
+ this.modelerCheckbox = page.locator('label').filter({
57
+ hasText: /(Web Modeler|Hub) \(Grants full access to (Web Modeler|Hub)\)/,
58
+ });
52
59
  this.identityCheckbox = page.locator('label').filter({
53
60
  hasText: 'ManagementIdentity (Provides full access to Management Identity)',
54
61
  });
@@ -60,8 +67,9 @@ class ManagementIdentityPage {
60
67
  this.licenseKeyTagNonCommercial = page.getByText('Non-commercial license');
61
68
  this.licenseKeyTagProduction = page.getByText('Production license').first();
62
69
  this.licenseKeyTagCommercial = page.getByText('Commercial license');
70
+ // Same Web Modeler → Hub rename straddle as `modelerCheckbox` above.
63
71
  this.modelerAdminCheckbox = page.locator('label').filter({
64
- hasText: 'Hub Admin (Grants elevated access to Hub)',
72
+ hasText: /(Web Modeler|Hub) Admin \(Grants elevated access to (Web Modeler|Hub)\)/,
65
73
  });
66
74
  this.openSidebarButton = page.getByLabel('Open User Sidebar');
67
75
  this.logoutButton = page.getByRole('button', { name: 'Log out' });
@@ -100,9 +108,9 @@ class ManagementIdentityPage {
100
108
  // and it does not re-render on its own. Rebuild it from a fresh response
101
109
  // between attempts before reporting the role as missing.
102
110
  async clickDeleteAccessButton(accessToDelete) {
103
- const roleRow = this.page
104
- .locator(':text("' + accessToDelete + '")')
105
- .first();
111
+ const candidates = typeof accessToDelete === 'string' ? [accessToDelete] : accessToDelete;
112
+ const rowSelector = candidates.map((c) => `:text("${c}")`).join(', ');
113
+ const roleRow = this.page.locator(rowSelector).first();
106
114
  for (let attempt = 1; attempt <= 2; attempt++) {
107
115
  const rowVisible = await roleRow
108
116
  .waitFor({ state: 'visible', timeout: 30000 })
@@ -114,10 +122,12 @@ class ManagementIdentityPage {
114
122
  await this.page.reload({ waitUntil: 'domcontentloaded' });
115
123
  await this.clickAssignedRolesTab();
116
124
  }
117
- await (0, test_1.expect)(roleRow, `No assigned role matching "${accessToDelete}" was found. The role may ` +
118
- `already be removed, or its label may have changed in this version.`).toBeVisible({ timeout: 60000 });
125
+ await (0, test_1.expect)(roleRow, `No assigned role matching ${candidates
126
+ .map((c) => `"${c}"`)
127
+ .join(' or ')} was found. The role may already be removed, or its ` +
128
+ `label may have changed in this version.`).toBeVisible({ timeout: 60000 });
119
129
  await this.page
120
- .locator('td:right-of(:text("' + accessToDelete + '"))')
130
+ .locator(candidates.map((c) => `td:right-of(:text("${c}"))`).join(', '))
121
131
  .first()
122
132
  .click({ timeout: 60000 });
123
133
  }
@@ -6,13 +6,17 @@ const LoginPage_1 = require("./LoginPage");
6
6
  const sleep_1 = require("../../utils/sleep");
7
7
  const constants_1 = require("../../utils/constants");
8
8
  const env_1 = require("../../utils/env");
9
- const ORCHESTRATION_CONTEXT_PATH = process.env.ORCHESTRATION_CONTEXT_PATH ?? '/orchestration';
9
+ // Context paths use `||`, not `??`: an env var set to the empty string must fall back to the
10
+ // default. CI wiring that always exports a variable (set to "" when the leg has no override)
11
+ // otherwise defeats the default — `page.goto('')` resolves to Playwright's baseURL, so the app
12
+ // under test is never reached and the failure surfaces as an unrelated navigation timeout.
13
+ const ORCHESTRATION_CONTEXT_PATH = process.env.ORCHESTRATION_CONTEXT_PATH || '/orchestration';
10
14
  const NORMALIZED_ORCHESTRATION_CONTEXT_PATH = ORCHESTRATION_CONTEXT_PATH.startsWith('/')
11
15
  ? ORCHESTRATION_CONTEXT_PATH
12
16
  : `/${ORCHESTRATION_CONTEXT_PATH}`;
13
- const MODELER_CONTEXT_PATH = process.env.MODELER_CONTEXT_PATH ?? '/modeler';
14
- const OPTIMIZE_CONTEXT_PATH = process.env.OPTIMIZE_CONTEXT_PATH ?? '/optimize';
15
- const MANAGEMENT_IDENTITY_CONTEXT_PATH = process.env.MANAGEMENT_IDENTITY_CONTEXT_PATH ?? '/identity';
17
+ const MODELER_CONTEXT_PATH = process.env.MODELER_CONTEXT_PATH || '/modeler';
18
+ const OPTIMIZE_CONTEXT_PATH = process.env.OPTIMIZE_CONTEXT_PATH || '/optimize';
19
+ const MANAGEMENT_IDENTITY_CONTEXT_PATH = process.env.MANAGEMENT_IDENTITY_CONTEXT_PATH || '/identity';
16
20
  const IDENTITY_FIRSTUSER_USERNAME = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_USERNAME || 'demo';
17
21
  const IDENTITY_FIRSTUSER_PASSWORD = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD || 'demo';
18
22
  class NavigationPage {
@@ -142,7 +142,7 @@ async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskN
142
142
  // be re-opened once the blip clears. Progressive backoff gives the
143
143
  // backend time to recover between attempts.
144
144
  await (0, sleep_1.sleep)(2000 * (attempt + 1));
145
- const orchestrationContextPath = process.env.ORCHESTRATION_CONTEXT_PATH ?? '/orchestration';
145
+ const orchestrationContextPath = process.env.ORCHESTRATION_CONTEXT_PATH || '/orchestration';
146
146
  const normalizedOrchestrationPath = orchestrationContextPath.startsWith('/')
147
147
  ? orchestrationContextPath
148
148
  : `/${orchestrationContextPath}`;
@@ -5,14 +5,18 @@ const test_1 = require("@playwright/test");
5
5
  const LoginPage_1 = require("./LoginPage");
6
6
  const sleep_1 = require("../../utils/sleep");
7
7
  const constants_1 = require("../../utils/constants");
8
- const ORCHESTRATION_CONTEXT_PATH = process.env.ORCHESTRATION_CONTEXT_PATH ?? '/orchestration';
8
+ // Context paths use `||`, not `??`: an env var set to the empty string must fall back to the
9
+ // default. CI wiring that always exports a variable (set to "" when the leg has no override)
10
+ // otherwise defeats the default — `page.goto('')` resolves to Playwright's baseURL, so the app
11
+ // under test is never reached and the failure surfaces as an unrelated navigation timeout.
12
+ const ORCHESTRATION_CONTEXT_PATH = process.env.ORCHESTRATION_CONTEXT_PATH || '/orchestration';
9
13
  const NORMALIZED_ORCHESTRATION_CONTEXT_PATH = ORCHESTRATION_CONTEXT_PATH.startsWith('/')
10
14
  ? ORCHESTRATION_CONTEXT_PATH
11
15
  : `/${ORCHESTRATION_CONTEXT_PATH}`;
12
- const MODELER_CONTEXT_PATH = process.env.MODELER_CONTEXT_PATH ?? '/modeler';
13
- const OPTIMIZE_CONTEXT_PATH = process.env.OPTIMIZE_CONTEXT_PATH ?? '/optimize';
14
- const CONSOLE_CONTEXT_PATH = process.env.CONSOLE_CONTEXT_PATH ?? '/console';
15
- const MANAGEMENT_IDENTITY_CONTEXT_PATH = process.env.MANAGEMENT_IDENTITY_CONTEXT_PATH ?? '/identity';
16
+ const MODELER_CONTEXT_PATH = process.env.MODELER_CONTEXT_PATH || '/modeler';
17
+ const OPTIMIZE_CONTEXT_PATH = process.env.OPTIMIZE_CONTEXT_PATH || '/optimize';
18
+ const CONSOLE_CONTEXT_PATH = process.env.CONSOLE_CONTEXT_PATH || '/console';
19
+ const MANAGEMENT_IDENTITY_CONTEXT_PATH = process.env.MANAGEMENT_IDENTITY_CONTEXT_PATH || '/identity';
16
20
  const IDENTITY_FIRSTUSER_USERNAME = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_USERNAME || 'demo';
17
21
  const IDENTITY_FIRSTUSER_PASSWORD = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD || 'demo';
18
22
  // Navigation errors raised by Chromium's network stack rather than by the app:
@@ -55,7 +55,7 @@ _8_10_1.test.describe('Cluster Setup Tests', () => {
55
55
  await clusterSecretsPage.createSetOfSecrets(clusterName, connectorSecrets_1.bedrockCodeInterpreterSecretsValues);
56
56
  }
57
57
  });
58
- (0, _8_10_1.test)('Create Agentic Orchestration Cluster', async ({ page, loginPage, homePage, clusterPage, clusterDetailsPage, clusterSecretsPage, auditLogPage, }, testInfo) => {
58
+ (0, _8_10_1.test)('Create Agentic Orchestration Cluster', async ({ page, loginPage, homePage, clusterPage, clusterDetailsPage, clusterSecretsPage, }, testInfo) => {
59
59
  _8_10_1.test.skip(process.env.IS_PROD === 'true', 'Skipping test because not required on PROD test org');
60
60
  _8_10_1.test.skip(process.env.IS_AG === 'true', 'Skipping test because not required when IS_AG is true');
61
61
  _8_10_1.test.slow();
@@ -69,8 +69,9 @@ _8_10_1.test.describe('Cluster Setup Tests', () => {
69
69
  await homePage.clickClusters();
70
70
  await clusterPage.clickClusterLink(clusterName);
71
71
  await clusterDetailsPage.assertComponentsHealth();
72
- await auditLogPage.clickAuditLogTab();
73
- await auditLogPage.enableClientOperationLogging();
72
+ // Must happen before the MCP toggle: the restart that toggle triggers is
73
+ // what makes the new audit-log configuration live on the cluster.
74
+ await (0, consoleApiHelpers_1.ensureClientAuditLoggingViaApi)(page, clusterUuid);
74
75
  await clusterDetailsPage.clickSettingsTab();
75
76
  await clusterDetailsPage.checkMcpSupportToggle();
76
77
  // Enabling MCP support restarts the cluster (Console shows a "Restart
@@ -53,7 +53,12 @@ SM_8_10_1.test.describe('Identity User Flow Tests', () => {
53
53
  });
54
54
  }
55
55
  await SM_8_10_1.test.step('Remove Access from Hub', async () => {
56
- await managementIdentityPage.clickDeleteAccessButton('Grants full access to Hub');
56
+ // Either wording, for the same Web Modeler → Hub rename straddle the
57
+ // `modelerCheckbox` locator documents.
58
+ await managementIdentityPage.clickDeleteAccessButton([
59
+ 'Grants full access to Hub',
60
+ 'Grants full access to Web Modeler',
61
+ ]);
57
62
  await managementIdentityPage.clickConfirmDeleteButton();
58
63
  });
59
64
  await SM_8_10_1.test.step('Reset Session', async () => {
@@ -117,8 +117,28 @@ SM_8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
117
117
  await SM_8_9_1.test.step('Make Authorization Request', async () => {
118
118
  const baseURL = process.env.PLAYWRIGHT_BASE_URL ||
119
119
  `http://gke-${process.env.BASE_URL}.ci.distro.ultrawombat.com`;
120
- const response = await request.post(`${baseURL}/connectors/inbound/test-webhook-id${randomString}`);
121
- await (0, test_1.expect)(response.status()).toBe(200);
120
+ const url = `${baseURL}/connectors/inbound/test-webhook-id${randomString}`;
121
+ // Deploying the process does not mean the gateway is already serving the
122
+ // inbound endpoint, so the first POST can land on a not-yet-registered
123
+ // webhook and come back 5xx with nothing actually wrong. The sibling
124
+ // Intermediate Event step below polls for the same reason.
125
+ //
126
+ // Retry ONLY on 5xx. A 5xx means the request was not processed, so
127
+ // re-posting cannot double-trigger the process; a 2xx or 4xx is a real
128
+ // answer about a live endpoint and must be asserted as-is rather than
129
+ // retried until it changes.
130
+ let response = await request.post(url);
131
+ const deadline = Date.now() + 180000;
132
+ let attempt = 0;
133
+ while (response.status() >= 500 && Date.now() < deadline) {
134
+ attempt++;
135
+ console.error(`Webhook readiness attempt ${attempt}: ${url} -> ${response.status()}`);
136
+ await (0, sleep_1.sleep)(10000);
137
+ response = await request.post(url);
138
+ }
139
+ // Not awaited: expect() on a plain value is synchronous, so an `await`
140
+ // here would read as a retrying assertion while doing nothing.
141
+ (0, test_1.expect)(response.status()).toBe(200);
122
142
  });
123
143
  await SM_8_9_1.test.step('Assert Diagram Has Successfully Completed in Operate', async () => {
124
144
  await navigationPage.goToOperate();
@@ -190,7 +190,7 @@ function buildZeebeApiUrl(resourcePath, environmentOverride, clusterType) {
190
190
  const normalizedPath = resourcePath.startsWith('/')
191
191
  ? resourcePath
192
192
  : `/${resourcePath}`;
193
- const contextPath = process.env.ORCHESTRATION_CONTEXT_PATH ?? '/orchestration';
193
+ const contextPath = process.env.ORCHESTRATION_CONTEXT_PATH || '/orchestration';
194
194
  const pathWithPrefix = environment === 'sm' ? `${contextPath}${normalizedPath}` : normalizedPath;
195
195
  return `${baseUrl}${pathWithPrefix}`;
196
196
  }
@@ -3,5 +3,6 @@ export declare function deleteClusterViaApi(page: Page, clusterName: string): Pr
3
3
  export declare function createClusterViaApi(page: Page, clusterName: string, region?: string, tasklistV2Enabled?: boolean): Promise<string>;
4
4
  export declare function ensureClusterViaApi(page: Page, clusterName: string, region?: string, tasklistV2Enabled?: boolean): Promise<string>;
5
5
  export declare function ensureTasklistV2Enabled(page: Page, clusterUuid: string): Promise<void>;
6
+ export declare function ensureClientAuditLoggingViaApi(page: Page, clusterUuid: string): Promise<void>;
6
7
  export declare function waitForClusterHealthyViaApi(page: Page, clusterUuid: string, timeoutMs?: number): Promise<void>;
7
8
  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.waitForClusterRestartHealthyViaApi = exports.waitForClusterHealthyViaApi = exports.ensureTasklistV2Enabled = exports.ensureClusterViaApi = exports.createClusterViaApi = exports.deleteClusterViaApi = void 0;
3
+ exports.waitForClusterRestartHealthyViaApi = exports.waitForClusterHealthyViaApi = exports.ensureClientAuditLoggingViaApi = 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';
@@ -401,6 +401,42 @@ async function ensureTasklistV2Enabled(page, clusterUuid) {
401
401
  }
402
402
  }
403
403
  exports.ensureTasklistV2Enabled = ensureTasklistV2Enabled;
404
+ // Client operation logging is opt-in: a fresh cluster carries no audit-log
405
+ // config at all, which Console renders as "all user categories, no client
406
+ // categories". The MCP audit-log specs assert on CLIENT-actor PROCESS_INSTANCE
407
+ // entries, and the engine only records those when the DEPLOYED_RESOURCES client
408
+ // category is enabled.
409
+ //
410
+ // Driving the Audit log tab's checkboxes cannot set this reliably: the panel
411
+ // re-seeds its checkbox state from the cluster every time Console refreshes it
412
+ // in the background, silently dropping selections made before "Update" is
413
+ // pressed. The 2026-08-26/27 nightlies persisted only the last category clicked
414
+ // ("USER_TASKS"), so DEPLOYED_RESOURCES stayed off and every SC-AUD spec polled
415
+ // an audit log that would never receive an entry. Call the same endpoint the
416
+ // Update button calls, then read the config back until it is really persisted.
417
+ const AUDIT_LOG_CATEGORIES = ['ADMIN', 'DEPLOYED_RESOURCES', 'USER_TASKS'];
418
+ async function ensureClientAuditLoggingViaApi(page, clusterUuid) {
419
+ const orgId = getOrgId();
420
+ const url = `${getConsoleBaseUrl()}/api/orgs/${orgId}/clusters/${clusterUuid}`;
421
+ const response = await clusterApiRequest(page, 'PATCH', url, {
422
+ auditLogEnabled: true,
423
+ auditLogUserCategories: AUDIT_LOG_CATEGORIES,
424
+ auditLogClientCategories: AUDIT_LOG_CATEGORIES,
425
+ });
426
+ if (response.status() !== 200 && response.status() !== 204) {
427
+ throw new Error(`Failed to enable client audit logging on cluster "${clusterUuid}": ` +
428
+ `HTTP ${response.status()} - ${await response.text()}`);
429
+ }
430
+ await (0, test_1.expect)(async () => {
431
+ const readBack = await clusterApiRequest(page, 'GET', url);
432
+ (0, test_1.expect)(readBack.status()).toBe(200);
433
+ const body = await readBack.json();
434
+ const auditLog = (body.data ?? body)?.externalMetadata?.auditLog;
435
+ (0, test_1.expect)(auditLog?.enabled).toBe(true);
436
+ (0, test_1.expect)([...(auditLog?.clientCategories ?? [])].sort()).toEqual([...AUDIT_LOG_CATEGORIES].sort());
437
+ }).toPass({ timeout: 120000, intervals: [2000, 5000, 10000] });
438
+ }
439
+ exports.ensureClientAuditLoggingViaApi = ensureClientAuditLoggingViaApi;
404
440
  async function waitForClusterHealthyViaApi(page, clusterUuid, timeoutMs = 1500000) {
405
441
  const orgId = getOrgId();
406
442
  const url = `${getConsoleBaseUrl()}/api/orgs/${orgId}/clusters/${clusterUuid}`;
@@ -14,14 +14,13 @@ exports.deletionAssertionOptions = {
14
14
  intervals: [5000, 10000, 15000, 30000],
15
15
  timeout: 60000,
16
16
  };
17
- // Longest options for audit-log assertions: entries land in secondary storage
18
- // only after the audit config propagates to the exporters, which is markedly
19
- // slower on freshly-provisioned SaaS clusters. 90s occasionally lapsed before
20
- // the CLIENT-actor PROCESS_INSTANCE CREATE entry surfaced, then 180s did too
21
- // (every audit test in the nightly timed out on the same fresh org, including
22
- // the REST-triggered one, so nothing about the entry itself was wrong — the
23
- // pipeline simply had not started exporting yet). Poll for 360s, which still
24
- // leaves headroom inside the 12-minute test timeout after the ~60s beforeAll.
17
+ // Longest options for audit-log assertions. Measured on the nightly, a
18
+ // CLIENT-actor PROCESS_INSTANCE CREATE entry surfaces within ~10s whenever the
19
+ // cluster has the DEPLOYED_RESOURCES client category enabled — the earlier 90s
20
+ // and 180s budgets were raised against runs where that category was never
21
+ // persisted at all, so no budget could have helped. Keep a generous 360s so a
22
+ // genuinely slow export still passes; it fits inside the 12-minute test timeout
23
+ // after the ~60s beforeAll.
25
24
  exports.auditLogAssertionOptions = {
26
25
  intervals: [5000, 10000, 15000, 20000, 30000],
27
26
  timeout: 360000,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1019",
3
+ "version": "0.0.1021",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",