@camunda/e2e-test-suite 0.0.1329 → 0.0.1331

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 (169) 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/pages/SM-8.10/FormJsPage.js +8 -26
  90. package/dist/pages/SM-8.10/ModelerCreatePage.js +4 -3
  91. package/dist/tests/8.11/access-user-role-management.spec.d.ts +1 -0
  92. package/dist/tests/8.11/access-user-role-management.spec.js +487 -0
  93. package/dist/tests/8.11/agentic-ai-user-flows.spec.d.ts +1 -0
  94. package/dist/tests/8.11/agentic-ai-user-flows.spec.js +209 -0
  95. package/dist/tests/8.11/aws-cluster-user-flows.spec.d.ts +1 -0
  96. package/dist/tests/8.11/aws-cluster-user-flows.spec.js +188 -0
  97. package/dist/tests/8.11/aws-connectors-user-flows.spec.d.ts +1 -0
  98. package/dist/tests/8.11/aws-connectors-user-flows.spec.js +167 -0
  99. package/dist/tests/8.11/cluster-variables.spec.d.ts +1 -0
  100. package/dist/tests/8.11/cluster-variables.spec.js +202 -0
  101. package/dist/tests/8.11/connectors-user-flows.spec.d.ts +1 -0
  102. package/dist/tests/8.11/connectors-user-flows.spec.js +537 -0
  103. package/dist/tests/8.11/console-user-flows.spec.d.ts +1 -0
  104. package/dist/tests/8.11/console-user-flows.spec.js +199 -0
  105. package/dist/tests/8.11/hto-user-flows.spec.d.ts +1 -0
  106. package/dist/tests/8.11/hto-user-flows.spec.js +358 -0
  107. package/dist/tests/8.11/idp-user-flows.spec.d.ts +1 -0
  108. package/dist/tests/8.11/idp-user-flows.spec.js +316 -0
  109. package/dist/tests/8.11/login-negative-tests.spec.d.ts +1 -0
  110. package/dist/tests/8.11/login-negative-tests.spec.js +29 -0
  111. package/dist/tests/8.11/login.spec.d.ts +1 -0
  112. package/dist/tests/8.11/login.spec.js +29 -0
  113. package/dist/tests/8.11/navigation.spec.d.ts +1 -0
  114. package/dist/tests/8.11/navigation.spec.js +59 -0
  115. package/dist/tests/8.11/operate-access-flow.spec.d.ts +1 -0
  116. package/dist/tests/8.11/operate-access-flow.spec.js +136 -0
  117. package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.d.ts +1 -0
  118. package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.js +96 -0
  119. package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.d.ts +1 -0
  120. package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.js +69 -0
  121. package/dist/tests/8.11/optimize-api-tests.spec.d.ts +1 -0
  122. package/dist/tests/8.11/optimize-api-tests.spec.js +1194 -0
  123. package/dist/tests/8.11/optimize-collections-api.spec.d.ts +1 -0
  124. package/dist/tests/8.11/optimize-collections-api.spec.js +184 -0
  125. package/dist/tests/8.11/optimize-collections-ui.spec.d.ts +1 -0
  126. package/dist/tests/8.11/optimize-collections-ui.spec.js +46 -0
  127. package/dist/tests/8.11/optimize-data-filters-api.spec.d.ts +1 -0
  128. package/dist/tests/8.11/optimize-data-filters-api.spec.js +195 -0
  129. package/dist/tests/8.11/optimize-data-filters-ui.spec.d.ts +1 -0
  130. package/dist/tests/8.11/optimize-data-filters-ui.spec.js +306 -0
  131. package/dist/tests/8.11/optimize-exporter-filters-importer-e2e.spec.d.ts +1 -0
  132. package/dist/tests/8.11/optimize-exporter-filters-importer-e2e.spec.js +316 -0
  133. package/dist/tests/8.11/optimize-sharing-alerts-export-api.spec.d.ts +1 -0
  134. package/dist/tests/8.11/optimize-sharing-alerts-export-api.spec.js +337 -0
  135. package/dist/tests/8.11/optimize-sharing-alerts-export-ui.spec.d.ts +1 -0
  136. package/dist/tests/8.11/optimize-sharing-alerts-export-ui.spec.js +198 -0
  137. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-audit-log.spec.d.ts +1 -0
  138. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-audit-log.spec.js +146 -0
  139. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-call-tools.spec.d.ts +1 -0
  140. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-call-tools.spec.js +208 -0
  141. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-e2e-flow.spec.d.ts +1 -0
  142. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-e2e-flow.spec.js +151 -0
  143. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-list-tools.spec.d.ts +1 -0
  144. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-list-tools.spec.js +242 -0
  145. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.d.ts +1 -0
  146. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.js +75 -0
  147. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-incident-tools.spec.d.ts +1 -0
  148. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-incident-tools.spec.js +123 -0
  149. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.d.ts +1 -0
  150. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.js +151 -0
  151. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-variable-tools.spec.d.ts +1 -0
  152. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-variable-tools.spec.js +123 -0
  153. package/dist/tests/8.11/play.spec.d.ts +1 -0
  154. package/dist/tests/8.11/play.spec.js +93 -0
  155. package/dist/tests/8.11/rba-enabled-v2-user-flows.spec.d.ts +1 -0
  156. package/dist/tests/8.11/rba-enabled-v2-user-flows.spec.js +495 -0
  157. package/dist/tests/8.11/saas-migration-path-user-flows.spec.d.ts +1 -0
  158. package/dist/tests/8.11/saas-migration-path-user-flows.spec.js +133 -0
  159. package/dist/tests/8.11/smoke-tests.spec.d.ts +1 -0
  160. package/dist/tests/8.11/smoke-tests.spec.js +339 -0
  161. package/dist/tests/8.11/test-setup.spec.d.ts +1 -0
  162. package/dist/tests/8.11/test-setup.spec.js +256 -0
  163. package/dist/tests/8.11/web-modeler-user-flows.spec.d.ts +1 -0
  164. package/dist/tests/8.11/web-modeler-user-flows.spec.js +523 -0
  165. package/dist/utils/clusterVersions.d.ts +2 -1
  166. package/dist/utils/clusterVersions.js +1 -0
  167. package/dist/utils/consoleApiHelpers.js +1 -0
  168. package/package.json +1 -1
  169. package/playwright.config.ts +10 -0
