@camunda/e2e-test-suite 0.0.1188 → 0.0.1190
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.
|
@@ -16,8 +16,12 @@ class OCIdentityHomePage {
|
|
|
16
16
|
noPermissionsMessage;
|
|
17
17
|
constructor(page) {
|
|
18
18
|
this.page = page;
|
|
19
|
+
// The Admin redesign (new design system, enabled by default on SaaS) moved
|
|
20
|
+
// the header off the old Carbon shell: its logo link now carries the static
|
|
21
|
+
// aria-label "Camunda Admin" (AppHeaderV2 in camunda/camunda's
|
|
22
|
+
// identity/client), replacing the old "Camunda logo Admin" accessible name.
|
|
19
23
|
this.adminBanner = page.getByRole('link', {
|
|
20
|
-
name: 'Camunda
|
|
24
|
+
name: 'Camunda Admin',
|
|
21
25
|
});
|
|
22
26
|
this.groupsTab = page
|
|
23
27
|
.getByRole('banner')
|
|
@@ -2,17 +2,16 @@ import { Page, Locator } from '@playwright/test';
|
|
|
2
2
|
declare class TaskPanelPage {
|
|
3
3
|
private page;
|
|
4
4
|
readonly availableTasks: Locator;
|
|
5
|
-
readonly
|
|
5
|
+
readonly filterSelectButton: Locator;
|
|
6
6
|
readonly taskListPageBanner: Locator;
|
|
7
7
|
readonly processesPageTab: Locator;
|
|
8
8
|
readonly tasksTab: Locator;
|
|
9
9
|
readonly noPermissionsMessage: Locator;
|
|
10
|
-
readonly expandButton: Locator;
|
|
11
10
|
readonly processesInfoText: Locator;
|
|
12
11
|
constructor(page: Page);
|
|
13
12
|
taskInList(name: string): Locator;
|
|
14
13
|
openTask(name: string, totalTimeout?: number): Promise<void>;
|
|
15
|
-
filterBy(option: 'All open' | 'Unassigned' | 'Assigned to me' | 'Completed'): Promise<void>;
|
|
14
|
+
filterBy(option: 'All open tasks' | 'Unassigned' | 'Assigned to me' | 'Completed'): Promise<void>;
|
|
16
15
|
taskCount(name: string): Promise<number>;
|
|
17
16
|
clickTasksTab(): Promise<void>;
|
|
18
17
|
scrollToLastTask(name: string): Promise<void>;
|
|
@@ -8,17 +8,25 @@ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLoc
|
|
|
8
8
|
class TaskPanelPage {
|
|
9
9
|
page;
|
|
10
10
|
availableTasks;
|
|
11
|
-
|
|
11
|
+
filterSelectButton;
|
|
12
12
|
taskListPageBanner;
|
|
13
13
|
processesPageTab;
|
|
14
14
|
tasksTab;
|
|
15
15
|
noPermissionsMessage;
|
|
16
|
-
expandButton;
|
|
17
16
|
processesInfoText;
|
|
18
17
|
constructor(page) {
|
|
19
18
|
this.page = page;
|
|
20
19
|
this.availableTasks = page.getByTitle('Available tasks');
|
|
21
|
-
|
|
20
|
+
// The old Carbon expandable filter sidebar (aria-controls="task-nav-bar",
|
|
21
|
+
// "Expand to show filters") is gone after Tasklist's redesign. Filtering is
|
|
22
|
+
// now a single dropdown-trigger button (id="filter-select") whose
|
|
23
|
+
// accessible name is the static "Filters" aria-label; clicking it opens a
|
|
24
|
+
// Radix DropdownMenu of filter options (matches the current locator in
|
|
25
|
+
// camunda/camunda's own qa/c8-orchestration-cluster-e2e-test-suite).
|
|
26
|
+
this.filterSelectButton = page.getByRole('button', {
|
|
27
|
+
name: 'Filters',
|
|
28
|
+
exact: true,
|
|
29
|
+
});
|
|
22
30
|
// The header logo's accessible name is now just "Camunda logo" -- the
|
|
23
31
|
// per-app suffix ("Camunda logo Tasklist") was dropped when Tasklist's
|
|
24
32
|
// header moved off the old Carbon shell (matches the already-corrected
|
|
@@ -29,9 +37,6 @@ class TaskPanelPage {
|
|
|
29
37
|
this.processesPageTab = page.getByRole('link', { name: 'Processes' });
|
|
30
38
|
this.tasksTab = page.getByRole('link', { name: 'Tasks' });
|
|
31
39
|
this.noPermissionsMessage = page.getByText('You don’t have access to this component');
|
|
32
|
-
this.expandButton = page.getByRole('button', {
|
|
33
|
-
name: 'Expand to show filters',
|
|
34
|
-
});
|
|
35
40
|
this.processesInfoText = page.getByText('Browse and run processes published by your organization');
|
|
36
41
|
}
|
|
37
42
|
// Tasklist's importer can lag well behind Zeebe under heavy concurrent load
|
|
@@ -82,21 +87,46 @@ class TaskPanelPage {
|
|
|
82
87
|
`${totalTimeout}ms: ${lastError}`);
|
|
83
88
|
}
|
|
84
89
|
async filterBy(option) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
90
|
+
// Open the always-visible filter dropdown, then pick the option from the
|
|
91
|
+
// Radix menu that appears (role="menuitem"). There is no separate
|
|
92
|
+
// expand/collapse step like the old Carbon sidebar had.
|
|
93
|
+
//
|
|
94
|
+
// The trigger also carries the active filter's label, so it doubles as
|
|
95
|
+
// the "selection applied" signal, replacing the heading the old Carbon
|
|
96
|
+
// panel rendered for the active filter.
|
|
97
|
+
//
|
|
98
|
+
// TasksLayoutPage renders <Filters disabled={isPending} />, so a task
|
|
99
|
+
// list refetch landing while the menu is open disables the trigger and
|
|
100
|
+
// tears the menu down before Radix runs the item's onSelect: the menu
|
|
101
|
+
// closes but the filter never changes. Re-open and pick again rather
|
|
102
|
+
// than returning with the list still on the previous filter (same
|
|
103
|
+
// bounded retry as pages/c8Run-8.10/TaskPanelPage.ts).
|
|
104
|
+
const menuItem = this.page.getByRole('menuitem', {
|
|
105
|
+
name: option,
|
|
106
|
+
exact: true,
|
|
107
|
+
});
|
|
108
|
+
const triggerShowingOption = this.filterSelectButton.filter({
|
|
109
|
+
hasText: new RegExp(`^${option}$`),
|
|
110
|
+
});
|
|
111
|
+
const maxAttempts = 3;
|
|
112
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
113
|
+
await (0, test_1.expect)(this.filterSelectButton).toBeEnabled({ timeout: 60000 });
|
|
114
|
+
await this.filterSelectButton.click();
|
|
115
|
+
await (0, test_1.expect)(menuItem).toBeVisible({ timeout: 10000 });
|
|
116
|
+
await menuItem.click();
|
|
117
|
+
const applied = await triggerShowingOption
|
|
118
|
+
.waitFor({ state: 'visible', timeout: 15000 })
|
|
119
|
+
.then(() => true)
|
|
120
|
+
.catch(() => false);
|
|
121
|
+
if (applied) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
console.warn(`Attempt ${attempt} to apply the "${option}" task filter did not ` +
|
|
125
|
+
'take effect. Retrying...');
|
|
126
|
+
await this.page.keyboard.press('Escape');
|
|
127
|
+
await (0, test_1.expect)(this.filterSelectButton).toHaveAttribute('aria-expanded', 'false', { timeout: 10000 });
|
|
99
128
|
}
|
|
129
|
+
throw new Error(`Task filter "${option}" was not applied after ${maxAttempts} attempts`);
|
|
100
130
|
}
|
|
101
131
|
async taskCount(name) {
|
|
102
132
|
await (0, sleep_1.sleep)(20000);
|