@camunda/e2e-test-suite 0.0.1775 → 0.0.1777

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.
@@ -12,6 +12,7 @@ declare class TaskPanelPage {
12
12
  readonly processesInfoText: Locator;
13
13
  constructor(page: Page);
14
14
  taskInList(name: string): Locator;
15
+ static readonly suspendedTaskName: RegExp;
15
16
  taskLink(processName: string): Locator;
16
17
  openTask(name: string, totalTimeout?: number): Promise<void>;
17
18
  filterBy(option: 'All open tasks' | 'Unassigned' | 'Assigned to me' | 'Completed'): Promise<void>;
@@ -73,6 +73,9 @@ class TaskPanelPage {
73
73
  taskInList(name) {
74
74
  return this.availableTasks.getByText(name, { exact: true }).first();
75
75
  }
76
+ // Older images append "(suspended)" via aria-label; newer ones name the link
77
+ // after its content, which includes the suspended icon's description.
78
+ static suspendedTaskName = /\(suspended\)$|Process instance suspended\./;
76
79
  // The link's accessible name is the task's own display name, not the
77
80
  // process name -- the process name is only the card's visible subtitle, so
78
81
  // find the card by that text first and read the link inside it.
@@ -39,10 +39,15 @@ class TaskPanelPage {
39
39
  // expanded `<nav id="task-nav-bar">` listing each filter as a `<Link>`,
40
40
  // and an `<h1>` naming the active filter.
41
41
  // camunda/camunda `main` is 8.11.0-SNAPSHOT and has replaced that with the
42
- // Design System `FilterSelect`: one always-visible trigger (accessible name
43
- // "Filters") opening a menu of `menuitem`s, no expand/collapse control and
44
- // no `<h1>`. The monorepo's helm e2e deploys an image built from that
45
- // commit, so it is the shell seen there.
42
+ // Design System `FilterSelect`: one always-visible trigger opening a menu of
43
+ // `menuitem`s, no expand/collapse control and no `<h1>`. The monorepo's helm
44
+ // e2e deploys an image built from that commit, so it is the shell seen there.
45
+ // The trigger's accessible name (`taskFiltersHeaderAria`) is plain
46
+ // "Filters" on the first FilterSelect images and "Filters: <selected
47
+ // filter>" once it started carrying the active filter -- the visible label
48
+ // then shows only the filter, e.g. "All open tasks". Match both so the
49
+ // lagging published image the SM nightly deploys and the newer monorepo
50
+ // build both resolve.
46
51
  // Matching only one shell is what made this pair of surfaces trade
47
52
  // failures: targeting the Carbon rail found no expand control on the
48
53
  // monorepo run, and targeting the dropdown found no "Filters" button at
@@ -50,8 +55,7 @@ class TaskPanelPage {
50
55
  this.filterPanelExpandButton = page.locator('button[aria-controls="task-nav-bar"][aria-expanded="false"]');
51
56
  this.filterPanelCollapseButton = page.locator('button[aria-controls="task-nav-bar"][aria-expanded="true"]');
52
57
  this.filterSelectButton = page.getByRole('button', {
53
- name: 'Filters',
54
- exact: true,
58
+ name: /^Filters(:|$)/,
55
59
  });
56
60
  // "the task panel's filter control is on screen", whichever shell renders
57
61
  // it: the Carbon rail shows the expand control when collapsed and the
@@ -11,6 +11,7 @@ const expectTextWithRetry_1 = require("../../utils/assertionHelpers/expectTextWi
11
11
  const users_1 = require("../../utils/users");
12
12
  const OperateProcessInstancePage_1 = require("../../pages/8.11/OperateProcessInstancePage");
13
13
  const apiHelpers_1 = require("../../utils/apiHelpers");
14
+ const TaskPanelPage_1 = require("../../pages/8.11/TaskPanelPage");
14
15
  const testUser = (0, users_1.getTestUser)('nineteenthUser');
15
16
  _8_11_1.test.describe.configure({ mode: 'parallel' });
16
17
  _8_11_1.test.describe('HTO User Flow Tests', () => {
@@ -410,7 +411,7 @@ _8_11_1.test.describe('HTO User Flow Tests', () => {
410
411
  });
411
412
  });
412
413
  await _8_11_1.test.step('Assert the Open Task Updates In Place to Suspended, Without Reopening It', async () => {
413
- await (0, test_1.expect)(taskPanelPage.taskLink(processName)).toHaveAccessibleName(/\(suspended\)$/, { timeout: 60000 });
414
+ await (0, test_1.expect)(taskPanelPage.taskLink(processName)).toHaveAccessibleName(TaskPanelPage_1.TaskPanelPage.suspendedTaskName, { timeout: 60000 });
414
415
  await (0, test_1.expect)(taskDetailsPage.suspendedLabel).toBeVisible({
415
416
  timeout: 60000,
416
417
  });
@@ -423,7 +424,9 @@ _8_11_1.test.describe('HTO User Flow Tests', () => {
423
424
  await (0, test_1.expect)(operateProcessInstancePage.suspendedIcon).toBeHidden({
424
425
  timeout: 60000,
425
426
  });
426
- await (0, test_1.expect)(taskPanelPage.taskLink(processName)).not.toHaveAccessibleName(/\(suspended\)$/, { timeout: 60000 });
427
+ await (0, test_1.expect)(taskPanelPage.taskLink(processName)).not.toHaveAccessibleName(TaskPanelPage_1.TaskPanelPage.suspendedTaskName, {
428
+ timeout: 60000,
429
+ });
427
430
  await (0, test_1.expect)(taskDetailsPage.suspendedLabel).toBeHidden({
428
431
  timeout: 60000,
429
432
  });
@@ -11,6 +11,11 @@ const OperateHomePage_1 = require("../../pages/SM-8.11/OperateHomePage");
11
11
  const OperateProcessesPage_1 = require("../../pages/SM-8.11/OperateProcessesPage");
12
12
  const OperateProcessInstancePage_1 = require("../../pages/SM-8.11/OperateProcessInstancePage");
13
13
  const apiHelpers_1 = require("../../utils/apiHelpers");
14
+ // Older Tasklist images append "(suspended)" to the task link's aria-label;
15
+ // newer ones drop that and let the name fall out of the card content, which
16
+ // includes the suspended icon's description. Match both so the lagging
17
+ // published image and the newer monorepo build both resolve.
18
+ const SUSPENDED_TASK_NAME = /\(suspended\)$|Process instance suspended\./;
14
19
  SM_8_11_1.test.describe.configure({ mode: 'parallel' });
15
20
  SM_8_11_1.test.describe('HTO User Flow Tests', () => {
16
21
  const mtTenant = process.env.IS_MT === 'true' ? '<default>' : '';
@@ -464,7 +469,7 @@ SM_8_11_1.test.describe('HTO User Flow Tests', () => {
464
469
  // Return to this tab as a user would, firing the visibility refetch that
465
470
  // updates the open panel in place (no reselection, so still "in place").
466
471
  await page.bringToFront();
467
- await (0, test_1.expect)(taskPanelPage.taskLink(processName)).toHaveAccessibleName(/\(suspended\)$/, { timeout: 60000 });
472
+ await (0, test_1.expect)(taskPanelPage.taskLink(processName)).toHaveAccessibleName(SUSPENDED_TASK_NAME, { timeout: 60000 });
468
473
  await (0, test_1.expect)(taskDetailsPage.suspendedLabel(processName)).toBeVisible({
469
474
  timeout: 60000,
470
475
  });
@@ -491,7 +496,7 @@ SM_8_11_1.test.describe('HTO User Flow Tests', () => {
491
496
  // clears the suspended state and re-enables the actions in place (see the
492
497
  // suspend step above for why the backgrounded tab does not refetch).
493
498
  await page.bringToFront();
494
- await (0, test_1.expect)(taskPanelPage.taskLink(processName)).not.toHaveAccessibleName(/\(suspended\)$/, { timeout: 60000 });
499
+ await (0, test_1.expect)(taskPanelPage.taskLink(processName)).not.toHaveAccessibleName(SUSPENDED_TASK_NAME, { timeout: 60000 });
495
500
  await (0, test_1.expect)(taskDetailsPage.suspendedLabel(processName)).toBeHidden({
496
501
  timeout: 60000,
497
502
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1775",
3
+ "version": "0.0.1777",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",