@camunda/e2e-test-suite 0.0.1099 → 0.0.1101
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.
|
@@ -6,7 +6,10 @@ declare class TaskProcessesPage {
|
|
|
6
6
|
readonly processes: Locator;
|
|
7
7
|
readonly availableTasks: Locator;
|
|
8
8
|
readonly waitingForTasksText: Locator;
|
|
9
|
+
readonly searchProcessesSearchbox: Locator;
|
|
10
|
+
readonly processesTab: Locator;
|
|
9
11
|
constructor(page: Page);
|
|
12
|
+
searchForProcess(name: string): Promise<void>;
|
|
10
13
|
clickpopupContinueButton(): Promise<void>;
|
|
11
14
|
startProcess(name: string): Promise<void>;
|
|
12
15
|
}
|
|
@@ -11,6 +11,8 @@ class TaskProcessesPage {
|
|
|
11
11
|
processes;
|
|
12
12
|
availableTasks;
|
|
13
13
|
waitingForTasksText;
|
|
14
|
+
searchProcessesSearchbox;
|
|
15
|
+
processesTab;
|
|
14
16
|
constructor(page) {
|
|
15
17
|
this.page = page;
|
|
16
18
|
this.popupContinueButton = page.getByRole('button', { name: 'Continue' });
|
|
@@ -18,6 +20,49 @@ class TaskProcessesPage {
|
|
|
18
20
|
this.processes = page.locator('[data-testid="process-tile"]');
|
|
19
21
|
this.availableTasks = page.getByTitle('Available tasks').first();
|
|
20
22
|
this.waitingForTasksText = this.page.getByText('Waiting for tasks...');
|
|
23
|
+
this.searchProcessesSearchbox = page.getByRole('searchbox', {
|
|
24
|
+
name: 'Search processes',
|
|
25
|
+
});
|
|
26
|
+
this.processesTab = page.getByRole('link', { name: 'Processes' });
|
|
27
|
+
}
|
|
28
|
+
// Tasklist's process list is an infinite list that asks for only 12 process
|
|
29
|
+
// definitions at a time (`PROCESS_DEFINITIONS_PAGE_SIZE` in the
|
|
30
|
+
// orchestration-cluster webapp) and reveals the rest behind "Load more".
|
|
31
|
+
// The RBA clusters these flows run against are long-lived and gain two more
|
|
32
|
+
// definitions every night, so the one deployed seconds ago sits at the far
|
|
33
|
+
// end of that list: walking to it costs a round trip per 12 entries and the
|
|
34
|
+
// assertion's budget runs out first, which is why raising the retry count
|
|
35
|
+
// never made a difference. Filter the list instead -- the field is sent as
|
|
36
|
+
// `processDefinitionId: {$like: *name*}`, so the process comes back on the
|
|
37
|
+
// first page and the assertion is about the process rather than about how
|
|
38
|
+
// far pagination got. The filter lives in the URL query, so it survives the
|
|
39
|
+
// reloads the retry helpers do between attempts.
|
|
40
|
+
async searchForProcess(name) {
|
|
41
|
+
const maxAttempts = 3;
|
|
42
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
43
|
+
try {
|
|
44
|
+
await (0, test_1.expect)(this.searchProcessesSearchbox).toBeVisible({
|
|
45
|
+
timeout: 60000,
|
|
46
|
+
});
|
|
47
|
+
await this.searchProcessesSearchbox.fill(name, { timeout: 30000 });
|
|
48
|
+
await (0, test_1.expect)(this.searchProcessesSearchbox).toHaveValue(name, {
|
|
49
|
+
timeout: 30000,
|
|
50
|
+
});
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
if (attempt === maxAttempts) {
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
57
|
+
// Tasklist sends the tab back to Tasks whenever a new task arrives,
|
|
58
|
+
// which can happen at any point here -- the Processes view, and with
|
|
59
|
+
// it this searchbox, is then simply gone. Re-open Processes and try
|
|
60
|
+
// again rather than trusting we are still on it.
|
|
61
|
+
console.warn(`Attempt ${attempt} failed to filter the process list; ` +
|
|
62
|
+
're-opening the Processes tab and retrying.');
|
|
63
|
+
await this.processesTab.click({ timeout: 60000 });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
21
66
|
}
|
|
22
67
|
async clickpopupContinueButton() {
|
|
23
68
|
await this.page.waitForTimeout(3000);
|
|
@@ -28,6 +73,7 @@ class TaskProcessesPage {
|
|
|
28
73
|
}
|
|
29
74
|
async startProcess(name) {
|
|
30
75
|
if (process.env.TASKLIST_VERSION === 'v2') {
|
|
76
|
+
await this.searchForProcess(name);
|
|
31
77
|
await (0, expectTextWithPagination_1.expectTextWithPagination)(this.page, name);
|
|
32
78
|
const container = this.page
|
|
33
79
|
.locator('div')
|
|
@@ -111,15 +111,17 @@ class Authorization {
|
|
|
111
111
|
.first();
|
|
112
112
|
}
|
|
113
113
|
// The Admin's Authorizations page is migrating onto the new design-system
|
|
114
|
-
// shell, which replaces the per-resource-type tabs with a single
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
//
|
|
114
|
+
// shell, which replaces the per-resource-type tabs with a single filter
|
|
115
|
+
// combobox (identity/client ListV2.tsx). That combobox's accessible name was
|
|
116
|
+
// renamed from "Authorization type" to "Resource type" in camunda/camunda
|
|
117
|
+
// commit 377b0e3; match either so both image versions resolve. Select the
|
|
118
|
+
// resource type through whichever this build renders: click the tab, or open
|
|
119
|
+
// the combobox and pick the option.
|
|
118
120
|
async selectResourceType(resourceType, timeout = 60000) {
|
|
119
121
|
const tab = this.selectResourceTypeTab(resourceType);
|
|
120
|
-
const filterCombobox = this.page
|
|
121
|
-
name: '
|
|
122
|
-
|
|
122
|
+
const filterCombobox = this.page
|
|
123
|
+
.getByRole('combobox', { name: 'Resource type' })
|
|
124
|
+
.or(this.page.getByRole('combobox', { name: 'Authorization type' }));
|
|
123
125
|
await (0, test_1.expect)(tab.or(filterCombobox)).toBeVisible({ timeout });
|
|
124
126
|
if (await tab.isVisible()) {
|
|
125
127
|
await tab.click();
|
|
@@ -303,11 +303,15 @@ _8_10_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () =>
|
|
|
303
303
|
await ocIdentityAuthorizationsPage.assertAuthorization('ROLEadmin*');
|
|
304
304
|
});
|
|
305
305
|
await _8_10_1.test.step('Navigate to Web Modeler', async () => {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
306
|
+
// The hand-off into Modeler goes through `modeler.<host>/login`, which
|
|
307
|
+
// runs an invisible reCAPTCHA before it even reaches the IdP, so the tab
|
|
308
|
+
// regularly sits on a loading shell well past 30s -- and it can stall
|
|
309
|
+
// there for good, which a plain wait cannot recover from. Use the shared
|
|
310
|
+
// helper the other 8.10 specs already use for this exact stall: it waits
|
|
311
|
+
// a full window, grants a hand-off that is still in transit a second
|
|
312
|
+
// one, and otherwise re-enters through the apps menu for a fresh
|
|
313
|
+
// handshake.
|
|
314
|
+
await appsPage.openModelerWithRetry(modelerHomePage.modelerPageBanner);
|
|
311
315
|
});
|
|
312
316
|
await _8_10_1.test.step('Navigate to Cross Component Test Project', async () => {
|
|
313
317
|
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
@@ -326,7 +330,14 @@ _8_10_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () =>
|
|
|
326
330
|
});
|
|
327
331
|
await taskPanelPage.clickProcessesTab();
|
|
328
332
|
await taskProcessesPage.clickpopupContinueButton();
|
|
333
|
+
// Tasklist only fetches 12 process definitions per request and hides the
|
|
334
|
+
// rest behind "Load more", so on these long-lived RBA clusters a process
|
|
335
|
+
// deployed seconds ago is many pages down. Narrow the list to the
|
|
336
|
+
// process under test before asserting it is there -- the assertion
|
|
337
|
+
// itself is unchanged.
|
|
338
|
+
await taskProcessesPage.searchForProcess(process1);
|
|
329
339
|
await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process1);
|
|
340
|
+
await taskProcessesPage.searchForProcess(process2);
|
|
330
341
|
await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process2);
|
|
331
342
|
});
|
|
332
343
|
await _8_10_1.test.step('Assert First Process Can Be Started From Tasklist', async () => {
|