@camunda/e2e-test-suite 0.0.700 → 0.0.702

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.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OCIdentityGroupsPage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
5
  const sleep_1 = require("../../utils/sleep");
6
+ const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
6
7
  class OCIdentityGroupsPage {
7
8
  page;
8
9
  groupsList;
@@ -157,7 +158,16 @@ class OCIdentityGroupsPage {
157
158
  }
158
159
  }
159
160
  async assignUserToGroup(userName) {
160
- await this.assignUserButton.click();
161
+ // The group detail page (and its members API) can be slow to render the
162
+ // "Assign user" button right after navigating into a freshly created
163
+ // group, so retry the click and reload between attempts instead of
164
+ // relying on a single default-timeout click.
165
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.assignUserButton, {
166
+ postAction: async () => {
167
+ await this.page.reload();
168
+ },
169
+ });
170
+ await (0, test_1.expect)(this.searchBox).toBeVisible({ timeout: 10000 });
161
171
  await this.searchBox.fill(userName);
162
172
  await this.assignUserButtonModal.click();
163
173
  await (0, sleep_1.sleep)(8000);
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OCIdentityGroupsPage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
5
  const sleep_1 = require("../../utils/sleep");
6
+ const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
6
7
  class OCIdentityGroupsPage {
7
8
  page;
8
9
  groupsList;
@@ -158,7 +159,16 @@ class OCIdentityGroupsPage {
158
159
  }
159
160
  }
160
161
  async assignUserToGroup(userName) {
161
- await this.assignUserButton.click();
162
+ // The group detail page (and its members API) can be slow to render the
163
+ // "Assign user" button right after navigating into a freshly created
164
+ // group, so retry the click and reload between attempts instead of
165
+ // relying on a single default-timeout click.
166
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.assignUserButton, {
167
+ postAction: async () => {
168
+ await this.page.reload();
169
+ },
170
+ });
171
+ await (0, test_1.expect)(this.searchBox).toBeVisible({ timeout: 10000 });
162
172
  await this.searchBox.fill(userName);
163
173
  await this.assignUserButtonModal.click();
164
174
  await (0, sleep_1.sleep)(8000);
@@ -44,7 +44,7 @@ c8Run_8_9_1.test.describe('API tests for V2 @tasklistV2', () => {
44
44
  await (0, test_1.expect)(async () => {
45
45
  const connectorsStatus = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST + '/actuator/health');
46
46
  await (0, apiHelpers_1.assertResponseStatus)(connectorsStatus, 200);
47
- }).toPass(constants_1.defaultAssertionOptions);
47
+ }).toPass({ ...constants_1.defaultAssertionOptions, timeout: 120000 });
48
48
  });
