@camunda/e2e-test-suite 0.0.1166 → 0.0.1168

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.
@@ -105,10 +105,21 @@ class Authorization {
105
105
  force: true,
106
106
  });
107
107
  }
108
- await this.createAuthorizationSubmitButton.click();
109
- await (0, test_1.expect)(this.createAuthorizationModal).not.toBeVisible({
110
- timeout: 30000,
111
- });
108
+ // Submitting POSTs to the orchestration cluster's Identity API, which
109
+ // answers 503 while the cluster is still settling. Carbon then leaves the
110
+ // modal open with the form still filled, so the only thing the old
111
+ // single-shot submit could do was wait out its 30s and fail. Re-submitting
112
+ // replays the same request from the same form rather than building a
113
+ // second authorization; the guard keeps a slow-but-successful close from
114
+ // clicking a button that is already gone.
115
+ await (0, test_1.expect)(async () => {
116
+ if (await this.createAuthorizationModal.isVisible()) {
117
+ await this.createAuthorizationSubmitButton.click();
118
+ }
119
+ await (0, test_1.expect)(this.createAuthorizationModal).not.toBeVisible({
120
+ timeout: 30000,
121
+ });
122
+ }).toPass({ timeout: 150000, intervals: [5000, 10000, 15000] });
112
123
  await this.selectResourceTypeTab(authorization.resourceType).click();
113
124
  const item = this.page.getByRole('row').filter({
114
125
  hasText: `${authorization.ownerId}${authorization.resourceId}`,
@@ -382,6 +382,19 @@ class ModelerCreatePage {
382
382
  if (processId.length > 0) {
383
383
  await this.clickStartEventElement();
384
384
  await this.clickGeneralPropertiesPanel();
385
+ // Renaming the file is what normally propagates the name into
386
+ // `bpmn:process@name`, but when the rename lands while the just-created
387
+ // diagram is still initialising the sync is lost and the process keeps
388
+ // the template default "New BPMN diagram" -- the breadcrumb shows the new
389
+ // name while the properties panel still shows the old one. That name is
390
+ // the label Tasklist prints under each task (the user task itself is
391
+ // unnamed, so its row reads `Activity_<id>` / `New BPMN diagram`), so
392
+ // `openTask(processName)` then waits out its whole budget on a task that
393
+ // is sitting right there under the wrong label. Set the process name
394
+ // explicitly: the panel is already open on the process element for the id
395
+ // edit below, so this costs one extra fill and removes the race.
396
+ await this.clickNameInput();
397
+ await this.fillNamedInput(processName);
385
398
  await this.clickIdInput();
386
399
  await this.fillIdInput(processId);
387
400
  await this.clickStartEventElement();
@@ -49,8 +49,15 @@ class OperateProcessInstancePage {
49
49
  await this.page.reload();
50
50
  }
51
51
  async closePopOverIfVisible() {
52
+ // This is the first thing every caller does on a freshly opened Operate
53
+ // popup, so the wait has to cover the whole SSO hand-off (weblogin ->
54
+ // sso-callback -> deep link) before the instance header renders, not just
55
+ // the render itself. 60s did not: the first attempt of the 8.9 nightly's
56
+ // "Form.js Integration with User Task and AI Generated Form" died here
57
+ // (run 34919774298). Aligned with the 180s the callers already allow for
58
+ // the instance-state assertions that immediately follow this call.
52
59
  await (0, test_1.expect)(this.page.getByText('Instance History').first()).toBeVisible({
53
- timeout: 60000,
60
+ timeout: 180000,
54
61
  });
55
62
  if (await this.whatsNewPopUp.isVisible()) {
56
63
  await this.gotItButton.click();
@@ -91,7 +91,16 @@ class TaskDetailsPage {
91
91
  this.decrementButton = page.getByRole('button', { name: 'Decrement' });
92
92
  this.dateInput = page.getByLabel('Date of Birth');
93
93
  this.timeInput = page.getByPlaceholder('hh:mm ?m');
94
- this.checkbox = this.form.getByLabel('Agree');
94
+ // Only used by the AI-generated-form flow, where the form is produced by a
95
+ // model from a free-text prompt asking for "a Checkbox with the label
96
+ // Agree". The model paraphrases: the same prompt has rendered both `Agree`
97
+ // and `I confirm the details are correct.`. Prefer the requested label and
98
+ // fall back to the form's checkbox input, which is the field the prompt
99
+ // asks for either way.
100
+ this.checkbox = this.form
101
+ .getByLabel('Agree')
102
+ .or(this.form.locator('input[type="checkbox"]'))
103
+ .first();
95
104
  this.selectDropdown = this.form.getByText('Select').last();
96
105
  this.tagList = page.getByPlaceholder('Search');
97
106
  this.detailsInfo = page.getByTestId('details-info');
@@ -181,7 +190,14 @@ class TaskDetailsPage {
181
190
  await this.page.getByText(time).click();
182
191
  }
183
192
  async checkCheckbox() {
184
- await this.checkbox.check();
193
+ // form-js re-renders the whole form on every value change, so a click that
194
+ // lands while the preceding field's re-render is in flight focuses the
195
+ // checkbox without toggling it ("Clicking the checkbox did not change its
196
+ // state"). `check()` already verifies the resulting state, so retrying it
197
+ // is enough -- the assertion stays exactly as strict.
198
+ await (0, test_1.expect)(async () => {
199
+ await this.checkbox.check({ timeout: 10000 });
200
+ }).toPass({ timeout: 60000, intervals: [1000, 2000, 5000] });
185
201
  }
186
202
  async selectDropdownValue(value) {
187
203
  await this.selectDropdown.click();
@@ -414,11 +414,11 @@ _curl_common() {
414
414
  --retry 3 --retry-delay 1 --retry-connrefused --retry-all-errors \
415
415
  -i -s -H 'Expect:' "$@")"
416
416
  gw_status="$(echo "$gw_response" | grep -m1 -E '^HTTP/[0-9.]+' | awk '{print $2}' || true)"
417
- if { [[ -n "$gw_status" && "$gw_status" != "502" \
418
- && "$gw_status" != "503" && "$gw_status" != "504" ]] \
419
- || { [[ "$gw_status" == "503" \
420
- && "$gw_response" != *'<center>nginx</center>'* ]]; } \
421
- || (( gw_attempt >= gw_max )); then
417
+ if [[ -n "$gw_status" && "$gw_status" != "502" \
418
+ && "$gw_status" != "503" && "$gw_status" != "504" ]] \
419
+ || [[ "$gw_status" == "503" \
420
+ && "$gw_response" != *'<center>nginx</center>'* ]] \
421
+ || (( gw_attempt >= gw_max )); then
422
422
  printf '%s\n' "$gw_response"
423
423
  return 0
424
424
  fi
@@ -74,7 +74,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
74
74
  sessionStorage.clear();
75
75
  });
76
76
  await page.goto('/');
77
- await loginPage.loginWithTestUser(testUser);
77
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, 1000);
78
78
  });
79
79
  await _8_9_1.test.step('Navigate to Web Modeler', async () => {
80
80
  await appsPage.clickCamundaApps();
@@ -112,7 +112,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
112
112
  sessionStorage.clear();
113
113
  });
114
114
  await page.goto('/');
115
- await loginPage.loginWithTestUser(testUser);
115
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, 1000);
116
116
  });
117
117
  await _8_9_1.test.step('Navigate to Tasklist and Make Sure that the Two Deployed Processes Are Not Accessible', async () => {
118
118
  await appsPage.clickCamundaApps();
@@ -189,7 +189,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
189
189
  await page.goto('/');
190
190
  });
191
191
  await _8_9_1.test.step('Login as Test User', async () => {
192
- await loginPage.loginWithTestUser(testUser);
192
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, 1000);
193
193
  });
