@camunda/e2e-test-suite 0.0.975 → 0.0.976
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.
|
@@ -18,6 +18,10 @@ declare class AppsPage {
|
|
|
18
18
|
readonly consoleLink: Locator;
|
|
19
19
|
readonly camundaComponentsButton: Locator;
|
|
20
20
|
readonly camundaAppsButton: Locator;
|
|
21
|
+
readonly contextSwitcherButton: Locator;
|
|
22
|
+
readonly tasklistMenuItem: Locator;
|
|
23
|
+
readonly optimizeMenuItem: Locator;
|
|
24
|
+
readonly adminMenuItem: Locator;
|
|
21
25
|
constructor(page: Page);
|
|
22
26
|
private reloadForRecovery;
|
|
23
27
|
clickCluster(component: Locator, name: string): Promise<void>;
|
|
@@ -23,6 +23,10 @@ class AppsPage {
|
|
|
23
23
|
consoleLink;
|
|
24
24
|
camundaComponentsButton;
|
|
25
25
|
camundaAppsButton;
|
|
26
|
+
contextSwitcherButton;
|
|
27
|
+
tasklistMenuItem;
|
|
28
|
+
optimizeMenuItem;
|
|
29
|
+
adminMenuItem;
|
|
26
30
|
constructor(page) {
|
|
27
31
|
this.page = page;
|
|
28
32
|
this.modelerLink = page.getByRole('link', { name: 'Modeler', exact: true });
|
|
@@ -34,6 +38,20 @@ class AppsPage {
|
|
|
34
38
|
this.consoleLink = page.getByRole('link', { name: 'Console', exact: true });
|
|
35
39
|
this.camundaComponentsButton = page.getByLabel('Camunda components');
|
|
36
40
|
this.camundaAppsButton = page.getByLabel('Camunda apps');
|
|
41
|
+
// Operate's Design System navigation ("nav V2", default-on since
|
|
42
|
+
// camunda/camunda `feat: enable Design System navigation in Operate`)
|
|
43
|
+
// swaps the legacy in-app apps flyout for a breadcrumb context switcher.
|
|
44
|
+
// Its trigger is labelled "Switch context" or "Switch application"
|
|
45
|
+
// depending on the breadcrumb configuration, and each target app is a
|
|
46
|
+
// `menuitemradio` rather than a link.
|
|
47
|
+
this.contextSwitcherButton = page
|
|
48
|
+
.getByRole('button', { name: 'Switch context' })
|
|
49
|
+
.or(page.getByRole('button', { name: 'Switch application' }));
|
|
50
|
+
this.tasklistMenuItem = page.getByRole('menuitemradio', { name: 'Tasklist' });
|
|
51
|
+
this.optimizeMenuItem = page.getByRole('menuitemradio', { name: 'Optimize' });
|
|
52
|
+
this.adminMenuItem = page.getByRole('menuitemradio', {
|
|
53
|
+
name: /^(Admin|Identity)$/, // Identity Should be removed after https://github.com/camunda/camunda/issues/46447 is fixed
|
|
54
|
+
});
|
|
37
55
|
this.tasklistListItem = this.page
|
|
38
56
|
.getByRole('listitem')
|
|
39
57
|
.filter({ hasText: 'Tasklist' });
|
|
@@ -255,6 +273,7 @@ class AppsPage {
|
|
|
255
273
|
// menu animation on slower setups.
|
|
256
274
|
const anyAppEntry = this.tasklistLink
|
|
257
275
|
.or(this.tasklistButton)
|
|
276
|
+
.or(this.tasklistMenuItem)
|
|
258
277
|
.or(this.modelerLink)
|
|
259
278
|
.or(this.operateLink)
|
|
260
279
|
.or(this.consoleLink);
|
|
@@ -262,7 +281,12 @@ class AppsPage {
|
|
|
262
281
|
.first()
|
|
263
282
|
.waitFor({ state: 'visible', timeout: 30000 })
|
|
264
283
|
.catch(() => { });
|
|
265
|
-
if (await this.
|
|
284
|
+
if (await this.tasklistMenuItem.isVisible({ timeout: 5000 })) {
|
|
285
|
+
// nav V2 breadcrumb switcher: apps are menuitemradio entries that
|
|
286
|
+
// hop to the same cluster's app directly, no cluster sub-select.
|
|
287
|
+
await this.tasklistMenuItem.click({ timeout: 10000 });
|
|
288
|
+
}
|
|
289
|
+
else if (await this.tasklistLink.isVisible({ timeout: 5000 })) {
|
|
266
290
|
//Single cluster
|
|
267
291
|
await this.tasklistLink.click({ timeout: 10000 });
|
|
268
292
|
}
|
|
@@ -346,8 +370,13 @@ class AppsPage {
|
|
|
346
370
|
for (let retries = 0; retries < maxRetries; retries++) {
|
|
347
371
|
try {
|
|
348
372
|
if (retries === 0) {
|
|
349
|
-
|
|
350
|
-
|
|
373
|
+
if (await this.adminMenuItem.isVisible({ timeout: 5000 })) {
|
|
374
|
+
// nav V2 breadcrumb switcher: apps are menuitemradio entries that
|
|
375
|
+
// hop to the same cluster's app directly, no cluster sub-select.
|
|
376
|
+
await this.adminMenuItem.click({ timeout: 10000 });
|
|
377
|
+
}
|
|
378
|
+
else if (await this.adminLink.isVisible({ timeout: 5000 })) {
|
|
379
|
+
//Single cluster
|
|
351
380
|
await this.adminLink.click({ timeout: 10000 });
|
|
352
381
|
}
|
|
353
382
|
else {
|
|
@@ -357,7 +386,10 @@ class AppsPage {
|
|
|
357
386
|
}
|
|
358
387
|
else {
|
|
359
388
|
await this.clickCamundaApps();
|
|
360
|
-
if (await this.
|
|
389
|
+
if (await this.adminMenuItem.isVisible({ timeout: 5000 })) {
|
|
390
|
+
await this.adminMenuItem.click({ timeout: 10000 });
|
|
391
|
+
}
|
|
392
|
+
else if (await this.adminLink.isVisible({ timeout: 5000 })) {
|
|
361
393
|
await this.adminLink.click({ timeout: 10000 });
|
|
362
394
|
}
|
|
363
395
|
else {
|
|
@@ -453,7 +485,12 @@ class AppsPage {
|
|
|
453
485
|
for (let retries = 0; retries < maxRetries; retries++) {
|
|
454
486
|
try {
|
|
455
487
|
if (retries === 0) {
|
|
456
|
-
if (await this.
|
|
488
|
+
if (await this.optimizeMenuItem.isVisible({ timeout: 10000 })) {
|
|
489
|
+
// nav V2 breadcrumb switcher: apps are menuitemradio entries that
|
|
490
|
+
// hop to the same cluster's app directly, no cluster sub-select.
|
|
491
|
+
await this.optimizeMenuItem.click({ timeout: 10000 });
|
|
492
|
+
}
|
|
493
|
+
else if (await this.optimizeLink.isVisible({ timeout: 10000 })) {
|
|
457
494
|
//Single cluster
|
|
458
495
|
await this.optimizeLink.click({ timeout: 10000 });
|
|
459
496
|
}
|
|
@@ -464,7 +501,10 @@ class AppsPage {
|
|
|
464
501
|
}
|
|
465
502
|
else {
|
|
466
503
|
await this.clickCamundaApps();
|
|
467
|
-
if (await this.
|
|
504
|
+
if (await this.optimizeMenuItem.isVisible({ timeout: 5000 })) {
|
|
505
|
+
await this.optimizeMenuItem.click({ timeout: 10000 });
|
|
506
|
+
}
|
|
507
|
+
else if (await this.optimizeLink.isVisible({ timeout: 5000 })) {
|
|
468
508
|
await this.optimizeLink.click({ timeout: 10000 });
|
|
469
509
|
}
|
|
470
510
|
else {
|
|
@@ -487,6 +527,7 @@ class AppsPage {
|
|
|
487
527
|
this.camundaComponentsButton,
|
|
488
528
|
this.camundaAppsButton,
|
|
489
529
|
this.appSwitcherButton,
|
|
530
|
+
this.contextSwitcherButton,
|
|
490
531
|
];
|
|
491
532
|
for (let retries = 0; retries < maxRetries; retries++) {
|
|
492
533
|
for (const appButton of appButtons) {
|
|
@@ -39,7 +39,14 @@ class OperateHomePage {
|
|
|
39
39
|
.getByTestId('variable-operation-spinner')
|
|
40
40
|
.locator('circle')
|
|
41
41
|
.nth(1);
|
|
42
|
-
|
|
42
|
+
// Operate's Design System navigation ("nav V2", default-on since
|
|
43
|
+
// camunda/camunda `feat: enable Design System navigation in Operate`)
|
|
44
|
+
// renders the logo link as "Camunda Operate"; the legacy header used
|
|
45
|
+
// "Camunda logo Operate" and stays available as a fallback, so match
|
|
46
|
+
// either so the banner gate works whichever navigation is served.
|
|
47
|
+
this.operateBanner = page
|
|
48
|
+
.getByRole('link', { name: 'Camunda logo Operate' })
|
|
49
|
+
.or(page.getByRole('link', { name: 'Camunda Operate' }));
|
|
43
50
|
this.noPermissionsMessage = page
|
|
44
51
|
.getByText('You don’t have access to this component')
|
|
45
52
|
.first();
|
|
@@ -728,6 +728,8 @@ class OperateProcessInstancePage {
|
|
|
728
728
|
// the cluster the same missing session as the round before it.
|
|
729
729
|
await this.page
|
|
730
730
|
.getByRole('link', { name: 'Camunda logo Operate' })
|
|
731
|
+
.or(this.page.getByRole('link', { name: 'Camunda Operate', exact: true }))
|
|
732
|
+
.first()
|
|
731
733
|
.waitFor({ state: 'visible', timeout: left(60000) });
|
|
732
734
|
booted = true;
|
|
733
735
|
}
|