@camunda/e2e-test-suite 0.0.1573 → 0.0.1575

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.
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TaskDetailsPage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
+ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
5
6
  function cardinalToOrdinal(numberValue) {
6
7
  const realOrderIndex = numberValue.toString();
7
8
  if (['11', '12', '13'].includes(realOrderIndex.slice(-2))) {
@@ -109,8 +110,24 @@ class TaskDetailsPage {
109
110
  await (0, test_1.expect)(this.page.getByText('Assigning...')).not.toBeVisible({
110
111
  timeout: 180000,
111
112
  });
112
- await (0, test_1.expect)(this.assignedToMeText).toBeVisible({
113
- timeout: 60000,
113
+ // A Camunda user task's assignment goes through Zeebe and back through
114
+ // the Tasklist importer, and the details panel can keep showing the task
115
+ // as unassigned after "Assigning..." clears (the click is occasionally
116
+ // lost too). Reload the task and re-assign if it is still unassigned, as
117
+ // pages/SM-8.7/TaskDetailsPage.ts does; "Assigned to me" is still required.
118
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.assignedToMeText, {
119
+ totalTimeout: 600000,
120
+ visibilityTimeout: 60000,
121
+ postAction: async () => {
122
+ await this.page.reload();
123
+ await (0, test_1.expect)(this.assignToMeButton.or(this.assignedToMeText).first()).toBeVisible({ timeout: 60000 });
124
+ if (await this.assignToMeButton.isVisible()) {
125
+ await this.assignToMeButton.click({ timeout: 60000 });
126
+ await (0, test_1.expect)(this.page.getByText('Assigning...')).not.toBeVisible({
127
+ timeout: 180000,
128
+ });
129
+ }
130
+ },
114
131
  });
115
132
  }
116
133
  async clickUnassignButton() {
@@ -206,8 +206,26 @@ class TaskDetailsPage {
206
206
  async clickRadioButton(radioBtnLabel) {
207
207
  await this.page.getByText(radioBtnLabel).click();
208
208
  }
209
+ // Tasklist renders the task form `readonly` until the details panel shows
210
+ // the task as assigned. The nightly trace showed the task list already
211
+ // reporting "Task assigned to me" while the details panel had re-fetched a
212
+ // stale "Unassigned" state, so the form stayed readonly and `check()` timed
213
+ // out on the overlaying `.fjs-element`. Wait for the checkbox to become
214
+ // editable and reload to pick up the current task state if it does not;
215
+ // the task is never re-assigned here and `check()` still verifies the
216
+ // resulting checked state.
209
217
  async checkChecklistBox(label) {
210
- await this.page.getByLabel(label).check();
218
+ const checkbox = this.page.getByLabel(label);
219
+ await (0, test_1.expect)(async () => {
220
+ try {
221
+ await (0, test_1.expect)(checkbox).toBeEditable({ timeout: 20000 });
222
+ }
223
+ catch (error) {
224
+ await this.page.reload();
225
+ throw error;
226
+ }
227
+ await checkbox.check({ timeout: 10000 });
228
+ }).toPass({ timeout: 150000, intervals: [1000, 2000, 5000] });
211
229
  }
212
230
  async enterTwoValuesInTagList(value1, value2) {
213
231
  await this.tagList.click();
@@ -85,7 +85,11 @@ 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
+ // The agent prompt's answer template is "{City, Country} ... {h:mm AM/PM}
89
+ // on {Month day, year}" and the model sometimes echoes the placeholder
90
+ // brackets/braces around the values, so tolerate them. Each value's own
91
+ // format is still asserted.
92
+ 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
93
  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
94
  },
91
95
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1573",
3
+ "version": "0.0.1575",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",