@camunda/e2e-test-suite 0.0.1329 → 0.0.1330

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.
Files changed (167) hide show
  1. package/.github/c8_versions.json +1 -0
  2. package/README.md +1 -0
  3. package/dist/fixtures/8.11.d.ts +83 -0
  4. package/dist/fixtures/8.11.js +203 -0
  5. package/dist/pages/8.11/AppsPage.d.ts +60 -0
  6. package/dist/pages/8.11/AppsPage.js +1060 -0
  7. package/dist/pages/8.11/AuditLogPage.d.ts +14 -0
  8. package/dist/pages/8.11/AuditLogPage.js +69 -0
  9. package/dist/pages/8.11/Authorization.d.ts +44 -0
  10. package/dist/pages/8.11/Authorization.js +409 -0
  11. package/dist/pages/8.11/ClientCredentialsDetailsPage.d.ts +12 -0
  12. package/dist/pages/8.11/ClientCredentialsDetailsPage.js +36 -0
  13. package/dist/pages/8.11/ClusterDetailsPage.d.ts +107 -0
  14. package/dist/pages/8.11/ClusterDetailsPage.js +892 -0
  15. package/dist/pages/8.11/ClusterPage.d.ts +96 -0
  16. package/dist/pages/8.11/ClusterPage.js +657 -0
  17. package/dist/pages/8.11/ClusterSecretsPage.d.ts +48 -0
  18. package/dist/pages/8.11/ClusterSecretsPage.js +406 -0
  19. package/dist/pages/8.11/ConnectorMarketplacePage.d.ts +29 -0
  20. package/dist/pages/8.11/ConnectorMarketplacePage.js +156 -0
  21. package/dist/pages/8.11/ConnectorSettingsPage.d.ts +39 -0
  22. package/dist/pages/8.11/ConnectorSettingsPage.js +150 -0
  23. package/dist/pages/8.11/ConnectorTemplatePage.d.ts +11 -0
  24. package/dist/pages/8.11/ConnectorTemplatePage.js +34 -0
  25. package/dist/pages/8.11/ConsoleOrganizationPage.d.ts +77 -0
  26. package/dist/pages/8.11/ConsoleOrganizationPage.js +457 -0
  27. package/dist/pages/8.11/DataFiltersPage.d.ts +30 -0
  28. package/dist/pages/8.11/DataFiltersPage.js +135 -0
  29. package/dist/pages/8.11/FormJsPage.d.ts +38 -0
  30. package/dist/pages/8.11/FormJsPage.js +283 -0
  31. package/dist/pages/8.11/HomePage.d.ts +29 -0
  32. package/dist/pages/8.11/HomePage.js +176 -0
  33. package/dist/pages/8.11/IdpCreatePage.d.ts +118 -0
  34. package/dist/pages/8.11/IdpCreatePage.js +514 -0
  35. package/dist/pages/8.11/LoginPage.d.ts +45 -0
  36. package/dist/pages/8.11/LoginPage.js +214 -0
  37. package/dist/pages/8.11/ModelerCreatePage.d.ts +256 -0
  38. package/dist/pages/8.11/ModelerCreatePage.js +2272 -0
  39. package/dist/pages/8.11/ModelerHomePage.d.ts +100 -0
  40. package/dist/pages/8.11/ModelerHomePage.js +1168 -0
  41. package/dist/pages/8.11/ModelerUserInvitePage.d.ts +29 -0
  42. package/dist/pages/8.11/ModelerUserInvitePage.js +136 -0
  43. package/dist/pages/8.11/OCIdentityAuthorizationsPage.d.ts +11 -0
  44. package/dist/pages/8.11/OCIdentityAuthorizationsPage.js +25 -0
  45. package/dist/pages/8.11/OCIdentityClusterVariablesPage.d.ts +21 -0
  46. package/dist/pages/8.11/OCIdentityClusterVariablesPage.js +128 -0
  47. package/dist/pages/8.11/OCIdentityGroupsPage.d.ts +38 -0
  48. package/dist/pages/8.11/OCIdentityGroupsPage.js +176 -0
  49. package/dist/pages/8.11/OCIdentityHomePage.d.ts +21 -0
  50. package/dist/pages/8.11/OCIdentityHomePage.js +111 -0
  51. package/dist/pages/8.11/OCIdentityMappingRulesPage.d.ts +23 -0
  52. package/dist/pages/8.11/OCIdentityMappingRulesPage.js +124 -0
  53. package/dist/pages/8.11/OCIdentityRolesPage.d.ts +43 -0
  54. package/dist/pages/8.11/OCIdentityRolesPage.js +236 -0
  55. package/dist/pages/8.11/OperateHomePage.d.ts +28 -0
  56. package/dist/pages/8.11/OperateHomePage.js +150 -0
  57. package/dist/pages/8.11/OperateProcessInstancePage.d.ts +43 -0
  58. package/dist/pages/8.11/OperateProcessInstancePage.js +893 -0
  59. package/dist/pages/8.11/OperateProcessesPage.d.ts +28 -0
  60. package/dist/pages/8.11/OperateProcessesPage.js +153 -0
  61. package/dist/pages/8.11/OptimizeCollectionsPage.d.ts +30 -0
  62. package/dist/pages/8.11/OptimizeCollectionsPage.js +175 -0
  63. package/dist/pages/8.11/OptimizeDashboardPage.d.ts +11 -0
  64. package/dist/pages/8.11/OptimizeDashboardPage.js +71 -0
  65. package/dist/pages/8.11/OptimizeHomePage.d.ts +17 -0
  66. package/dist/pages/8.11/OptimizeHomePage.js +171 -0
  67. package/dist/pages/8.11/OptimizeReportPage.d.ts +49 -0
  68. package/dist/pages/8.11/OptimizeReportPage.js +184 -0
  69. package/dist/pages/8.11/OptimizeSharePage.d.ts +16 -0
  70. package/dist/pages/8.11/OptimizeSharePage.js +100 -0
  71. package/dist/pages/8.11/PlayPage.d.ts +17 -0
  72. package/dist/pages/8.11/PlayPage.js +157 -0
  73. package/dist/pages/8.11/ProcessApplicationPage.d.ts +32 -0
  74. package/dist/pages/8.11/ProcessApplicationPage.js +496 -0
  75. package/dist/pages/8.11/SettingsPage.d.ts +10 -0
  76. package/dist/pages/8.11/SettingsPage.js +53 -0
  77. package/dist/pages/8.11/SignUpPage.d.ts +42 -0
  78. package/dist/pages/8.11/SignUpPage.js +134 -0
  79. package/dist/pages/8.11/TaskDetailsPage.d.ts +77 -0
  80. package/dist/pages/8.11/TaskDetailsPage.js +324 -0
  81. package/dist/pages/8.11/TaskPanelPage.d.ts +26 -0
  82. package/dist/pages/8.11/TaskPanelPage.js +245 -0
  83. package/dist/pages/8.11/TaskProcessesPage.d.ts +18 -0
  84. package/dist/pages/8.11/TaskProcessesPage.js +134 -0
  85. package/dist/pages/8.11/UtilitiesPage.d.ts +56 -0
  86. package/dist/pages/8.11/UtilitiesPage.js +1024 -0
  87. package/dist/pages/8.11/WorkspaceMembersPage.d.ts +21 -0
  88. package/dist/pages/8.11/WorkspaceMembersPage.js +268 -0
  89. package/dist/tests/8.11/access-user-role-management.spec.d.ts +1 -0
  90. package/dist/tests/8.11/access-user-role-management.spec.js +487 -0
  91. package/dist/tests/8.11/agentic-ai-user-flows.spec.d.ts +1 -0
  92. package/dist/tests/8.11/agentic-ai-user-flows.spec.js +209 -0
  93. package/dist/tests/8.11/aws-cluster-user-flows.spec.d.ts +1 -0
  94. package/dist/tests/8.11/aws-cluster-user-flows.spec.js +188 -0
  95. package/dist/tests/8.11/aws-connectors-user-flows.spec.d.ts +1 -0
  96. package/dist/tests/8.11/aws-connectors-user-flows.spec.js +167 -0
  97. package/dist/tests/8.11/cluster-variables.spec.d.ts +1 -0
  98. package/dist/tests/8.11/cluster-variables.spec.js +202 -0
  99. package/dist/tests/8.11/connectors-user-flows.spec.d.ts +1 -0
  100. package/dist/tests/8.11/connectors-user-flows.spec.js +537 -0
  101. package/dist/tests/8.11/console-user-flows.spec.d.ts +1 -0
  102. package/dist/tests/8.11/console-user-flows.spec.js +199 -0
  103. package/dist/tests/8.11/hto-user-flows.spec.d.ts +1 -0
  104. package/dist/tests/8.11/hto-user-flows.spec.js +358 -0
  105. package/dist/tests/8.11/idp-user-flows.spec.d.ts +1 -0
  106. package/dist/tests/8.11/idp-user-flows.spec.js +316 -0
  107. package/dist/tests/8.11/login-negative-tests.spec.d.ts +1 -0
  108. package/dist/tests/8.11/login-negative-tests.spec.js +29 -0
  109. package/dist/tests/8.11/login.spec.d.ts +1 -0
  110. package/dist/tests/8.11/login.spec.js +29 -0
  111. package/dist/tests/8.11/navigation.spec.d.ts +1 -0
  112. package/dist/tests/8.11/navigation.spec.js +59 -0
  113. package/dist/tests/8.11/operate-access-flow.spec.d.ts +1 -0
  114. package/dist/tests/8.11/operate-access-flow.spec.js +136 -0
  115. package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.d.ts +1 -0
  116. package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.js +96 -0
  117. package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.d.ts +1 -0
  118. package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.js +69 -0
  119. package/dist/tests/8.11/optimize-api-tests.spec.d.ts +1 -0
  120. package/dist/tests/8.11/optimize-api-tests.spec.js +1194 -0
  121. package/dist/tests/8.11/optimize-collections-api.spec.d.ts +1 -0
  122. package/dist/tests/8.11/optimize-collections-api.spec.js +184 -0
  123. package/dist/tests/8.11/optimize-collections-ui.spec.d.ts +1 -0
  124. package/dist/tests/8.11/optimize-collections-ui.spec.js +46 -0
  125. package/dist/tests/8.11/optimize-data-filters-api.spec.d.ts +1 -0
  126. package/dist/tests/8.11/optimize-data-filters-api.spec.js +195 -0
  127. package/dist/tests/8.11/optimize-data-filters-ui.spec.d.ts +1 -0
  128. package/dist/tests/8.11/optimize-data-filters-ui.spec.js +306 -0
  129. package/dist/tests/8.11/optimize-exporter-filters-importer-e2e.spec.d.ts +1 -0
  130. package/dist/tests/8.11/optimize-exporter-filters-importer-e2e.spec.js +316 -0
  131. package/dist/tests/8.11/optimize-sharing-alerts-export-api.spec.d.ts +1 -0
  132. package/dist/tests/8.11/optimize-sharing-alerts-export-api.spec.js +337 -0
  133. package/dist/tests/8.11/optimize-sharing-alerts-export-ui.spec.d.ts +1 -0
  134. package/dist/tests/8.11/optimize-sharing-alerts-export-ui.spec.js +198 -0
  135. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-audit-log.spec.d.ts +1 -0
  136. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-audit-log.spec.js +146 -0
  137. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-call-tools.spec.d.ts +1 -0
  138. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-call-tools.spec.js +208 -0
  139. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-e2e-flow.spec.d.ts +1 -0
  140. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-e2e-flow.spec.js +151 -0
  141. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-list-tools.spec.d.ts +1 -0
  142. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-list-tools.spec.js +242 -0
  143. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.d.ts +1 -0
  144. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.js +75 -0
  145. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-incident-tools.spec.d.ts +1 -0
  146. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-incident-tools.spec.js +123 -0
  147. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.d.ts +1 -0
  148. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.js +151 -0
  149. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-variable-tools.spec.d.ts +1 -0
  150. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-variable-tools.spec.js +123 -0
  151. package/dist/tests/8.11/play.spec.d.ts +1 -0
  152. package/dist/tests/8.11/play.spec.js +93 -0
  153. package/dist/tests/8.11/rba-enabled-v2-user-flows.spec.d.ts +1 -0
  154. package/dist/tests/8.11/rba-enabled-v2-user-flows.spec.js +495 -0
  155. package/dist/tests/8.11/saas-migration-path-user-flows.spec.d.ts +1 -0
  156. package/dist/tests/8.11/saas-migration-path-user-flows.spec.js +133 -0
  157. package/dist/tests/8.11/smoke-tests.spec.d.ts +1 -0
  158. package/dist/tests/8.11/smoke-tests.spec.js +339 -0
  159. package/dist/tests/8.11/test-setup.spec.d.ts +1 -0
  160. package/dist/tests/8.11/test-setup.spec.js +256 -0
  161. package/dist/tests/8.11/web-modeler-user-flows.spec.d.ts +1 -0
  162. package/dist/tests/8.11/web-modeler-user-flows.spec.js +523 -0
  163. package/dist/utils/clusterVersions.d.ts +2 -1
  164. package/dist/utils/clusterVersions.js +1 -0
  165. package/dist/utils/consoleApiHelpers.js +1 -0
  166. package/package.json +1 -1
  167. package/playwright.config.ts +10 -0
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskPanelPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const sleep_1 = require("../../utils/sleep");
6
+ const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
7
+ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
8
+ class TaskPanelPage {
9
+ page;
10
+ availableTasks;
11
+ filterPanelExpandButton;
12
+ filterPanelCollapseButton;
13
+ filterSelectButton;
14
+ taskListPageBanner;
15
+ processesPageTab;
16
+ tasksTab;
17
+ noPermissionsMessage;
18
+ processesInfoText;
19
+ constructor(page) {
20
+ this.page = page;
21
+ this.availableTasks = page.getByTitle('Available tasks');
22
+ // 8.10 still serves Tasklist on the Carbon shell, so filtering lives in
23
+ // the collapsible filter panel: the collapsed rail carries the expand
24
+ // control (aria-controls="task-nav-bar") and the expanded nav lists each
25
+ // filter as a link. Tasklist's design-system redesign -- a single
26
+ // "Filters" dropdown trigger opening a Radix menu -- landed on main
27
+ // (8.11) only: `stable/8.10` has no FilterSelect.tsx and its Filters.tsx
28
+ // still renders the Carbon panel against the /_carbon route tree, which
29
+ // is why targeting the redesign found no "Filters" button at all.
30
+ // Both shells are matched below because the SaaS design-system rollout is
31
+ // per app and still in flight (Admin has already flipped, hence the
32
+ // dual-shell locators in OCIdentityHomePage).
33
+ this.filterPanelExpandButton = page.locator('button[aria-controls="task-nav-bar"][aria-expanded="false"]');
34
+ this.filterPanelCollapseButton = page.locator('button[aria-controls="task-nav-bar"][aria-expanded="true"]');
35
+ this.filterSelectButton = page.getByRole('button', {
36
+ name: 'Filters',
37
+ exact: true,
38
+ });
39
+ // The header logo's accessible name is now just "Camunda logo" -- the
40
+ // per-app suffix ("Camunda logo Tasklist") was dropped when Tasklist's
41
+ // header moved off the old Carbon shell (matches the already-corrected
42
+ // locator in camunda/camunda's own qa/c8-orchestration-cluster-e2e-test-suite).
43
+ this.taskListPageBanner = page.getByRole('link', {
44
+ name: 'Camunda logo',
45
+ });
46
+ this.processesPageTab = page.getByRole('link', { name: 'Processes' });
47
+ this.tasksTab = page.getByRole('link', { name: 'Tasks' });
48
+ this.noPermissionsMessage = page.getByText('You don’t have access to this component');
49
+ this.processesInfoText = page.getByText('Browse and run processes published by your organization');
50
+ }
51
+ // Tasklist's importer can lag well behind Zeebe under heavy concurrent load
52
+ // from the sibling chromium-v1/chromium-v2 projects sharing one cluster --
53
+ // trace evidence from failing runs showed a smoke-test user task still
54
+ // absent from "Available tasks" more than 5 minutes after the instance was
55
+ // already ACTIVE in Operate. The budget is therefore generous, but it is a
56
+ // *total* deadline rather than a fixed attempt count: an attempt count
57
+ // multiplies with any outer retry loop (`completeTaskWithRetry` re-enters
58
+ // this method 3 times), which gave one step a worst case larger than the
59
+ // whole test timeout, so a lagging importer killed the test on the harness
60
+ // clock instead of failing here with a usable error.
61
+ // The row for a named task inside the task list. Exposed so callers that
62
+ // assert on the details panel can re-select the row when a click did not
63
+ // take effect, rather than re-deriving the locator.
64
+ taskInList(name) {
65
+ return this.availableTasks.getByText(name, { exact: true }).first();
66
+ }
67
+ async openTask(name, totalTimeout = 1200000) {
68
+ const deadline = Date.now() + totalTimeout;
69
+ let lastError;
70
+ while (Date.now() < deadline) {
71
+ try {
72
+ const task = this.taskInList(name);
73
+ await task.waitFor({
74
+ state: 'visible',
75
+ // Clamped away from 0: Playwright reads `timeout: 0` as "no timeout".
76
+ timeout: Math.max(1000, Math.min(120000, deadline - Date.now())),
77
+ });
78
+ await task.click({ timeout: 120000 });
79
+ return;
80
+ }
81
+ catch (error) {
82
+ lastError = error;
83
+ if (Date.now() >= deadline) {
84
+ break;
85
+ }
86
+ await this.page.reload();
87
+ // Tasklist polls continuously for new tasks, so `networkidle` never
88
+ // fires and the wait times out at 60s -- burning the retry budget
89
+ // without ever re-attempting the task click. `domcontentloaded`
90
+ // resolves once the reloaded HTML has parsed, which is the actual
91
+ // signal we need before trying to find the task again.
92
+ await this.page.waitForLoadState('domcontentloaded', { timeout: 60000 });
93
+ }
94
+ }
95
+ throw new Error(`Task ${name} did not open from "Available tasks" within ` +
96
+ `${totalTimeout}ms: ${lastError}`);
97
+ }
98
+ async filterBy(option) {
99
+ // The filter is a link in the Carbon panel's expanded nav and a
100
+ // role="menuitem" in the redesigned dropdown, so match either. The
101
+ // Carbon links are scoped to #task-nav-bar so "Completed" cannot pick up
102
+ // a custom filter or a task row carrying the same words.
103
+ const filterOption = this.page
104
+ .locator('#task-nav-bar')
105
+ .getByRole('link', { name: option, exact: true })
106
+ .or(this.page.getByRole('menuitem', { name: option, exact: true }));
107
+ const maxAttempts = 3;
108
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
109
+ await this.openFilterControls();
110
+ // Only the first attempt waits out a slow first render; later attempts
111
+ // pick from controls that have already rendered once, so three
112
+ // attempts at the full budget cannot outlast the test timeout.
113
+ const renderTimeout = attempt === 1 ? 60000 : 15000;
114
+ await (0, test_1.expect)(filterOption).toBeVisible({ timeout: renderTimeout });
115
+ await filterOption.click({ timeout: renderTimeout });
116
+ // The route -- not the panel -- is what proves the pick landed.
117
+ // Tasklist refetches the list every 5s behind a suspense boundary, and
118
+ // a poll landing on the click tears the controls down before the
119
+ // router navigates: they close but the filter never changes, and
120
+ // nothing downstream notices until a much later assertion reads the
121
+ // still-unfiltered list.
122
+ // Only a timeout means "the pick did not land", which is what the
123
+ // retry below is for. Anything else -- a closed page, a failed
124
+ // navigation -- is fatal, and swallowing it would surface three
125
+ // attempts later as the misleading "filter was not applied" error
126
+ // instead of its real cause.
127
+ let applied = true;
128
+ try {
129
+ await this.page.waitForURL(TaskPanelPage.appliedFilter(option), {
130
+ timeout: 15000,
131
+ });
132
+ }
133
+ catch (error) {
134
+ if (!(error instanceof test_1.errors.TimeoutError)) {
135
+ throw error;
136
+ }
137
+ applied = false;
138
+ }
139
+ if (applied) {
140
+ await this.collapseFilterPanel();
141
+ return;
142
+ }
143
+ console.warn(`Attempt ${attempt} to apply the "${option}" task filter did not ` +
144
+ 'take effect. Retrying...');
145
+ await this.page.keyboard.press('Escape');
146
+ }
147
+ throw new Error(`Task filter "${option}" was not applied after ${maxAttempts} attempts`);
148
+ }
149
+ // The Carbon panel renders either the collapsed rail (which carries the
150
+ // expand control) or the expanded nav -- never both -- and picking a filter
151
+ // leaves it expanded, so a retry must not click "expand" a second time. The
152
+ // redesigned dropdown instead has to be re-opened every attempt, because
153
+ // picking an option closes the menu.
154
+ async openFilterControls() {
155
+ const alreadyExpanded = await this.filterPanelCollapseButton
156
+ .waitFor({ state: 'visible', timeout: 2000 })
157
+ .then(() => true)
158
+ .catch(() => false);
159
+ if (alreadyExpanded) {
160
+ return;
161
+ }
162
+ await this.filterPanelExpandButton
163
+ .or(this.filterSelectButton)
164
+ .first()
165
+ .click({ timeout: 60000 });
166
+ }
167
+ // Picking a filter leaves the Carbon panel expanded, and it floats over the
168
+ // task list -- callers that go straight to a task row would be clicking
169
+ // through the overlay (pages/SM-8.10 collapses it from the specs for the
170
+ // same reason). The redesigned dropdown closes itself on select, so this is
171
+ // a probe rather than an unconditional click.
172
+ async collapseFilterPanel() {
173
+ const expanded = await this.filterPanelCollapseButton
174
+ .waitFor({ state: 'visible', timeout: 2000 })
175
+ .then(() => true)
176
+ .catch(() => false);
177
+ if (expanded) {
178
+ await this.filterPanelCollapseButton.click({ timeout: 30000 });
179
+ }
180
+ }
181
+ // Tasklist keeps the active filter in the `filter` search param, on both
182
+ // shells. "All open tasks" is the route default and is stripped from the
183
+ // URL, so it is asserted as the absence of the param.
184
+ static appliedFilter(option) {
185
+ const filterParam = {
186
+ Unassigned: 'unassigned',
187
+ 'Assigned to me': 'assigned-to-me',
188
+ Completed: 'completed',
189
+ };
190
+ const param = filterParam[option] ?? null;
191
+ return (url) => url.searchParams.get('filter') === param;
192
+ }
193
+ // `expectedCount` turns the single fixed-delay sample into a poll. Tasklist
194
+ // only lists a task once the exporter has indexed the instance, and on these
195
+ // long-lived SaaS RBA clusters that routinely lags past the 20s wait -- the
196
+ // count then comes back one short and the caller's `toBe(before + 1)` fails
197
+ // on a task that does arrive moments later. Callers that have no expectation
198
+ // yet (the baseline read taken before starting a process) still get the
199
+ // fixed wait. The count returned is always the real one, so a task that
200
+ // genuinely never appears still fails the caller's assertion.
201
+ async taskCount(name, expectedCount) {
202
+ const tasks = this.availableTasks.getByText(name, { exact: true });
203
+ if (expectedCount === undefined) {
204
+ await (0, sleep_1.sleep)(20000);
205
+ return tasks.count();
206
+ }
207
+ // Re-reading the same rendered list only finds the new task if the panel
208
+ // refetches while we wait, and the sample that failed sat on 1 of an
209
+ // expected 2 for the whole budget -- the instance was started, the
210
+ // exporter published its task afterwards, and the view never asked again.
211
+ // Reload between samples so each one is an actual query rather than a
212
+ // re-count of the DOM we already had. The count returned is still the
213
+ // real one, so a task that genuinely never arrives still fails the
214
+ // caller's assertion.
215
+ const deadline = Date.now() + 180000;
216
+ let count = await tasks.count();
217
+ while (count !== expectedCount && Date.now() < deadline) {
218
+ await (0, sleep_1.sleep)(5000);
219
+ await this.page.reload();
220
+ await (0, test_1.expect)(this.availableTasks).toBeVisible({ timeout: 60000 });
221
+ count = await tasks.count();
222
+ }
223
+ return count;
224
+ }
225
+ async clickTasksTab() {
226
+ await (0, test_1.expect)(this.tasksTab).toBeVisible({ timeout: 60000 });
227
+ await this.tasksTab.click({ timeout: 60000 });
228
+ }
229
+ async scrollToLastTask(name) {
230
+ await this.page.getByText(name).last().scrollIntoViewIfNeeded();
231
+ }
232
+ async scrollToFirstTask(name) {
233
+ await this.page.getByText(name).first().scrollIntoViewIfNeeded();
234
+ }
235
+ async clickProcessesTab() {
236
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.processesPageTab);
237
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.processesInfoText, {
238
+ preAction: async () => {
239
+ await (0, test_1.expect)(this.processesPageTab).toBeVisible({ timeout: 10000 });
240
+ await this.processesPageTab.click({ timeout: 10000 });
241
+ },
242
+ });
243
+ }
244
+ }
245
+ exports.TaskPanelPage = TaskPanelPage;
@@ -0,0 +1,18 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class TaskProcessesPage {
3
+ private page;
4
+ readonly popupContinueButton: Locator;
5
+ readonly popup: Locator;
6
+ readonly processes: Locator;
7
+ readonly availableTasks: Locator;
8
+ readonly waitingForTasksText: Locator;
9
+ readonly searchProcessesSearchbox: Locator;
10
+ readonly processesTab: Locator;
11
+ readonly tasksTab: Locator;
12
+ constructor(page: Page);
13
+ searchForProcess(name: string): Promise<void>;
14
+ clickpopupContinueButton(): Promise<void>;
15
+ private openTasksView;
16
+ startProcess(name: string): Promise<void>;
17
+ }
18
+ export { TaskProcessesPage };
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskProcessesPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
6
+ const expectTextWithPagination_1 = require("../../utils/assertionHelpers/expectTextWithPagination");
7
+ class TaskProcessesPage {
8
+ page;
9
+ popupContinueButton;
10
+ popup;
11
+ processes;
12
+ availableTasks;
13
+ waitingForTasksText;
14
+ searchProcessesSearchbox;
15
+ processesTab;
16
+ tasksTab;
17
+ constructor(page) {
18
+ this.page = page;
19
+ this.popupContinueButton = page.getByRole('button', { name: 'Continue' });
20
+ this.popup = page.getByLabel('Start your process on demand');
21
+ this.processes = page.locator('[data-testid="process-tile"]');
22
+ this.availableTasks = page.getByTitle('Available tasks').first();
23
+ this.waitingForTasksText = this.page.getByText('Waiting for tasks...');
24
+ this.searchProcessesSearchbox = page.getByRole('searchbox', {
25
+ name: 'Search processes',
26
+ });
27
+ this.processesTab = page.getByRole('link', { name: 'Processes' });
28
+ this.tasksTab = page.getByRole('link', { name: 'Tasks' });
29
+ }
30
+ // Tasklist's process list is an infinite list that asks for only 12 process
31
+ // definitions at a time (`PROCESS_DEFINITIONS_PAGE_SIZE` in the
32
+ // orchestration-cluster webapp) and reveals the rest behind "Load more".
33
+ // The RBA clusters these flows run against are long-lived and gain two more
34
+ // definitions every night, so the one deployed seconds ago sits at the far
35
+ // end of that list: walking to it costs a round trip per 12 entries and the
36
+ // assertion's budget runs out first, which is why raising the retry count
37
+ // never made a difference. Filter the list instead -- the field is sent as
38
+ // `processDefinitionId: {$like: *name*}`, so the process comes back on the
39
+ // first page and the assertion is about the process rather than about how
40
+ // far pagination got. The filter lives in the URL query, so it survives the
41
+ // reloads the retry helpers do between attempts.
42
+ async searchForProcess(name) {
43
+ const maxAttempts = 3;
44
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
45
+ try {
46
+ await (0, test_1.expect)(this.searchProcessesSearchbox).toBeVisible({
47
+ timeout: 60000,
48
+ });
49
+ await this.searchProcessesSearchbox.fill(name, { timeout: 30000 });
50
+ await (0, test_1.expect)(this.searchProcessesSearchbox).toHaveValue(name, {
51
+ timeout: 30000,
52
+ });
53
+ return;
54
+ }
55
+ catch (error) {
56
+ if (attempt === maxAttempts) {
57
+ throw error;
58
+ }
59
+ // Tasklist sends the tab back to Tasks whenever a new task arrives,
60
+ // which can happen at any point here -- the Processes view, and with
61
+ // it this searchbox, is then simply gone. Re-open Processes and try
62
+ // again rather than trusting we are still on it.
63
+ console.warn(`Attempt ${attempt} failed to filter the process list; ` +
64
+ 're-opening the Processes tab and retrying.');
65
+ await this.processesTab.click({ timeout: 60000 });
66
+ }
67
+ }
68
+ }
69
+ async clickpopupContinueButton() {
70
+ await this.page.waitForTimeout(3000);
71
+ if ((await this.popupContinueButton.count()) > 0) {
72
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.popupContinueButton);
73
+ }
74
+ await (0, test_1.expect)(this.popup.first()).not.toBeVisible({ timeout: 10000 });
75
+ }
76
+ // Starting a process only lands on the Tasks view when Tasklist manages to
77
+ // resolve the new instance's user task in time. `startProcessMachine.ts` in
78
+ // camunda/camunda's orchestration-cluster webapp polls
79
+ // `queryUserTasks({processInstanceKey})` every second under a hard
80
+ // `TASKS_TIMEOUT: 15000`; when that elapses the machine goes straight to
81
+ // `Succeeded` and performs no navigation at all, leaving the browser on the
82
+ // Processes page -- which never renders the "Available tasks" panel. On
83
+ // these long-lived SaaS RBA clusters the exporter routinely lags past 15s,
84
+ // so waiting 90s for a redirect the product gave up on after 15 can only
85
+ // time out. Open the Tasks view ourselves when the redirect did not happen;
86
+ // the panel still has to appear, which is what this asserts, and the task
87
+ // count the caller then takes is what the test is actually about.
88
+ async openTasksView() {
89
+ const redirected = await this.availableTasks
90
+ .waitFor({ state: 'visible', timeout: 30000 })
91
+ .then(() => true)
92
+ .catch(() => false);
93
+ if (!redirected) {
94
+ await this.tasksTab.click({ timeout: 60000 });
95
+ }
96
+ await (0, test_1.expect)(this.availableTasks).toBeVisible({ timeout: 90000 });
97
+ }
98
+ async startProcess(name) {
99
+ if (process.env.TASKLIST_VERSION === 'v2') {
100
+ await this.searchForProcess(name);
101
+ await (0, expectTextWithPagination_1.expectTextWithPagination)(this.page, name);
102
+ const container = this.page
103
+ .locator('div')
104
+ .filter({
105
+ hasText: new RegExp(`^${name}.*Start process$`),
106
+ })
107
+ .nth(1);
108
+ await container
109
+ .getByRole('button', { name: 'Start process', exact: true })
110
+ .first()
111
+ .click({ timeout: 60000 });
112
+ await (0, test_1.expect)(this.waitingForTasksText).not.toBeVisible({
113
+ timeout: 60000,
114
+ });
115
+ await this.openTasksView();
116
+ }
117
+ else if (process.env.TASKLIST_VERSION === 'v1') {
118
+ const processStartButton = this.processes
119
+ .filter({ hasText: name })
120
+ .nth(0)
121
+ .getByRole('button', { name: 'Start process' });
122
+ await (0, test_1.expect)(processStartButton).toBeVisible({ timeout: 30000 });
123
+ await processStartButton.click();
124
+ await (0, test_1.expect)(this.waitingForTasksText).not.toBeVisible({
125
+ timeout: 60000,
126
+ });
127
+ await this.openTasksView();
128
+ }
129
+ else {
130
+ throw new Error(`Unknown TASKLIST_VERSION: ${process.env.TASKLIST_VERSION}`);
131
+ }
132
+ }
133
+ }
134
+ exports.TaskProcessesPage = TaskProcessesPage;
@@ -0,0 +1,56 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ import { ModelerCreatePage } from './ModelerCreatePage';
3
+ import { ModelerHomePage } from './ModelerHomePage';
4
+ import { HomePage } from './HomePage';
5
+ import { ClusterPage } from './ClusterPage';
6
+ import { ClusterDetailsPage } from './ClusterDetailsPage';
7
+ import { AppsPage } from './AppsPage';
8
+ import { TaskPanelPage } from './TaskPanelPage';
9
+ import { TaskDetailsPage } from './TaskDetailsPage';
10
+ import { ConsoleOrganizationPage } from './ConsoleOrganizationPage';
11
+ import { OperateProcessInstancePage } from './OperateProcessInstancePage';
12
+ import { ConnectorSettingsPage } from './ConnectorSettingsPage';
13
+ import { LoginPage } from './LoginPage';
14
+ import { ConnectorMarketplacePage } from './ConnectorMarketplacePage';
15
+ import { ConnectorTemplatePage } from './ConnectorTemplatePage';
16
+ import { MailSlurp } from 'mailslurp-client';
17
+ export declare function loginWithRetry(page: Page, loginPage: LoginPage, testUser: {
18
+ username: string;
19
+ password: string;
20
+ }, timeout: number, maxRetries?: number): Promise<void>;
21
+ export declare function isSignedOut(page: Page): boolean;
22
+ export declare function withSessionRecovery(page: Page, loginPage: LoginPage, appsPage: AppsPage, modelerBanner: Locator, testUser: {
23
+ username: string;
24
+ password: string;
25
+ }, loginStagger: number, action: () => Promise<void>, maxRecoveries?: number): Promise<void>;
26
+ export declare function modelDiagramFromFile(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, fileName?: string, nrOfRenamedUserTasks?: number, taskName?: string): Promise<void>;
27
+ export declare function modelRestConnector(modelerCreatePage: ModelerCreatePage, connectorSettingsPage: ConnectorSettingsPage, processName: string, url: string, auth: string, resultExpression: string, resultVariable?: string, basicAuthCredentials?: {
28
+ username: string;
29
+ password: string;
30
+ }): Promise<void>;
31
+ export declare function assertLocatorVisibleWithRetry(page: Page | OperateProcessInstancePage | ModelerHomePage, locator: Locator, text: string, timeout?: number, notVisible?: boolean, maxRetries?: number, clickLocator?: Locator): Promise<void>;
32
+ export declare function openAppTabWithRetry(page: Page, link: Locator, timeout?: number, maxRetries?: number, clickTimeout?: number): Promise<Page>;
33
+ export declare function assertPageTextWithRetry(page: Page, text: string, notVisible?: boolean, timeout?: number, maxRetries?: number): Promise<void>;
34
+ export declare function completeTaskWithRetry(taskPanelPage: TaskPanelPage, taskDetailsPage: TaskDetailsPage, taskName: string, taskPriority: string, maxRetries?: number, totalTimeout?: number): Promise<void>;
35
+ export declare function runProcess(clusterName: string, page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, processId?: string, uploadFromFile?: string): Promise<void>;
36
+ export declare function runMultipleProcesses(clusterName: string, page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, options?: {
37
+ numberOfProcesses?: number;
38
+ processName?: string;
39
+ uploadFromFile?: string;
40
+ }): Promise<void>;
41
+ export declare function consoleSessionRecovery(page: Page, clusterUrl: string): () => Promise<void>;
42
+ export declare function goBackWithRetry(page: Page, maxRetries?: number): Promise<void>;
43
+ export declare function disableRBA(clusterName: string, homePage: HomePage, clusterPage: ClusterPage, clusterDetailsPage: ClusterDetailsPage, appsPage: AppsPage): Promise<void>;
44
+ export declare function enableAuthorizations(clusterName: string, homePage: HomePage, clusterPage: ClusterPage, clusterDetailsPage: ClusterDetailsPage, appsPage: AppsPage): Promise<void>;
45
+ export declare function clickInvitationLinkInEmail(page: Page, id: string): Promise<void>;
46
+ export declare function assertLatestAlertEmail(id: string, mailSlurp: MailSlurp, processName: string, alertText: string): Promise<string>;
47
+ export declare function assertTestUsesCorrectOrganization(page: Page): Promise<void>;
48
+ export declare function deleteAllUserGroups(homePage: HomePage, organizationPage: ConsoleOrganizationPage, appsPage: AppsPage): Promise<void>;
49
+ export declare function deleteCluster(clusterName: string, homePage: HomePage, clusterPage: ClusterPage, appsPage: AppsPage): Promise<void>;
50
+ export declare function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, clusterName: string, zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string): Promise<void>;
51
+ export declare function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, clusterName: string, connectorTemplatePage: ConnectorTemplatePage): Promise<void>;
52
+ export declare function createAPIClient(apiClientName: string, homePage: HomePage, clusterDetailsPage: ClusterDetailsPage, clusterName: string, clusterPage: ClusterPage): Promise<void>;
53
+ export declare function ensureDefaultClusterApiCredentials(apiClientName: string, homePage: HomePage, clusterDetailsPage: ClusterDetailsPage, clusterName: string, clusterPage: ClusterPage): Promise<void>;
54
+ export declare function expectCountToBeOneOf(locator: Locator, count1: number, count2: number): Promise<void>;
55
+ export declare function assertTestUsesCorrectOrganizationFromModeler(page: Page): Promise<void>;
56
+ export declare function waitForLoadingToFinish(page: Page, timeout?: number): Promise<void>;