@camunda/e2e-test-suite 0.0.1671 → 0.0.1672

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.
@@ -9,7 +9,6 @@ declare class TaskDetailsPage {
9
9
  readonly addVariableButton: Locator;
10
10
  readonly detailsPanel: Locator;
11
11
  readonly detailsHeader: Locator;
12
- readonly suspendedLabel: Locator;
13
12
  readonly suspendedActionsTooltip: Locator;
14
13
  readonly pendingTaskDescription: Locator;
15
14
  readonly pickATaskHeader: Locator;
@@ -36,6 +35,7 @@ declare class TaskDetailsPage {
36
35
  readonly noPreviewContainer: Locator;
37
36
  readonly previewContainer: Locator;
38
37
  constructor(page: Page);
38
+ suspendedLabel(processName: string): Locator;
39
39
  clickAssignToMeButton(): Promise<void>;
40
40
  clickUnassignButton(): Promise<void>;
41
41
  assertSuspendedActionDisabled(button: Locator): Promise<void>;
@@ -29,7 +29,6 @@ class TaskDetailsPage {
29
29
  addVariableButton;
30
30
  detailsPanel;
31
31
  detailsHeader;
32
- suspendedLabel;
33
32
  suspendedActionsTooltip;
34
33
  pendingTaskDescription;
35
34
  pickATaskHeader;
@@ -67,9 +66,6 @@ class TaskDetailsPage {
67
66
  name: 'Task details right panel',
68
67
  });
69
68
  this.detailsHeader = page.getByTitle('Task details header');
70
- this.suspendedLabel = this.detailsHeader.getByText('Suspended', {
71
- exact: true,
72
- });
73
69
  this.suspendedActionsTooltip = page.getByRole('tooltip', {
74
70
  name: 'Process instance suspended. Available again when it resumes.',
75
71
  exact: true,
@@ -110,6 +106,25 @@ class TaskDetailsPage {
110
106
  this.noPreviewContainer = this.page.locator('[class = "fjs-documentPreview-non-preview-item fjs-documentPreview-single-document-container"]');
111
107
  this.previewContainer = this.page.locator('[class = "fjs-documentPreview-single-document-container"]');
112
108
  }
109
+ // The orchestration Tasklist marks a suspended task with an accessible
110
+ // SuspendedBadge icon -- a `role="img"` element carrying the
111
+ // process-instance-suspended description -- on the task's card in the Tasks
112
+ // side panel, instead of printing a literal "Suspended" word in the details
113
+ // header. The side panel lists every open task, so scope the badge to the
114
+ // article carrying this test's unique `processName` (exactly as
115
+ // TaskPanelPage.taskLink does) rather than taking the first badge on the
116
+ // panel -- otherwise another suspended task's badge could satisfy the
117
+ // suspension check or keep the resume check from clearing.
118
+ suspendedLabel(processName) {
119
+ return this.page
120
+ .getByRole('region', { name: 'Tasks side panel' })
121
+ .locator('article')
122
+ .filter({ has: this.page.getByText(processName, { exact: true }) })
123
+ .first()
124
+ .getByRole('img', {
125
+ name: 'Process instance suspended. Available again when it resumes.',
126
+ });
127
+ }
113
128
  async clickAssignToMeButton() {
114
129
  await (0, test_1.expect)(this.assignToMeButton).toBeVisible({ timeout: 60000 });
115
130
  await this.assignToMeButton.click({ timeout: 60000 });
@@ -456,7 +456,7 @@ SM_8_11_1.test.describe('HTO User Flow Tests', () => {
456
456
  });
457
457
  await SM_8_11_1.test.step('Assert the Open Task Updates In Place to Suspended, Without Reopening It', async () => {
458
458
  await (0, test_1.expect)(taskPanelPage.taskLink(processName)).toHaveAccessibleName(/\(suspended\)$/, { timeout: 60000 });
459
- await (0, test_1.expect)(taskDetailsPage.suspendedLabel).toBeVisible({
459
+ await (0, test_1.expect)(taskDetailsPage.suspendedLabel(processName)).toBeVisible({
460
460
  timeout: 60000,
461
461
  });
462
462
  await (0, test_1.expect)(taskDetailsPage.unassignButton).toBeDisabled();
@@ -469,7 +469,7 @@ SM_8_11_1.test.describe('HTO User Flow Tests', () => {
469
469
  timeout: 60000,
470
470
  });
471
471
  await (0, test_1.expect)(taskPanelPage.taskLink(processName)).not.toHaveAccessibleName(/\(suspended\)$/, { timeout: 60000 });
472
- await (0, test_1.expect)(taskDetailsPage.suspendedLabel).toBeHidden({
472
+ await (0, test_1.expect)(taskDetailsPage.suspendedLabel(processName)).toBeHidden({
473
473
  timeout: 60000,
474
474
  });
475
475
  await (0, test_1.expect)(taskDetailsPage.completeTaskButton).toBeEnabled();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1671",
3
+ "version": "0.0.1672",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",