49
49
  (0, c8Run_8_9_1.test)('Get a inbound connectors list', async ({ request }) => {
50
50
  const connectorsInboundList = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST + '/inbound');
@@ -7,7 +7,9 @@ const zeebeClient_1 = require("../../utils/zeebeClient");
7
7
  const test_1 = require("@playwright/test");
8
8
  const sleep_1 = require("../../utils/sleep");
9
9
  const constants_1 = require("../../utils/constants");
10
+ const apiHelpers_1 = require("../../utils/apiHelpers");
10
11
  c8Run_8_9_1.test.beforeAll(async () => {
12
+ await (0, apiHelpers_1.waitForConnectorsReady)();
11
13
  await Promise.all([
12
14
  (0, zeebeClient_1.deploy)('./resources/Basic_Auth_REST_Connector.bpmn'),
13
15
  (0, zeebeClient_1.deploy)('./resources/Intermediate_Event_Webhook_Connector_No_Auth_Process.bpmn'),
@@ -31,6 +31,7 @@ c8Run_8_9_1.test.beforeAll(async () => {
31
31
  await (0, apiHelpers_1.validateMcpServerHealth)('http://127.0.0.1:12001'); // No auth
32
32
  await (0, apiHelpers_1.validateMcpServerHealth)('http://127.0.0.1:12002'); // Basic auth
33
33
  await (0, apiHelpers_1.validateMcpServerHealth)('http://127.0.0.1:12004'); // OAuth
34
+ await (0, apiHelpers_1.waitForConnectorsReady)();
34
35
  await (0, keycloakHelpers_1.validateKeycloakHealth)();
35
36
  bearerToken = await (0, keycloakHelpers_1.getAccessToken)();
36
37
  await (0, zeebeClient_1.deploy)([
@@ -12,6 +12,7 @@ c8Run_8_9_1.test.beforeAll(async () => {
12
12
  return;
13
13
  }
14
14
  await (0, apiHelpers_1.validateMcpServerHealth)();
15
+ await (0, apiHelpers_1.waitForConnectorsReady)();
15
16
  await (0, zeebeClient_1.deploy)(['./resources/mcp_server/mcp_remote_client_operations.bpmn']);
16
17
  await (0, zeebeClient_1.createInstances)('mcp_remote_client', 1, 1);
17
18
  await (0, sleep_1.sleep)(2000);
@@ -14,6 +14,7 @@ export declare function authSaasAPI(audience?: string, clusterType?: string): Pr
14
14
  export declare function authSmAPI(): Promise<string>;
15
15
  export declare function authC8runAPI(name: string, password: string): Promise<void>;
16
16
  export declare function validateMcpServerHealth(serverUrl?: string): Promise<APIResponse>;
17
+ export declare function waitForConnectorsReady(baseUrl?: string | undefined, timeoutMs?: number): Promise<void>;
17
18
  export declare function deployProcess(filePath: string, authToken?: string, environment?: 'saas' | 'sm', clusterType?: string): Promise<number | null>;
18
19
  export declare function createProcessInstance(processDefinitionKey: string, authToken?: string, environment?: 'saas' | 'sm', clusterType?: string, variables?: Record<string, unknown>): Promise<string>;
19
20
  export declare function createJsonClusterVariable(authToken?: string, environment?: 'saas' | 'sm', customVariableName?: string, customVariableValue?: string, clusterType?: string): Promise<void>;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.updateCollectionScope = exports.createSingleProcessReport = exports.createDashboard = exports.createCollection = exports.getOptimizeCookieSm = exports.getOptimizeCoockie = exports.createStringClusterVariable = exports.createJsonClusterVariable = exports.createProcessInstance = exports.deployProcess = exports.validateMcpServerHealth = exports.authC8runAPI = exports.authSmAPI = exports.authSaasAPI = exports.authAPI = exports.buildZeebeApiUrl = exports.retryOn500 = exports.sendRequestAndAssertResponse = exports.assertResponseStatus = exports.getApiRequestContext = void 0;
6
+ exports.updateCollectionScope = exports.createSingleProcessReport = exports.createDashboard = exports.createCollection = exports.getOptimizeCookieSm = exports.getOptimizeCoockie = exports.createStringClusterVariable = exports.createJsonClusterVariable = exports.createProcessInstance = exports.deployProcess = exports.waitForConnectorsReady = exports.validateMcpServerHealth = exports.authC8runAPI = exports.authSmAPI = exports.authSaasAPI = exports.authAPI = exports.buildZeebeApiUrl = exports.retryOn500 = exports.sendRequestAndAssertResponse = exports.assertResponseStatus = exports.getApiRequestContext = void 0;
7
7
  const test_1 = require("@playwright/test");
8
8
  const sleep_1 = require("./sleep");
9
9
  const fs_1 = __importDefault(require("fs"));
@@ -267,6 +267,28 @@ async function validateMcpServerHealth(serverUrl) {
267
267
  }
268
268
  }
269
269
  exports.validateMcpServerHealth = validateMcpServerHealth;
270
+ // ---- Connectors Runtime Health Check ----
271
+ // Polls the c8Run connectors runtime health endpoint until it reports healthy,
272
+ // so connector jobs (REST, inbound webhook, MCP client) get processed and
273
+ // inbound subscriptions are registered before tests deploy/create instances.
274
+ // Guards against the c8Run startup race where the connectors runtime on :8086
275
+ // comes up later than Zeebe/Operate, leaving process instances stuck "active"
276
+ // and webhook endpoints unregistered.
277
+ async function waitForConnectorsReady(baseUrl = process.env.C8RUN_CONNECTORS_API_URL_LATEST, timeoutMs = 120000) {
278
+ if (!baseUrl) {
279
+ throw new Error('waitForConnectorsReady: missing connectors API URL ' +
280
+ '(C8RUN_CONNECTORS_API_URL_LATEST).');
281
+ }
282
+ const healthEndpoint = `${baseUrl}/actuator/health`;
283
+ apiRequestContext = await getApiRequestContext();
284
+ await (0, test_1.expect)(async () => {
285
+ const response = await apiRequestContext.get(healthEndpoint, {
286
+ timeout: 10000,
287
+ });
288
+ (0, test_1.expect)(response.status()).toBe(200);
289
+ }).toPass({ intervals: [5000, 10000, 15000], timeout: timeoutMs });
290
+ }
291
+ exports.waitForConnectorsReady = waitForConnectorsReady;
270
292
  // ---- Zeebe: API helpers ----
271
293
  async function deployProcess(filePath, authToken, environment, clusterType) {
272
294
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.700",
3
+ "version": "0.0.702",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",