@@ -0,0 +1,283 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormJsPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const sleep_1 = require("../../utils/sleep");
6
+ const ProcessApplicationPage_1 = require("./ProcessApplicationPage");
7
+ const modelerCluster_1 = require("../../utils/modelerCluster");
8
+ const hubDeployDialog_1 = require("../../utils/hubDeployDialog");
9
+ class FormJsPage {
10
+ page;
11
+ processApplicationPage;
12
+ aiFormGeneratorButton;
13
+ formRequestInput;
14
+ generateFormButton;
15
+ formEditor;
16
+ filePicker;
17
+ textField;
18
+ documentPreview;
19
+ keyInput;
20
+ uploadMultipleFilesToggle;
21
+ documentReferenceInput;
22
+ generalPanel;
23
+ textFieldInForm;
24
+ deployButton;
25
+ deploySubButton;
26
+ dialog;
27
+ deploySuccessNotification;
28
+ constructor(page) {
29
+ this.page = page;
30
+ this.processApplicationPage = new ProcessApplicationPage_1.ProcessApplicationPage(page);
31
+ this.aiFormGeneratorButton = page.getByRole('button', {
32
+ name: 'AI Form Generator',
33
+ });
34
+ this.formRequestInput = page.getByPlaceholder('A form for an american standard loan request');
35
+ this.generateFormButton = page.getByRole('button', { name: 'Generate form' });
36
+ this.formEditor = page.getByLabel('Form Definition');
37
+ this.documentPreview = page.locator('button[data-field-type="documentPreview"]');
38
+ this.filePicker = page.locator('button[data-field-type="filepicker"]');
39
+ this.textField = page.locator('button[data-field-type="textfield"]');
40
+ this.keyInput = page.getByRole('textbox', { name: 'key' });
41
+ this.uploadMultipleFilesToggle = page.locator('div[data-entry-id="multiple"] .bio-properties-panel-toggle-switch__switcher');
42
+ this.documentReferenceInput = page.getByRole('textbox', {
43
+ name: 'document reference',
44
+ });
45
+ this.generalPanel = page.locator('[data-group-id="group-general"]').first();
46
+ this.textFieldInForm = page
47
+ .getByLabel('Form Definition')
48
+ .getByText('Text field');
49
+ this.deployButton = page
50
+ .locator('[data-test="action-bar"]')
51
+ .getByRole('button', { name: 'Deploy', exact: true });
52
+ // Inside a process application hub titles this modal for the application
53
+ // rather than for the form, so 'Deploy form' never matches and the dialog
54
+ // reads as absent. pages/SM-8.10 filters on 'Deploy' for the same reason.
55
+ // Hub renders the deploy dialog with the design system, not as a Carbon
56
+ // modal. Keep the Carbon locator for older builds.
57
+ this.dialog = page
58
+ .getByRole('dialog')
59
+ .filter({ hasText: 'Deploy' })
60
+ .or(page
61
+ .locator('.cds--modal-container[role="dialog"]')
62
+ .filter({ hasText: 'Deploy' }))
63
+ .first();
64
+ this.deploySubButton = this.dialog.getByRole('button', {
65
+ name: 'Deploy',
66
+ exact: true,
67
+ });
68
+ // Hub's success toast is not a cds--toast node either (camunda-hub
69
+ // deploy/get-success-message.ts), so match its title anywhere.
70
+ this.deploySuccessNotification = page
71
+ .getByText('Form deployed!')
72
+ .or(page
73
+ .locator('.cds--toast-notification--success')
74
+ .filter({ hasText: 'Form deployed!' }))
75
+ .first();
76
+ }
77
+ async generateAIForm(
78
+ // "date only, no time": asked for a plain date the generator sometimes
79
+ // emits a datetime component in its "date and time" subtype, which adds a
80
+ // second required time subfield that then blocks task completion. The
81
+ // task form fills it anyway (TaskDetailsPage.fillTimeSubfield), but asking
82
+ // for the date-only variant keeps the generated form matching what the
83
+ // tests model.
84
+ request = 'Create a form with the following fields: 1. A text field with the label "Full Name" 2. A number with the label "Count" 3. A date input (date only, no time) with the label "Date of birth" 4. A Checkbox with the label "Agree"') {
85
+ // The "Successfully generated smart form." toast is delivered over a Pusher
86
+ // websocket. A transient websocket/network drop during generation means the
87
+ // toast never renders even though generation finished, leaving the old
88
+ // single 5-minute wait stuck until the test timed out. Re-attempt on a
89
+ // reloaded editor (fresh websocket) if the toast doesn't arrive.
90
+ //
91
+ // Submitting the request is retried on the same reloaded editor, not just
92
+ // the toast: the generator panel is mounted by the button click, and a
93
+ // click that does not open it leaves every following step acting on a
94
+ // surface that is not there -- reported as `locator.click: Timeout
95
+ // 10000ms exceeded ... waiting for getByPlaceholder('A form for an
96
+ // american standard loan request')`. That used to escape the loop on the
97
+ // first attempt because only the toast wait was guarded.
98
+ const maxAttempts = 2;
99
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
100
+ try {
101
+ await (0, test_1.expect)(this.aiFormGeneratorButton).toBeVisible({
102
+ timeout: 90000,
103
+ });
104
+ await this.clickAIFormGeneratorButton();
105
+ await this.clickFormRequestInput();
106
+ await this.fillFormRequestInput(request);
107
+ await this.clickGenerateFormButton();
108
+ await (0, test_1.expect)(this.page.getByText('Generating...'))
109
+ .toBeVisible({ timeout: 60000 })
110
+ .catch(() => { });
111
+ await (0, test_1.expect)(this.page.getByText('Successfully generated smart form.')).toBeVisible({ timeout: 180000 });
112
+ await (0, sleep_1.sleep)(60000);
113
+ return;
114
+ }
115
+ catch (error) {
116
+ if (attempt === maxAttempts) {
117
+ throw error;
118
+ }
119
+ await this.page.reload();
120
+ }
121
+ }
122
+ }
123
+ async clickAIFormGeneratorButton() {
124
+ await this.aiFormGeneratorButton.click();
125
+ }
126
+ // The generator panel slides in after its button click and renders this
127
+ // input with it, so the inherited 10s actionTimeout is raced against a panel
128
+ // that is still mounting -- every other control on this page allows 60s.
129
+ async clickFormRequestInput() {
130
+ await (0, test_1.expect)(this.formRequestInput).toBeVisible({ timeout: 60000 });
131
+ await this.formRequestInput.click({ timeout: 60000 });
132
+ }
133
+ async fillFormRequestInput(formRequest) {
134
+ await this.formRequestInput.fill(formRequest);
135
+ }
136
+ async clickGenerateFormButton() {
137
+ await this.generateFormButton.click();
138
+ }
139
+ async dragAndDrop(source, target) {
140
+ await source.waitFor();
141
+ await target.waitFor();
142
+ await source.dragTo(target);
143
+ }
144
+ async fillKeyInput(key) {
145
+ await this.keyInput.fill(key, { timeout: 60000 });
146
+ await (0, test_1.expect)(this.keyInput).toHaveValue(key, { timeout: 20000 });
147
+ await (0, sleep_1.sleep)(1000);
148
+ }
149
+ async enableUploadMultipleFiles() {
150
+ await this.uploadMultipleFilesToggle.click({ timeout: 60000 });
151
+ }
152
+ async filldocumentReferenceInput(key) {
153
+ await this.documentReferenceInput.fill(key, { timeout: 60000 });
154
+ }
155
+ async clickGeneralPropertiesPanel() {
156
+ await this.generalPanel.click({ timeout: 60000 });
157
+ }
158
+ async selectCluster(clusterName) {
159
+ await (0, test_1.expect)(this.dialog).toBeVisible({ timeout: 30000 });
160
+ const healthCheckTimeout = 30000;
161
+ // Inside a process application the deploy dialog renders
162
+ // ProcessAppClusterSelection, not the per-deploy ClusterSelection toggle
163
+ // list: it shows only clusters assigned to one of the application's stages
164
+ // and auto-selects the first, so there is no label to click. Confirm the
165
+ // intended cluster is the one on offer instead.
166
+ //
167
+ // The unconfigured case is called out explicitly: without this the symptom
168
+ // is the cluster toggle never appearing, retried until the test times out,
169
+ // which says nothing about the actual cause.
170
+ const notConfigured = this.dialog.getByText('Clusters not configured for stages');
171
+ if (await notConfigured.isVisible().catch(() => false)) {
172
+ throw new Error(`Process application has no cluster assigned to any stage, so "${clusterName}" cannot be deployed to. ` +
173
+ 'ProcessApplicationPage.ensureStageCluster() should have bound it before the deploy dialog was opened.');
174
+ }
175
+ // Hub's environment-based dialog lists every environment assigned to the
176
+ // workspace and preselects the first, which need not be this one.
177
+ const hasEnvironmentRow = await this.dialog
178
+ .locator('[data-test^="environment-row-"]')
179
+ .first()
180
+ .waitFor({ state: 'visible', timeout: 10000 })
181
+ .then(() => true)
182
+ .catch(() => false);
183
+ if (hasEnvironmentRow) {
184
+ try {
185
+ await (0, modelerCluster_1.selectDeployEnvironment)(this.dialog, clusterName);
186
+ }
187
+ catch (error) {
188
+ this.processApplicationPage.forgetStageCluster();
189
+ throw error;
190
+ }
191
+ return;
192
+ }
193
+ const legacyClusterToggle = this.dialog.locator('label').filter({
194
+ hasText: new RegExp(`^${clusterName}`),
195
+ });
196
+ const isLegacyDialog = await legacyClusterToggle
197
+ .first()
198
+ .isVisible()
199
+ .catch(() => false);
200
+ if (!isLegacyDialog) {
201
+ const offered = await this.dialog
202
+ .getByText(clusterName, { exact: false })
203
+ .first()
204
+ .waitFor({ state: 'visible', timeout: 30000 })
205
+ .then(() => true)
206
+ .catch(() => false);
207
+ if (!offered) {
208
+ // Forget the binding before failing. The dialog lists exactly the
209
+ // clusters this application's stages point at, so a missing cluster
210
+ // means the binding did not take -- and no amount of reopening the
211
+ // dialog will make it appear. Clearing the record lets the caller's
212
+ // next attempt rebind instead of re-checking an unchanged dialog.
213
+ this.processApplicationPage.forgetStageCluster();
214
+ throw new Error(`The deploy dialog does not offer "${clusterName}": its stage ` +
215
+ 'binding did not take. It will be rebound on the next attempt.');
216
+ }
217
+ return;
218
+ }
219
+ const healthyRegex = new RegExp(`${clusterName}[\\s\\S]*?HealthydevManage`);
220
+ const cluster = this.dialog.locator(`[title="${clusterName}"]`);
221
+ await (0, test_1.expect)(cluster).toBeVisible({ timeout: 30000 });
222
+ await cluster.click();
223
+ await (0, test_1.expect)(this.dialog
224
+ .locator('label')
225
+ .filter({ hasText: new RegExp(`^${clusterName}`) })
226
+ .getByRole('switch')).toBeChecked({ timeout: 30000 });
227
+ await (0, test_1.expect)(this.dialog).toHaveText(healthyRegex, {
228
+ timeout: healthCheckTimeout,
229
+ });
230
+ }
231
+ async clickDeployButton() {
232
+ await this.deployButton.click({ timeout: 60000 });
233
+ }
234
+ async clickDeploySubButton() {
235
+ await this.deploySubButton.click({ timeout: 60000 });
236
+ }
237
+ // Since camunda/camunda-hub#25831 a form lives inside a process application,
238
+ // and Hub then scopes Deploy to the WHOLE application by default -- it calls
239
+ // deployProcessApplication, not deployFile, so the "Form deployed!" toast
240
+ // never fires (hub's own form-deploy-action.spec.sm.tsx asserts exactly that
241
+ // default). Narrowing the scope keeps this a form-deploy test instead of
242
+ // silently turning it into a process-application deploy. The combobox only
243
+ // exists inside a container, hence the boolean probe.
244
+ async selectOnlyThisResource() {
245
+ // Hub's scope select is named by its value ("All resources"), not by the
246
+ // "Resources to deploy" label; the shared helper addresses it by id.
247
+ await (0, hubDeployDialog_1.selectOnlyThisResourceInDialog)(this.page, this.dialog);
248
+ }
249
+ async deployForm(clusterName) {
250
+ await this.processApplicationPage.ensureStageCluster(clusterName);
251
+ await this.clickDeployButton();
252
+ await (0, test_1.expect)(this.dialog).toBeVisible({
253
+ timeout: 30000,
254
+ });
255
+ // selectCluster clears the stage binding when the dialog does not offer the
256
+ // cluster, so ensureStageCluster rebinds here and reports that it
257
+ // navigated. Any other failure leaves the binding in place, it returns
258
+ // false, and the original error stands. This path has no surrounding retry
259
+ // loop, hence the one explicit second attempt.
260
+ try {
261
+ await this.selectCluster(clusterName);
262
+ }
263
+ catch (error) {
264
+ const rebound = await this.processApplicationPage.ensureStageCluster(clusterName);
265
+ if (!rebound) {
266
+ throw error;
267
+ }
268
+ await this.clickDeployButton();
269
+ await (0, test_1.expect)(this.dialog).toBeVisible({
270
+ timeout: 30000,
271
+ });
272
+ await this.selectCluster(clusterName);
273
+ }
274
+ await this.selectOnlyThisResource();
275
+ await this.clickDeploySubButton();
276
+ // Deploying the form is a round trip through the cluster, so the toast is
277
+ // gated on the cluster's response rather than on the modal closing. 30s is
278
+ // the shortest wait in this flow and the one the nightly ran out of; the
279
+ // rest of the page object budgets 60-90s for cluster-bound waits.
280
+ await (0, test_1.expect)(this.deploySuccessNotification).toBeVisible({ timeout: 90000 });
281
+ }
282
+ }
283
+ exports.FormJsPage = FormJsPage;
@@ -0,0 +1,29 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class HomePage {
3
+ private page;
4
+ readonly dashboardTab: Locator;
5
+ readonly clusterTab: Locator;
6
+ readonly organizationTab: Locator;
7
+ readonly organizationViewTitle: Locator;
8
+ readonly welcomeMessage: Locator;
9
+ readonly informationDialog: Locator;
10
+ readonly camundaAppsButton: Locator;
11
+ readonly camundaComponentsButton: Locator;
12
+ readonly appSwitcher: Locator;
13
+ readonly openOrganizationButton: Locator;
14
+ readonly consoleBanner: Locator;
15
+ readonly hubHeader: Locator;
16
+ readonly hubSidebar: Locator;
17
+ readonly modelerBanner: Locator;
18
+ readonly gettingStartedHeading: Locator;
19
+ readonly buttonSkipCustomization: Locator;
20
+ constructor(page: Page);
21
+ clickClusters(): Promise<void>;
22
+ clickDashboard(): Promise<void>;
23
+ clickOrganization(): Promise<void>;
24
+ closeInformationDialog(): Promise<void>;
25
+ organizationUuid(): string;
26
+ clickOpenOrganizationButton(): Promise<void>;
27
+ clickSkipCustomization(): Promise<void>;
28
+ }
29
+ export { HomePage };
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HomePage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ class HomePage {
6
+ page;
7
+ dashboardTab;
8
+ clusterTab;
9
+ organizationTab;
10
+ organizationViewTitle;
11
+ welcomeMessage;
12
+ informationDialog;
13
+ camundaAppsButton;
14
+ camundaComponentsButton;
15
+ appSwitcher;
16
+ openOrganizationButton;
17
+ consoleBanner;
18
+ hubHeader;
19
+ hubSidebar;
20
+ modelerBanner;
21
+ gettingStartedHeading;
22
+ buttonSkipCustomization;
23
+ constructor(page) {
24
+ this.page = page;
25
+ // Camunda Hub replaces Console on SaaS: an app header (only carrying the
26
+ // user menu once authenticated) plus a sidebar whose Console section
27
+ // links to /org/<id>/clusters and /org/<id>/management.
28
+ this.hubHeader = page
29
+ .locator('header[data-slot="app-header"]')
30
+ .filter({ has: page.locator('[data-slot="user-menu-trigger"]') });
31
+ this.hubSidebar = page.locator('nav[data-slot="app-sidebar"]');
32
+ this.dashboardTab = page.getByRole('link', { name: 'Dashboard' });
33
+ // Once an org has environmentsEnabled, camunda-hub's
34
+ // use-ds-sidebar-items.tsx replaces the sidebar's Clusters link with one
35
+ // labelled "Environments" whose href is '/environments', not
36
+ // '/clusters' -- accept both hrefs so this resolves either way.
37
+ this.clusterTab = page
38
+ .getByRole('banner')
39
+ .getByRole('link', { name: 'Clusters' })
40
+ .or(this.hubSidebar.locator('a[href$="/clusters"]'))
41
+ .or(this.hubSidebar.locator('a[href$="/environments"]'))
42
+ .first();
43
+ this.organizationTab = page
44
+ .getByRole('link', { name: 'Organization' })
45
+ .or(this.hubSidebar.locator('a[href$="/management"]'))
46
+ .first();
47
+ this.organizationViewTitle = page.getByText('Organization Management');
48
+ this.welcomeMessage = page.getByText('Welcome to Camunda!').first();
49
+ this.informationDialog = page.getByRole('button', {
50
+ name: 'Close',
51
+ });
52
+ this.camundaAppsButton = page.getByLabel('Camunda apps');
53
+ this.appSwitcher = page.getByLabel('App Switcher');
54
+ // Specs assert this as "the authenticated app shell has rendered" before
55
+ // navigating. Camunda Hub has no app-switcher button at all (apps are
56
+ // reached from the sidebar -- see AppsPage.clickCamundaApps), so on Hub
57
+ // its authenticated header is the equivalent readiness signal. Ported
58
+ // from pages/8.9/HomePage.ts.
59
+ this.camundaComponentsButton = page
60
+ .getByLabel('Camunda components')
61
+ .or(this.camundaAppsButton)
62
+ .or(this.appSwitcher)
63
+ .or(this.hubHeader);
64
+ this.openOrganizationButton = page.getByLabel('Open Organizations');
65
+ // "Camunda logo Console" was the old Carbon header's logo link. Camunda
66
+ // Hub has no equivalent link -- its post-login landing is `hubHeader`
67
+ // (see above) -- so callers that assert this banner as a login/Console
68
+ // arrival signal need the Hub fallback too. Ported from
69
+ // pages/8.9/HomePage.ts.
70
+ this.consoleBanner = page
71
+ .getByRole('link', {
72
+ name: 'Camunda logo Console',
73
+ })
74
+ .or(this.hubHeader);
75
+ this.gettingStartedHeading = page.getByText('start by creating a project');
76
+ this.buttonSkipCustomization = page.getByRole('button', {
77
+ name: 'Skip customization',
78
+ });
79
+ this.modelerBanner = page.getByRole('banner', {
80
+ name: 'Camunda Modeler',
81
+ });
82
+ }
83
+ async clickClusters() {
84
+ await (0, test_1.expect)(this.clusterTab).toBeVisible({ timeout: 30000 });
85
+ // Dismiss any modal that may be intercepting pointer events on the nav link.
86
+ if (await this.informationDialog
87
+ .last()
88
+ .isVisible({ timeout: 2000 })
89
+ .catch(() => false)) {
90
+ await this.closeInformationDialog();
91
+ }
92
+ await this.clusterTab.click({ timeout: 15000 });
93
+ // Landing on Hub's Environments overview (see clusterTab above) doesn't
94
+ // put us on the classic row-based cluster list ClusterPage.ts expects --
95
+ // that page renders clusters as cards. Its own header renders a separate
96
+ // "Clusters" tab (camunda-hub EnvironmentsPageHeader.tsx, href /clusters)
97
+ // that does.
98
+ const clustersPageTab = this.page
99
+ .getByRole('navigation', { name: 'Environments views' })
100
+ .getByRole('link', { name: 'Clusters', exact: true });
101
+ // On Hub this tab is required -- the row-based locators callers use right
102
+ // after this method return nothing on the card-based Environments
103
+ // overview, so a slow render must not be treated as "tab doesn't exist"
104
+ // the way the legacy (non-Hub) shell's 5s probe is allowed to.
105
+ if (new URL(this.page.url()).hostname.startsWith('hub.')) {
106
+ await (0, test_1.expect)(clustersPageTab).toBeVisible({ timeout: 30000 });
107
+ await clustersPageTab.click({ timeout: 15000 });
108
+ }
109
+ else if (await clustersPageTab.isVisible({ timeout: 5000 }).catch(() => false)) {
110
+ await clustersPageTab.click({ timeout: 15000 });
111
+ }
112
+ }
113
+ async clickDashboard() {
114
+ await this.dashboardTab.click({ timeout: 90000 });
115
+ }
116
+ async clickOrganization() {
117
+ await this.organizationTab.click({ timeout: 90000 });
118
+ }
119
+ async closeInformationDialog() {
120
+ // Console can render more than one informational popup at once (e.g., the
121
+ // customization modal plus a "New features" announcement). Close every visible
122
+ // 'Close' button. Bounded to guard against a regression that re-renders the popup.
123
+ //
124
+ // Carbon stacks modals in DOM order, so .last() is the topmost; targeting
125
+ // .first() would try to click a Close button whose modal is covered by the
126
+ // next-stacked .cds--modal backdrop, which intercepts pointer events.
127
+ // force: true also clicks through any transient overlay (e.g. a backdrop
128
+ // fading in during animation).
129
+ for (let i = 0; i < 5; i++) {
130
+ const next = this.informationDialog.last();
131
+ const visibleTimeout = i === 0 ? 30000 : 2000;
132
+ if (!(await next.isVisible({ timeout: visibleTimeout }))) {
133
+ return;
134
+ }
135
+ // The dialog can dismiss itself (e.g. an auto-closing banner) between
136
+ // the visibility check above and the click below. Re-check inside
137
+ // toPass() so that race resolves to "nothing left to close" instead of
138
+ // a hard click timeout on an element that already disappeared.
139
+ await (0, test_1.expect)(async () => {
140
+ if (!(await next.isVisible().catch(() => false))) {
141
+ return;
142
+ }
143
+ await next.click({ timeout: 10000, force: true });
144
+ }).toPass({ timeout: 30000 });
145
+ }
146
+ }
147
+ organizationUuid() {
148
+ const uuidPattern = /\/org\/([a-f0-9-]+)/;
149
+ const originalMatch = this.page.url().match(uuidPattern);
150
+ if (!originalMatch || originalMatch.length != 2) {
151
+ throw new Error('Organization UUID not found in the URL');
152
+ }
153
+ return originalMatch[1];
154
+ }
155
+ async clickOpenOrganizationButton() {
156
+ await this.openOrganizationButton.click({ timeout: 60000 });
157
+ }
158
+ async clickSkipCustomization() {
159
+ try {
160
+ await (0, test_1.expect)(this.buttonSkipCustomization).toBeVisible({
161
+ timeout: 30000,
162
+ });
163
+ // Best-effort: dismiss any Carbon modal that has a named close button.
164
+ await this.closeInformationDialog();
165
+ // force: true bypasses the "pointer events intercepted by modal backdrop"
166
+ // check — the same pattern used by closeInformationDialog itself.
167
+ await this.buttonSkipCustomization.click({ timeout: 60000, force: true });
168
+ await this.closeInformationDialog();
169
+ return;
170
+ }
171
+ catch (error) {
172
+ console.error(error);
173
+ }
174
+ }
175
+ }
176
+ exports.HomePage = HomePage;
@@ -0,0 +1,118 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class IdpCreatePage {
3
+ private page;
4
+ readonly createNewDropdownButton: Locator;
5
+ readonly createExtractionTemplateOption: Locator;
6
+ readonly createClassificationTemplateOption: Locator;
7
+ readonly idpExtractionTemplateName: Locator;
8
+ readonly idpClassificationTemplateName: Locator;
9
+ readonly idpExtractionDescriptionField: Locator;
10
+ readonly idpClassificationDescriptionField: Locator;
11
+ readonly providerDropdown: Locator;
12
+ readonly createIdpExtractationTemplateButton: Locator;
13
+ readonly unstructured_UploadFilesButton: Locator;
14
+ readonly extractButton: Locator;
15
+ readonly unstructured_extractFieldName: Locator;
16
+ readonly unstructured_extractFieldPrompt: Locator;
17
+ readonly unstructured_addExtractionFieldButton: Locator;
18
+ readonly unstructured_extractionModelDropdown: Locator;
19
+ readonly unstructured_extractDocumentButton: Locator;
20
+ readonly unstructured_saveAsTestCaseButton: Locator;
21
+ readonly unstructured_testCaseSavedNotification: Locator;
22
+ readonly unstructured_validateExtractionTab: Locator;
23
+ readonly unstructured_expandAllRowsButton: Locator;
24
+ readonly unstructured_passTestCaseResultsRows: Locator;
25
+ readonly unstructured_publishButton: Locator;
26
+ readonly unstructured_publishToProjecOption: Locator;
27
+ readonly unstructured_versionFieldName: Locator;
28
+ readonly unstructured_versionFieldDescription: Locator;
29
+ readonly unstructured_publishButtonModal: Locator;
30
+ readonly unstructured_idpSuccessfullPublishNotification: Locator;
31
+ readonly unstructured_toastNotificationCloseButton: Locator;
32
+ readonly selectUnstructuredDataExtraction: Locator;
33
+ readonly selectStructuredDataExtraction: Locator;
34
+ readonly selectStructuredDataExtractionLabel: Locator;
35
+ readonly extractionInProgressNotification: Locator;
36
+ readonly extractionInProgressNotificationForMultipleFiles: Locator;
37
+ readonly structured_FieldsTab: Locator;
38
+ readonly structured_TablesTab: Locator;
39
+ readonly structured_CheckboxSelectAllFields: Locator;
40
+ readonly structured_CheckboxSelectAllTables: Locator;
41
+ readonly structured_uploadFilesButton: Locator;
42
+ readonly structured_SelectedFieldsTablesMessage: Locator;
43
+ readonly structured_TestTemplateTab: Locator;
44
+ readonly structured_TestExtractionTemplateButton: Locator;
45
+ readonly structured_TestSummaryResult: Locator;
46
+ readonly structured_DetailsResult: Locator;
47
+ readonly structured_PublishTemplateButton: Locator;
48
+ readonly structured_PublishTemplateToProjectButton: Locator;
49
+ readonly structured_SuccessfullPublishNotification: Locator;
50
+ readonly idpClassificationAddDocumentTypeButton: Locator;
51
+ readonly idpClassificationInvoiceTypeOption: Locator;
52
+ readonly idpClassificationBankStatementTypeOption: Locator;
53
+ readonly addDocumentsTypesButton: Locator;
54
+ readonly classificationUploadFilesButton: Locator;
55
+ readonly selectDocumentDropdown: Locator;
56
+ readonly selectFilesButton: Locator;
57
+ readonly classificationRunTestButton: Locator;
58
+ readonly classificationTestResultsPanel: Locator;
59
+ readonly classificationModelName: Locator;
60
+ readonly classificationAccuracyValue: Locator;
61
+ readonly classifyingLoader: Locator;
62
+ readonly classificationSuccessfullPublishNotification: Locator;
63
+ constructor(page: Page);
64
+ clickCreateIdpTemplateButton(): Promise<void>;
65
+ fillIdpExtractionTemplateName(name: string): Promise<void>;
66
+ clickCreateIdpClassificationTemplateButton(): Promise<void>;
67
+ fillIdpClassificationTemplateName(name: string): Promise<void>;
68
+ clickCreateIdpExtractationTemplateButton(): Promise<void>;
69
+ clickCreateTemplateButton(): Promise<void>;
70
+ clickUnstructuredUploadFilesButton(): Promise<void>;
71
+ clickExtractButton(): Promise<void>;
72
+ fillExtractFieldName(name: string): Promise<void>;
73
+ fillPromptField(): Promise<void>;
74
+ clickAddExtractionFieldButton(): Promise<void>;
75
+ selectExtractionModelOption(option: string): Promise<void>;
76
+ clickExtractDocumentButton(): Promise<void>;
77
+ clickSaveAsTestCaseButton(): Promise<void>;
78
+ clickValidateExtractionTab(): Promise<void>;
79
+ clickExpandAllRowsButton(): Promise<void>;
80
+ assertPassTestCaseResultsRow(retries?: number): Promise<void>;
81
+ clickPublishButton(): Promise<void>;
82
+ clickPublishToProjecOption(): Promise<void>;
83
+ fillVersionFieldName(name: string): Promise<void>;
84
+ fillVersionFieldDescription(description: string): Promise<void>;
85
+ clickPublishButtonModal(): Promise<void>;
86
+ assertIdpSuccessPublishNotification(): Promise<void>;
87
+ clickCloseToastNotification(): Promise<void>;
88
+ selectStructuredDataExtractionMethod(): Promise<void>;
89
+ clickStructuredUploadFilesButton(): Promise<void>;
90
+ selectAllExtractionFields(): Promise<void>;
91
+ clickTablesTab(): Promise<void>;
92
+ selectAllExtractedTables(): Promise<void>;
93
+ assertFieldsAndTablesSelection(): Promise<void>;
94
+ clickTestTemplateTab(): Promise<void>;
95
+ clickTestExtractionTemplateButton(): Promise<void>;
96
+ extractionResultsAreVisible(): Promise<void>;
97
+ clickPublishTemplateButton(): Promise<void>;
98
+ clickPublishTemplateToProjectButton(): Promise<void>;
99
+ assertStructuredTemplateSuccessNotification(): Promise<void>;
100
+ fillIdpExtractionDescriptionField(description: string): Promise<void>;
101
+ fillIdpClassificationDescriptionField(description: string): Promise<void>;
102
+ clickAddDocumentTypeButton(): Promise<void>;
103
+ clickInvoiceTypeOption(): Promise<void>;
104
+ clickBankStatementTypeOption(): Promise<void>;
105
+ clickAddTypesButton(): Promise<void>;
106
+ clickClassificationUploadFilesButton(): Promise<void>;
107
+ clickSelectDocumentDropdown(): Promise<void>;
108
+ selectDocumentTypeOption(documentType: string): Promise<void>;
109
+ clickSelectFilesButton(): Promise<void>;
110
+ clickClassificationRunTestButton(): Promise<void>;
111
+ assertClassificationTestResultsArePresent(): Promise<void>;
112
+ assertClassificationModelName(expectedModel: string): Promise<void>;
113
+ assertClassificationAccuracyIsPresent(): Promise<void>;
114
+ classifyingProgressIsComplete(): Promise<void>;
115
+ assertClassificationTemplateSuccessNotification(): Promise<void>;
116
+ selectProvider(provider: string): Promise<void>;
117
+ }
118
+ export { IdpCreatePage };