194
194
  await _8_9_1.test.step('Navigate to Web Modeler', async () => {
195
195
  await appsPage.clickCamundaApps();
@@ -227,7 +227,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
227
227
  sessionStorage.clear();
228
228
  });
229
229
  await page.goto('/');
230
- await loginPage.loginWithTestUser(testUser);
230
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, 1000);
231
231
  });
232
232
  await _8_9_1.test.step('Navigate to Tasklist and Only First Process Is Accessible', async () => {
233
233
  await appsPage.clickCamundaApps();
@@ -406,7 +406,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
406
406
  sessionStorage.clear();
407
407
  });
408
408
  await page.goto('/');
409
- await loginPage.loginWithTestUser(testUser);
409
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, 1000);
410
410
  });
411
411
  await _8_9_1.test.step('Navigate to Web Modeler', async () => {
412
412
  await appsPage.clickCamundaApps();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1166",
3
+ "version": "0.0.1168",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",
@@ -414,11 +414,11 @@ _curl_common() {
414
414
  --retry 3 --retry-delay 1 --retry-connrefused --retry-all-errors \
415
415
  -i -s -H 'Expect:' "$@")"
416
416
  gw_status="$(echo "$gw_response" | grep -m1 -E '^HTTP/[0-9.]+' | awk '{print $2}' || true)"
417
- if { [[ -n "$gw_status" && "$gw_status" != "502" \
418
- && "$gw_status" != "503" && "$gw_status" != "504" ]] \
419
- || { [[ "$gw_status" == "503" \
420
- && "$gw_response" != *'<center>nginx</center>'* ]]; } \
421
- || (( gw_attempt >= gw_max )); then
417
+ if [[ -n "$gw_status" && "$gw_status" != "502" \
418
+ && "$gw_status" != "503" && "$gw_status" != "504" ]] \
419
+ || [[ "$gw_status" == "503" \
420
+ && "$gw_response" != *'<center>nginx</center>'* ]] \
421
+ || (( gw_attempt >= gw_max )); then
422
422
  printf '%s\n' "$gw_response"
423
423
  return 0
424
424
  fi