@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,49 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class OptimizeReportPage {
3
+ private page;
4
+ readonly processSelectionButton: Locator;
5
+ readonly userTaskProcess: Locator;
6
+ readonly versionSelection: Locator;
7
+ readonly alwaysDisplayLatestSelection: Locator;
8
+ readonly createReportLink: Locator;
9
+ readonly durationButton: Locator;
10
+ readonly countOption: Locator;
11
+ readonly processInstanceButton: Locator;
12
+ readonly userTaskOption: Locator;
13
+ readonly heatMapButton: Locator;
14
+ readonly numberButton: Locator;
15
+ readonly tableOption: Locator;
16
+ readonly reportName: Locator;
17
+ readonly saveButton: Locator;
18
+ readonly oneUserTaskInstance: Locator;
19
+ readonly twoUserTaskInstance: Locator;
20
+ readonly cancelButton: Locator;
21
+ readonly createNewButton: Locator;
22
+ readonly reportOption: Locator;
23
+ readonly processInstanceCount: Locator;
24
+ readonly blankReportButton: Locator;
25
+ readonly selectDropdown: Locator;
26
+ constructor(page: Page);
27
+ clickProcessSelectionButton(): Promise<void>;
28
+ clickUserTaskProcess(processName: string): Promise<void>;
29
+ clickVersionSelection(): Promise<void>;
30
+ clickAlwaysDisplayLatestSelection(): Promise<void>;
31
+ clickCreateReportLink(): Promise<void>;
32
+ clickDurationButton(): Promise<void>;
33
+ clickCountOption(): Promise<void>;
34
+ clickProcessInstanceButton(): Promise<void>;
35
+ clickUserTaskOption(): Promise<void>;
36
+ clickHeatMapButton(): Promise<void>;
37
+ clickNumberButton(): Promise<void>;
38
+ clickTableOption(): Promise<void>;
39
+ clickReportName(): Promise<void>;
40
+ clearReportName(): Promise<void>;
41
+ fillReportName(name: string): Promise<void>;
42
+ clickSaveButton(): Promise<void>;
43
+ assertUserTaskInstanceCountWithRetry(expectedCount: number, tab: Page, maxRetries?: number, timeout?: number): Promise<void>;
44
+ waitUntilLocatorIsVisible(locator: Locator, tab: Page): Promise<void>;
45
+ waitUntilProcessIsVisible(locator: Locator, tab: Page): Promise<void>;
46
+ clickBlankReportButton(): Promise<void>;
47
+ clickSelectDropdown(): Promise<void>;
48
+ }
49
+ export { OptimizeReportPage };
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OptimizeReportPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ class OptimizeReportPage {
6
+ page;
7
+ processSelectionButton;
8
+ userTaskProcess;
9
+ versionSelection;
10
+ alwaysDisplayLatestSelection;
11
+ createReportLink;
12
+ durationButton;
13
+ countOption;
14
+ processInstanceButton;
15
+ userTaskOption;
16
+ heatMapButton;
17
+ numberButton;
18
+ tableOption;
19
+ reportName;
20
+ saveButton;
21
+ oneUserTaskInstance;
22
+ twoUserTaskInstance;
23
+ cancelButton;
24
+ createNewButton;
25
+ reportOption;
26
+ processInstanceCount;
27
+ blankReportButton;
28
+ selectDropdown;
29
+ constructor(page) {
30
+ this.page = page;
31
+ this.processSelectionButton = page.getByPlaceholder('Select...');
32
+ this.userTaskProcess = page
33
+ .getByText('User_Task_Process', { exact: true })
34
+ .first();
35
+ this.versionSelection = page.getByLabel('Version');
36
+ this.alwaysDisplayLatestSelection = page.getByText('Always display latest');
37
+ this.createReportLink = page.getByRole('link', { name: 'Create Report' });
38
+ this.durationButton = page.getByRole('button', { name: 'Duration' });
39
+ this.countOption = page.getByText('Count').first();
40
+ this.processInstanceButton = page.getByRole('button', {
41
+ name: 'Process Instance',
42
+ exact: true,
43
+ });
44
+ this.userTaskOption = page.getByRole('menuitemcheckbox', {
45
+ name: 'User Task',
46
+ });
47
+ this.heatMapButton = page.getByRole('button', { name: 'Heatmap Open menu' });
48
+ this.numberButton = page.getByRole('menuitemcheckbox', { name: 'Number' });
49
+ this.tableOption = page.getByRole('menuitemcheckbox', { name: 'Table' });
50
+ this.reportName = page.getByPlaceholder('Report name');
51
+ this.saveButton = page.getByRole('button', { name: 'Save' });
52
+ this.oneUserTaskInstance = page.getByRole('cell', { name: '1', exact: true });
53
+ this.twoUserTaskInstance = page.getByRole('cell', { name: '2', exact: true });
54
+ this.cancelButton = page.getByRole('button', { name: 'Cancel' });
55
+ this.createNewButton = page.getByRole('button', {
56
+ name: 'Create New',
57
+ exact: true,
58
+ });
59
+ this.reportOption = page.getByText('Report', { exact: true });
60
+ this.processInstanceCount = page.locator('.progressLabel');
61
+ this.blankReportButton = page.getByRole('button', { name: 'Blank report' });
62
+ this.selectDropdown = page
63
+ .getByRole('button', { name: 'Select... Open menu' })
64
+ .last();
65
+ }
66
+ async clickProcessSelectionButton() {
67
+ await this.processSelectionButton.click();
68
+ }
69
+ async clickUserTaskProcess(processName) {
70
+ await this.page
71
+ .getByText(processName, { exact: true })
72
+ .first()
73
+ .click({ timeout: 90000 });
74
+ }
75
+ async clickVersionSelection() {
76
+ await this.versionSelection.click();
77
+ }
78
+ async clickAlwaysDisplayLatestSelection() {
79
+ await this.alwaysDisplayLatestSelection.click();
80
+ }
81
+ async clickCreateReportLink() {
82
+ await this.createReportLink.click({ timeout: 60000 });
83
+ }
84
+ async clickDurationButton() {
85
+ await this.durationButton.click();
86
+ }
87
+ async clickCountOption() {
88
+ await this.countOption.click();
89
+ }
90
+ async clickProcessInstanceButton() {
91
+ await this.processInstanceButton.click();
92
+ }
93
+ async clickUserTaskOption() {
94
+ await this.userTaskOption.click({ timeout: 60000 });
95
+ }
96
+ async clickHeatMapButton() {
97
+ if (await this.heatMapButton.isVisible()) {
98
+ await this.heatMapButton.click({ timeout: 60000 });
99
+ }
100
+ }
101
+ async clickNumberButton() {
102
+ if (await this.numberButton.isVisible()) {
103
+ await this.numberButton.click();
104
+ }
105
+ }
106
+ async clickTableOption() {
107
+ await this.tableOption.click();
108
+ }
109
+ async clickReportName() {
110
+ await this.reportName.click();
111
+ }
112
+ async clearReportName() {
113
+ await this.reportName.clear({ force: true });
114
+ }
115
+ async fillReportName(name) {
116
+ await this.reportName.fill(name, { force: true });
117
+ }
118
+ async clickSaveButton() {
119
+ await this.saveButton.click();
120
+ }
121
+ // Optimize imports user-task *instance* data on a later cycle than the
122
+ // process definition, so a report saved right after the definition lands can
123
+ // render with a table that is still empty or only partly filled. Poll the
124
+ // expected row count across reloads instead of probing visibility once and
125
+ // then asserting the count against whatever the first render contained --
126
+ // that ordering reports `toHaveCount` received 0 while the import is simply
127
+ // still in flight.
128
+ async assertUserTaskInstanceCountWithRetry(expectedCount, tab, maxRetries = 4, timeout = 60000) {
129
+ for (let attempt = 0; attempt < maxRetries; attempt++) {
130
+ try {
131
+ await (0, test_1.expect)(this.oneUserTaskInstance).toHaveCount(expectedCount, {
132
+ timeout: timeout,
133
+ });
134
+ return;
135
+ }
136
+ catch (error) {
137
+ if (attempt === maxRetries - 1) {
138
+ throw error;
139
+ }
140
+ await tab.reload();
141
+ await tab.waitForLoadState('domcontentloaded');
142
+ }
143
+ }
144
+ }
145
+ async waitUntilLocatorIsVisible(locator, tab) {
146
+ let elapsedTime = 0;
147
+ const maxWaitTimeSeconds = 120000;
148
+ while (elapsedTime < maxWaitTimeSeconds) {
149
+ const element = await locator;
150
+ if (await element.isVisible()) {
151
+ return;
152
+ }
153
+ await tab.reload();
154
+ await tab.waitForTimeout(10 * 1000);
155
+ // Update the elapsed time
156
+ elapsedTime += 10000;
157
+ }
158
+ }
159
+ async waitUntilProcessIsVisible(locator, tab) {
160
+ let elapsedTime = 0;
161
+ const maxWaitTimeSeconds = 240000;
162
+ while (elapsedTime < maxWaitTimeSeconds) {
163
+ const element = await locator;
164
+ if (await element.isVisible()) {
165
+ return;
166
+ }
167
+ await this.cancelButton.click();
168
+ await tab.reload();
169
+ await tab.waitForTimeout(10 * 1000);
170
+ // Update the elapsed time
171
+ elapsedTime += 10000;
172
+ await this.createNewButton.click();
173
+ await this.reportOption.click();
174
+ await this.processSelectionButton.click();
175
+ }
176
+ }
177
+ async clickBlankReportButton() {
178
+ await this.blankReportButton.click();
179
+ }
180
+ async clickSelectDropdown() {
181
+ await this.selectDropdown.click();
182
+ }
183
+ }
184
+ exports.OptimizeReportPage = OptimizeReportPage;
@@ -0,0 +1,16 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class OptimizeSharePage {
3
+ private page;
4
+ readonly shareButton: Locator;
5
+ readonly enableSharingToggle: Locator;
6
+ readonly sharingToggleLabel: Locator;
7
+ readonly shareLinkInput: Locator;
8
+ readonly downloadButton: Locator;
9
+ constructor(page: Page);
10
+ openEntityById(baseUrl: string, entityType: 'report' | 'dashboard', entityId: string): Promise<void>;
11
+ enableSharing(): Promise<void>;
12
+ assertShareLinkVisible(): Promise<void>;
13
+ disableSharing(): Promise<void>;
14
+ assertDownloadOptionAvailable(): Promise<void>;
15
+ }
16
+ export { OptimizeSharePage };
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OptimizeSharePage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ class OptimizeSharePage {
6
+ page;
7
+ shareButton;
8
+ enableSharingToggle;
9
+ sharingToggleLabel;
10
+ shareLinkInput;
11
+ downloadButton;
12
+ constructor(page) {
13
+ this.page = page;
14
+ this.shareButton = page
15
+ .locator('.share-button button')
16
+ .or(page.getByRole('button', { name: /share/i }))
17
+ .first();
18
+ this.enableSharingToggle = page
19
+ .locator('#sharingToggle')
20
+ .or(page.locator('.ShareEntity .cds--toggle__switch'))
21
+ .or(page.getByRole('switch'))
22
+ .first();
23
+ // Carbon's toggle overlays the <button role="switch"> with a <label> whose
24
+ // text/appearance intercepts pointer events, so clicking the switch button
25
+ // directly times out. The label (`for="sharingToggle"`) is the real click
26
+ // target that flips the toggle.
27
+ this.sharingToggleLabel = page
28
+ .locator('label[for="sharingToggle"]')
29
+ .or(page.locator('.ShareEntity .cds--toggle__label'))
30
+ .or(page.locator('.ShareEntity .cds--toggle__appearance'))
31
+ .first();
32
+ this.shareLinkInput = page
33
+ .locator('#sharingLinkText')
34
+ .or(page.locator('.ShareEntity input[type="text"]'))
35
+ .or(page.locator('input[value*="/share/"]'))
36
+ .first();
37
+ // Optimize renders the CSV export as a single icon button (DownloadButton)
38
+ // on raw-data reports, not a menu. Its accessible name comes from the
39
+ // `report.downloadCSV` label ("Download CSV").
40
+ this.downloadButton = page
41
+ .getByRole('button', { name: /download|csv/i })
42
+ .or(page.locator('.DownloadButton button'))
43
+ .or(page.locator('a.DownloadButton'))
44
+ .first();
45
+ }
46
+ async openEntityById(baseUrl, entityType, entityId) {
47
+ const url = `${baseUrl}/#/${entityType}/${entityId}`;
48
+ await this.page.goto(url, {
49
+ waitUntil: 'domcontentloaded',
50
+ timeout: 60000,
51
+ });
52
+ // Optimize is a HashRouter single-page app. When the browser is already on
53
+ // an Optimize page (e.g. the home dashboard), a hash-only navigation does
54
+ // not reliably trigger the router to render the target entity view. Force a
55
+ // full document reload at the hash route so the entity (and its
56
+ // always-present Share control) renders from scratch. Use waitFor (which
57
+ // actually polls) rather than isVisible (a one-shot check), reloading only
58
+ // when the Share control still hasn't rendered.
59
+ //
60
+ // A reload is also the recovery path for a second, distinct failure mode:
61
+ // the entity was created moments earlier via the API (in a describe's
62
+ // beforeAll) and Optimize's evaluate endpoint hasn't caught up yet, which
63
+ // renders the "This link is not valid" ErrorPage instead of a loading
64
+ // state -- there is no spinner to wait out, only a fresh navigation
65
+ // re-queries the entity. 5 attempts give that eventual-consistency window
66
+ // more room than 3 did.
67
+ for (let attempt = 0; attempt < 5; attempt++) {
68
+ const shareVisible = await this.shareButton
69
+ .waitFor({ state: 'visible', timeout: 10000 })
70
+ .then(() => true)
71
+ .catch(() => false);
72
+ if (shareVisible) {
73
+ return;
74
+ }
75
+ await this.page.reload({ waitUntil: 'domcontentloaded' });
76
+ }
77
+ await (0, test_1.expect)(this.shareButton).toBeVisible({ timeout: 30000 });
78
+ }
79
+ async enableSharing() {
80
+ await this.shareButton.click({ timeout: 30000 });
81
+ await (0, test_1.expect)(this.enableSharingToggle).toBeVisible({ timeout: 30000 });
82
+ await this.sharingToggleLabel.click({ timeout: 30000 });
83
+ }
84
+ async assertShareLinkVisible() {
85
+ await (0, test_1.expect)(this.shareLinkInput).toBeVisible({ timeout: 30000 });
86
+ // Enabling sharing triggers an async backend call that generates the public
87
+ // share URL; the input is briefly empty until it resolves. toHaveValue
88
+ // auto-retries until the value is populated, avoiding a race with a
89
+ // one-shot value read.
90
+ await (0, test_1.expect)(this.shareLinkInput).toHaveValue(/share/i, { timeout: 30000 });
91
+ }
92
+ async disableSharing() {
93
+ await (0, test_1.expect)(this.enableSharingToggle).toBeVisible({ timeout: 30000 });
94
+ await this.sharingToggleLabel.click({ timeout: 30000 });
95
+ }
96
+ async assertDownloadOptionAvailable() {
97
+ await (0, test_1.expect)(this.downloadButton).toBeVisible({ timeout: 30000 });
98
+ }
99
+ }
100
+ exports.OptimizeSharePage = OptimizeSharePage;
@@ -0,0 +1,17 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class PlayPage {
3
+ private page;
4
+ readonly completeJobButton: Locator;
5
+ readonly configureTestPanel: Locator;
6
+ readonly configureTestPanelStartButton: Locator;
7
+ readonly startInstanceOverlayButton: Locator;
8
+ constructor(page: Page);
9
+ waitForCompleteJobButtonToBeAvailable(): Promise<void>;
10
+ clickCompleteJobButton(): Promise<void>;
11
+ clickStartInstanceButton(): Promise<void>;
12
+ dismissStartModal(): Promise<void>;
13
+ waitForInstanceDetailsToBeLoaded(): Promise<void>;
14
+ waitForNextElementToBeActive(historyItem: string): Promise<void>;
15
+ waitForProcessToBeCompleted(): Promise<void>;
16
+ }
17
+ export { PlayPage };
@@ -0,0 +1,157 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlayPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
6
+ const maxWaitTimeSeconds = 120000;
7
+ class PlayPage {
8
+ page;
9
+ completeJobButton;
10
+ configureTestPanel;
11
+ configureTestPanelStartButton;
12
+ startInstanceOverlayButton;
13
+ constructor(page) {
14
+ this.page = page;
15
+ // Hub's Test Studio renders this control as a button with a
16
+ // "<elementId>-Complete job" test id and no aria-label, so getByLabel()
17
+ // cannot see it; keep getByLabel for the older overlay.
18
+ const diagram = page.getByTestId('diagram');
19
+ this.completeJobButton = diagram
20
+ .getByLabel('Complete job')
21
+ .or(diagram.getByRole('button', { name: 'Complete job' }))
22
+ .or(diagram.getByTestId(/-Complete job$/))
23
+ .first();
24
+ // Newer Modeler Play UI: the "Configure Scenario" floating card hosts a
25
+ // primary "Start" Carbon button (variants: "Start", "Start with
26
+ // variables", "Start with a form"). Source:
27
+ // camunda-hub frontend/packages/modeler/play/src/Definition/
28
+ // ConfigureTestPanel/index.tsx — renders <FloatingCard
29
+ // data-testid="configure-test-panel"> with a <Button> whose visible
30
+ // text starts with "Start".
31
+ this.configureTestPanel = page.getByTestId('configure-test-panel');
32
+ this.configureTestPanelStartButton = this.configureTestPanel.getByRole('button', { name: /^Start( with .*)?$/, exact: false });
33
+ // Legacy bpmn-js canvas overlay button (still emitted by older Modeler
34
+ // builds, also relabeled with cached/example-data suffixes). Kept as a
35
+ // fallback for environments that haven't shipped the ConfigureTestPanel
36
+ // yet.
37
+ this.startInstanceOverlayButton = page
38
+ .getByTestId('diagram')
39
+ .getByLabel('Start instance', { exact: false });
40
+ }
41
+ async waitForCompleteJobButtonToBeAvailable() {
42
+ await (0, test_1.expect)(this.completeJobButton).toBeVisible({
43
+ timeout: maxWaitTimeSeconds,
44
+ });
45
+ // Modeler keeps the overlay mounted but disabled while a previous job
46
+ // action is still in flight or waiting for the polled statistics to catch
47
+ // up (camunda-hub test-studio JobCompleteButton -> useAsyncActionState), so
48
+ // "visible" alone does not mean "ready to click". Wait for enabled too.
49
+ await (0, test_1.expect)(this.completeJobButton).toBeEnabled({
50
+ timeout: maxWaitTimeSeconds,
51
+ });
52
+ }
53
+ async clickCompleteJobButton() {
54
+ // The complete-job action is a bpmn-js canvas overlay pinned to the active
55
+ // element, so it is re-laid-out (and briefly detached) whenever the diagram
56
+ // re-renders -- which it does on every job/instance update arriving from
57
+ // the cluster. A bare click that lands in that window silently resolves
58
+ // against a stale node, the job is never completed, and the failure only
59
+ // surfaces one call later as waitForNextElementToBeActive timing out on the
60
+ // next element that consequently never became active. Retry the click
61
+ // against a fresh visibility + clickability check instead.
62
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.completeJobButton, {
63
+ totalTimeout: maxWaitTimeSeconds,
64
+ visibilityTimeout: 30000,
65
+ maxRetries: 3,
66
+ retryDelayMs: 3000,
67
+ });
68
+ }
69
+ async clickStartInstanceButton() {
70
+ const startTrigger = this.configureTestPanelStartButton
71
+ .or(this.startInstanceOverlayButton)
72
+ .first();
73
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, startTrigger, {
74
+ totalTimeout: maxWaitTimeSeconds,
75
+ visibilityTimeout: 30000,
76
+ maxRetries: 5,
77
+ });
78
+ }
79
+ async dismissStartModal() {
80
+ // The intro dialog cycles labels across Modeler versions/states.
81
+ const buttonVariations = [
82
+ 'Start a process instance',
83
+ 'Start another instance',
84
+ 'Start new instance',
85
+ 'Start instance',
86
+ ];
87
+ for (const buttonName of buttonVariations) {
88
+ const button = this.page.getByRole('button', { name: buttonName });
89
+ if ((await button.count()) > 0) {
90
+ await button.first().click();
91
+ return;
92
+ }
93
+ }
94
+ }
95
+ async waitForInstanceDetailsToBeLoaded() {
96
+ const maxRetries = 2;
97
+ let attempts = 0;
98
+ while (attempts < maxRetries) {
99
+ try {
100
+ await (0, test_1.expect)(this.page.getByText(/process instance key/i)).toBeVisible({
101
+ timeout: maxWaitTimeSeconds,
102
+ });
103
+ await (0, test_1.expect)(this.page.getByText(/This process instance has no variables/i)).toBeVisible({
104
+ timeout: maxWaitTimeSeconds,
105
+ });
106
+ return;
107
+ }
108
+ catch (error) {
109
+ if (attempts >= maxRetries - 1)
110
+ throw error;
111
+ await this.page.reload();
112
+ attempts++;
113
+ }
114
+ }
115
+ }
116
+ async waitForNextElementToBeActive(historyItem) {
117
+ // clickCompleteJobButton now retries a click that *throws*, but a click
118
+ // swallowed by a re-laid-out overlay resolves successfully without
119
+ // completing anything, so the retry helper alone cannot catch it. The only
120
+ // symptom is this locator timing out on an element that never became
121
+ // active -- exactly the nightly failure on 'service-task*'.
122
+ //
123
+ // Once the next element has stayed absent well past any normal Play advance
124
+ // latency AND a complete-job overlay is still sitting enabled on the
125
+ // canvas, the previous click demonstrably did not land, so re-issue it. The
126
+ // grace period matters: it keeps us from completing the job of the very
127
+ // element we are waiting for during the brief window where its overlay has
128
+ // rendered but its history entry has not. The assertion is unchanged --
129
+ // this still only passes on a visible history entry.
130
+ const element = this.page.getByText(new RegExp(`^${historyItem}`, 'i'));
131
+ const recoveryGraceMs = 60000;
132
+ const startedAt = Date.now();
133
+ await (0, test_1.expect)(async () => {
134
+ if (Date.now() - startedAt > recoveryGraceMs) {
135
+ const isPreviousJobStillPending = (await this.completeJobButton.isVisible().catch(() => false)) &&
136
+ (await this.completeJobButton.isEnabled().catch(() => false));
137
+ // Re-check immediately before clicking: if the element became active
138
+ // in the meantime, the pending overlay is its own and must be left
139
+ // alone for the caller's next step.
140
+ if (isPreviousJobStillPending &&
141
+ !(await element.isVisible().catch(() => false))) {
142
+ await this.completeJobButton.click({ timeout: 30000 });
143
+ }
144
+ }
145
+ await (0, test_1.expect)(element).toBeVisible({ timeout: 15000 });
146
+ }).toPass({
147
+ timeout: maxWaitTimeSeconds,
148
+ intervals: [5000, 10000, 15000],
149
+ });
150
+ }
151
+ async waitForProcessToBeCompleted() {
152
+ await (0, test_1.expect)(this.page.getByText('Completed')).toBeVisible({
153
+ timeout: maxWaitTimeSeconds,
154
+ });
155
+ }
156
+ }
157
+ exports.PlayPage = PlayPage;
@@ -0,0 +1,32 @@
1
+ import { Locator, Page } from '@playwright/test';
2
+ declare class ProcessApplicationPage {
3
+ private page;
4
+ readonly createProcessApplicationButton: Locator;
5
+ readonly createProcessApplicationOption: Locator;
6
+ readonly creationDialog: Locator;
7
+ readonly nameInput: Locator;
8
+ readonly submitButton: Locator;
9
+ readonly cancelButton: Locator;
10
+ readonly breadcrumb: Locator;
11
+ readonly folderExplorer: Locator;
12
+ readonly createNewDropdown: Locator;
13
+ readonly inlineNameInput: Locator;
14
+ readonly defineStagesDialog: Locator;
15
+ readonly developmentClusterSelect: Locator;
16
+ readonly defineStagesSaveButton: Locator;
17
+ constructor(page: Page);
18
+ private pageReady;
19
+ waitForProcessApplication(timeout?: number): Promise<void>;
20
+ clickCreateProcessApplicationButton(): Promise<void>;
21
+ clickCreateProcessApplicationOption(): Promise<void>;
22
+ nameNewProcessApplication(name: string, readyTimeout?: number): Promise<void>;
23
+ defineDevelopmentStage(clusterName?: string): Promise<void>;
24
+ rememberResourceContainer(url: string): void;
25
+ forgetStageCluster(): void;
26
+ ensureStageCluster(clusterName: string): Promise<boolean>;
27
+ private ensureWorkspaceEnvironment;
28
+ private openStageDefinition;
29
+ openByNameIfPresent(name: string, timeout?: number): Promise<boolean>;
30
+ openByName(name: string): Promise<void>;
31
+ }
32
+ export { ProcessApplicationPage };