@camunda/e2e-test-suite 0.0.1540 → 0.0.1541

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.
@@ -85,7 +85,7 @@ const aiAgentSubProcessTestCases = [
85
85
  ];
86
86
  const regexTestCases = [
87
87
  {
88
- regex_ai_agent_time: /The current date and time in ([A-Za-zÀ-ÿ .,'-]+(?:, [A-Za-zÀ-ÿ .,'-]+)*), is approximately ((?:0?[1-9]|1[0-2]):[0-5][0-9] (?:AM|PM)) on ([A-Z][a-z]+ (?:[1-9]|[12][0-9]|3[01]), \d{4})\./,
88
+ regex_ai_agent_time: /The current date and time in \[?([A-Za-zÀ-ÿ .,'-]+(?:, [A-Za-zÀ-ÿ .,'-]+)*)\]?,? is approximately ((?:0?[1-9]|1[0-2]):[0-5][0-9] (?:AM|PM)) on ([A-Z][a-z]+ (?:[1-9]|[12][0-9]|3[01]), \d{4})\./,
89
89
  regex_db_vector: /Color and Varieties:\s*While orange is the most common color today, carrots can also be found in purple, red, yellow, and white varieties\. The orange color comes from beta-carotene, a pigment that the body converts into vitamin A\. Different colors may contain other antioxidants:\s*Purple carrots are rich in anthocyanins\s*Red carrots contain lycopene\s*Yellow carrots have lutein/,
90
90
  },
91
91
  ];
@@ -125,10 +125,14 @@ _8_9_1.test.describe('Agentic Orchestation User Flows', () => {
125
125
  await operateProcessInstancePage.assertActiveTokenIsPresent();
126
126
  });
127
127
  await _8_9_1.test.step('User can view the agent feedback on tasklist', async () => {
128
+ // Open this run's task by key: on a retry, the same-named task left
129
+ // behind (already assigned) by the failed first attempt would
130
+ // otherwise be opened, and it has no "Assign to me" button.
131
+ const taskKeys = await waitForUserTaskKeys(instanceKey);
128
132
  await appsPage.clickCamundaApps();
129
133
  await appsPage.clickTasklist(clusterName);
130
134
  await (0, sleep_1.sleep)(5000);
131
- await taskPanelPage.openTask(`AI Agent Chat With Tools ${params.provider}`);
135
+ await taskPanelPage.openTask(`AI Agent Chat With Tools ${params.provider}`, taskKeys);
132
136
  await taskDetailsPage.clickAssignToMeButton();
133
137
  });
134
138
  await _8_9_1.test.step('User can view the agent response and complete the task', async () => {
@@ -204,7 +204,14 @@ _8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
204
204
  await operateHomePage.clickProcessesTab();
205
205
  await operateProcessesPage.clickProcessCompletedCheckbox();
206
206
  await operateProcessesPage.clickProcessInstanceLink(processName);
207
+ // Connector jobs on the shared default cluster can take minutes to be
208
+ // picked up under nightly load (the nightly screenshot showed the token
209
+ // still on the REST task ~1 min after start, with the default 60s/3x
210
+ // budget already spent), so poll for completion for up to 10 minutes.
207
211
  await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateProcessInstancePage.completedIcon, {
212
+ totalTimeout: 600000,
213
+ visibilityTimeout: 30000,
214
+ maxRetries: 20,
208
215
  postAction: async () => {
209
216
  await page.reload();
210
217
  },
@@ -449,7 +456,11 @@ _8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
449
456
  const operateTab = await operateTabPromise;
450
457
  const operateTabProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(operateTab);
451
458
  await operateTabProcessInstancePage.closePopOverIfVisible();
452
- await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateTabProcessInstancePage, operateTabProcessInstancePage.completedIcon, 'completed icon');
459
+ // The flow chains seven connector jobs on the shared default cluster;
460
+ // under nightly load each can take a minute or more to be picked up
461
+ // (the nightly instance was still on the 4th task after the default
462
+ // 6 x 60s budget), so allow up to ~14 minutes for completion.
463
+ await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateTabProcessInstancePage, operateTabProcessInstancePage.completedIcon, 'completed icon', 60000, false, 12);
453
464
  await operateTabProcessInstancePage.assertProcessVariableContainsText('doc', 'gcp');
454
465
  await operateTabProcessInstancePage.assertProcessVariableContainsText('doc', 'b4946b81fed5c91a7de5f77c350241bc5ece49152708c61bd6c2208836d8415e');
455
466
  await operateTabProcessInstancePage.assertProcessVariableContainsText('doc', '19456');
@@ -551,12 +551,28 @@ async function deployProcess(filePath, authToken, environment, clusterType) {
551
551
  if (isMT) {
552
552
  multipart.tenantId = '<default>';
553
553
  }
554
- const response = await apiRequestContext.post(url, {
554
+ // Retry when the gateway briefly cannot reach a broker (HTTP 503
555
+ // "Expected to handle request, but there was a connection error with one
556
+ // of the brokers") or another 5xx: the SaaS nightly saw a ~4s window of
557
+ // these on the Agentic Orchestration Cluster that failed every MCP spec
558
+ // deploying in it, while specs deploying seconds later succeeded.
559
+ const maxAttempts = 6;
560
+ let response = await apiRequestContext.post(url, {
555
561
  headers: {
556
562
  Authorization: authToken ?? '',
557
563
  },
558
564
  multipart,
559
565
  });
566
+ for (let attempt = 1; attempt < maxAttempts && response.status() >= 500; attempt++) {
567
+ console.warn(`deployProcess: HTTP ${response.status()} for ${fileName}, attempt ${attempt}/${maxAttempts}, retrying in ${5 * attempt}s`);
568
+ await (0, sleep_1.sleep)(5000 * attempt);
569
+ response = await apiRequestContext.post(url, {
570
+ headers: {
571
+ Authorization: authToken ?? '',
572
+ },
573
+ multipart,
574
+ });
575
+ }
560
576
  if (response.status() !== 200) {
561
577
  const body = await response.text();
562
578
  console.error(`deployProcess failed for ${fileName}: HTTP ${response.status()} - ${body}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1540",
3
+ "version": "0.0.1541",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",