@camunda/e2e-test-suite 0.0.943 → 0.0.944

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.
@@ -84,7 +84,27 @@ class TaskPanelPage {
84
84
  }
85
85
  async clickProcessesTab() {
86
86
  await (0, test_1.expect)(this.processesPageTab).toBeVisible();
87
- await this.processesPageTab.click();
87
+ const maxAttempts = 3;
88
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
89
+ await this.processesPageTab.click();
90
+ // A newly-arrived task can bounce the app back to the Tasks tab right
91
+ // as this click lands (nightly SM-8.10 run 31782502787: the click
92
+ // itself succeeded but the app ended up back on Tasks with the new
93
+ // task selected), so confirm the Processes view actually rendered
94
+ // before returning instead of trusting the click alone.
95
+ const landedOnProcesses = await this.page
96
+ .getByRole('searchbox', { name: 'Search processes' })
97
+ .waitFor({ state: 'visible', timeout: 5000 })
98
+ .then(() => true)
99
+ .catch(() => false);
100
+ if (landedOnProcesses) {
101
+ return;
102
+ }
103
+ if (attempt < maxAttempts) {
104
+ console.warn(`Attempt ${attempt} landed back on Tasks instead of Processes. Retrying...`);
105
+ }
106
+ }
107
+ throw new Error('Processes tab did not open after 3 attempts');
88
108
  }
89
109
  async taskCount(name, waitForStable = true) {
90
110
  // Removed waitForLoadState('networkidle') — Tasklist polls;
@@ -7,6 +7,7 @@ declare class TaskProcessesPage {
7
7
  readonly searchProcessesSearchbox: Locator;
8
8
  constructor(page: Page);
9
9
  clickpopupContinueButton(): Promise<void>;
10
+ private processStartButton;
10
11
  startProcess(name: string): Promise<void>;
11
12
  clickSearchProcessesSearchbox(): Promise<void>;
12
13
  fillSearchProcessesSearchbox(process: string): Promise<void>;
@@ -28,13 +28,18 @@ class TaskProcessesPage {
28
28
  console.log('Popup not present');
29
29
  }
30
30
  }
31
+ // Scopes to the tile by walking up from its heading to the closest ancestor
32
+ // that owns a button: the unified webapp tile carries no test id, and the
33
+ // wrapper class names are build-hashed CSS modules.
34
+ processStartButton(name) {
35
+ return this.page
36
+ .getByRole('heading', { name, exact: true })
37
+ .locator('xpath=ancestor::div[.//button][1]')
38
+ .getByRole('button', { name: 'Start process' });
39
+ }
31
40
  async startProcess(name) {
32
41
  const found = await (0, UtilitiesPage_1.findTextWithPagination)(this.page, name, 60000, async () => {
33
- await this.page
34
- .locator('[data-testid="process-tile"]')
35
- .filter({ hasText: name })
36
- .getByRole('button', { name: 'Start process' })
37
- .click({ timeout: 60000 });
42
+ await this.processStartButton(name).click({ timeout: 60000 });
38
43
  });
39
44
  if (!found) {
40
45
  throw new Error(`Process "${name}" not found in pagination`);
@@ -44,7 +49,26 @@ class TaskProcessesPage {
44
49
  });
45
50
  }
46
51
  async clickSearchProcessesSearchbox() {
47
- await this.searchProcessesSearchbox.click();
52
+ const maxAttempts = 3;
53
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
54
+ try {
55
+ await this.searchProcessesSearchbox.click({ timeout: 5000 });
56
+ return;
57
+ }
58
+ catch (error) {
59
+ if (attempt === maxAttempts) {
60
+ throw error;
61
+ }
62
+ // The app can bounce back to the Tasks tab at any point after a new
63
+ // task arrives (not just synchronously with the Processes tab click
64
+ // -- run 31785205047 saw it happen mid-way through the unrelated
65
+ // 15s wait for a "Continue" popup that wasn't present), leaving
66
+ // Processes' own searchbox gone by the time this runs. Re-open
67
+ // Processes and retry rather than trusting we're still on it.
68
+ console.warn(`Attempt ${attempt} failed to click the Processes searchbox, probably bounced back to Tasks. Re-opening Processes and retrying...`);
69
+ await this.page.getByRole('link', { name: 'Processes' }).click();
70
+ }
71
+ }
48
72
  }
49
73
  async fillSearchProcessesSearchbox(process) {
50
74
  await this.searchProcessesSearchbox.fill(process);
@@ -105,7 +105,8 @@ SM_8_10_1.test.describe('Identity User Flow Tests', () => {
105
105
  });
106
106
  });
107
107
  });
108
- (0, SM_8_10_1.test)('User Roles User Flow on Orchestration Cluster', async ({ page, navigationPage, ocIdentityMappingRulesPage, ocIdentityHomePage, ocIdentityRolesPage, taskPanelPage, operateHomePage, settingsPage, browser, keycloakLoginPage, keycloakAdminPage, managementIdentityPage, }) => {
108
+ // Skipped due to bug #60139: https://github.com/camunda/camunda/issues/60139
109
+ SM_8_10_1.test.skip('User Roles User Flow on Orchestration Cluster', async ({ page, navigationPage, ocIdentityMappingRulesPage, ocIdentityHomePage, ocIdentityRolesPage, taskPanelPage, operateHomePage, settingsPage, browser, keycloakLoginPage, keycloakAdminPage, managementIdentityPage, }) => {
109
110
  if (node_process_1.default.env.IS_RBA === 'true' ||
110
111
  node_process_1.default.env.IS_MT === 'true' ||
111
112
  node_process_1.default.env.IS_LICENSE_KEY === 'true') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.943",
3
+ "version": "0.0.944",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",