@camunda/e2e-test-suite 0.0.202 → 0.0.203

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 (120) hide show
  1. package/README.md +1 -0
  2. package/dist/fixtures/8.10.d.ts +75 -0
  3. package/dist/fixtures/8.10.js +187 -0
  4. package/dist/pages/8.10/AppsPage.d.ts +38 -0
  5. package/dist/pages/8.10/AppsPage.js +398 -0
  6. package/dist/pages/8.10/Authorization.d.ts +31 -0
  7. package/dist/pages/8.10/Authorization.js +143 -0
  8. package/dist/pages/8.10/ClientCredentialsDetailsPage.d.ts +12 -0
  9. package/dist/pages/8.10/ClientCredentialsDetailsPage.js +36 -0
  10. package/dist/pages/8.10/ClusterDetailsPage.d.ts +81 -0
  11. package/dist/pages/8.10/ClusterDetailsPage.js +475 -0
  12. package/dist/pages/8.10/ClusterPage.d.ts +63 -0
  13. package/dist/pages/8.10/ClusterPage.js +349 -0
  14. package/dist/pages/8.10/ClusterSecretsPage.d.ts +46 -0
  15. package/dist/pages/8.10/ClusterSecretsPage.js +219 -0
  16. package/dist/pages/8.10/ConnectorMarketplacePage.d.ts +19 -0
  17. package/dist/pages/8.10/ConnectorMarketplacePage.js +56 -0
  18. package/dist/pages/8.10/ConnectorSettingsPage.d.ts +38 -0
  19. package/dist/pages/8.10/ConnectorSettingsPage.js +142 -0
  20. package/dist/pages/8.10/ConnectorTemplatePage.d.ts +11 -0
  21. package/dist/pages/8.10/ConnectorTemplatePage.js +34 -0
  22. package/dist/pages/8.10/ConsoleOrganizationPage.d.ts +76 -0
  23. package/dist/pages/8.10/ConsoleOrganizationPage.js +402 -0
  24. package/dist/pages/8.10/FormJsPage.d.ts +28 -0
  25. package/dist/pages/8.10/FormJsPage.js +85 -0
  26. package/dist/pages/8.10/HomePage.d.ts +27 -0
  27. package/dist/pages/8.10/HomePage.js +88 -0
  28. package/dist/pages/8.10/IdpCreatePage.d.ts +81 -0
  29. package/dist/pages/8.10/IdpCreatePage.js +355 -0
  30. package/dist/pages/8.10/LoginPage.d.ts +42 -0
  31. package/dist/pages/8.10/LoginPage.js +93 -0
  32. package/dist/pages/8.10/ModelerCreatePage.d.ts +224 -0
  33. package/dist/pages/8.10/ModelerCreatePage.js +1166 -0
  34. package/dist/pages/8.10/ModelerHomePage.d.ts +54 -0
  35. package/dist/pages/8.10/ModelerHomePage.js +235 -0
  36. package/dist/pages/8.10/ModelerUserInvitePage.d.ts +29 -0
  37. package/dist/pages/8.10/ModelerUserInvitePage.js +136 -0
  38. package/dist/pages/8.10/OCIdentityAuthorizationsPage.d.ts +11 -0
  39. package/dist/pages/8.10/OCIdentityAuthorizationsPage.js +32 -0
  40. package/dist/pages/8.10/OCIdentityGroupsPage.d.ts +38 -0
  41. package/dist/pages/8.10/OCIdentityGroupsPage.js +166 -0
  42. package/dist/pages/8.10/OCIdentityHomePage.d.ts +18 -0
  43. package/dist/pages/8.10/OCIdentityHomePage.js +57 -0
  44. package/dist/pages/8.10/OCIdentityMappingRulesPage.d.ts +23 -0
  45. package/dist/pages/8.10/OCIdentityMappingRulesPage.js +124 -0
  46. package/dist/pages/8.10/OCIdentityRolesPage.d.ts +40 -0
  47. package/dist/pages/8.10/OCIdentityRolesPage.js +182 -0
  48. package/dist/pages/8.10/OperateHomePage.d.ts +23 -0
  49. package/dist/pages/8.10/OperateHomePage.js +73 -0
  50. package/dist/pages/8.10/OperateProcessInstancePage.d.ts +23 -0
  51. package/dist/pages/8.10/OperateProcessInstancePage.js +94 -0
  52. package/dist/pages/8.10/OperateProcessesPage.d.ts +25 -0
  53. package/dist/pages/8.10/OperateProcessesPage.js +103 -0
  54. package/dist/pages/8.10/OptimizeCollectionsPage.d.ts +17 -0
  55. package/dist/pages/8.10/OptimizeCollectionsPage.js +68 -0
  56. package/dist/pages/8.10/OptimizeDashboardPage.d.ts +11 -0
  57. package/dist/pages/8.10/OptimizeDashboardPage.js +65 -0
  58. package/dist/pages/8.10/OptimizeHomePage.d.ts +13 -0
  59. package/dist/pages/8.10/OptimizeHomePage.js +55 -0
  60. package/dist/pages/8.10/OptimizeReportPage.d.ts +48 -0
  61. package/dist/pages/8.10/OptimizeReportPage.js +159 -0
  62. package/dist/pages/8.10/PlayPage.d.ts +14 -0
  63. package/dist/pages/8.10/PlayPage.js +68 -0
  64. package/dist/pages/8.10/SettingsPage.d.ts +10 -0
  65. package/dist/pages/8.10/SettingsPage.js +43 -0
  66. package/dist/pages/8.10/SignUpPage.d.ts +42 -0
  67. package/dist/pages/8.10/SignUpPage.js +134 -0
  68. package/dist/pages/8.10/TaskDetailsPage.d.ts +75 -0
  69. package/dist/pages/8.10/TaskDetailsPage.js +269 -0
  70. package/dist/pages/8.10/TaskPanelPage.d.ts +21 -0
  71. package/dist/pages/8.10/TaskPanelPage.js +93 -0
  72. package/dist/pages/8.10/TaskProcessesPage.d.ts +13 -0
  73. package/dist/pages/8.10/TaskProcessesPage.js +68 -0
  74. package/dist/pages/8.10/UtilitiesPage.d.ts +47 -0
  75. package/dist/pages/8.10/UtilitiesPage.js +489 -0
  76. package/dist/tests/8.10/access-user-role-management.spec.d.ts +1 -0
  77. package/dist/tests/8.10/access-user-role-management.spec.js +323 -0
  78. package/dist/tests/8.10/agentic-ai-user-flows.spec.d.ts +1 -0
  79. package/dist/tests/8.10/agentic-ai-user-flows.spec.js +185 -0
  80. package/dist/tests/8.10/api-tests-v2.spec.d.ts +1 -0
  81. package/dist/tests/8.10/api-tests-v2.spec.js +20 -0
  82. package/dist/tests/8.10/aws-cluster-user-flows.spec.d.ts +1 -0
  83. package/dist/tests/8.10/aws-cluster-user-flows.spec.js +178 -0
  84. package/dist/tests/8.10/cluster-variables.spec.d.ts +1 -0
  85. package/dist/tests/8.10/cluster-variables.spec.js +70 -0
  86. package/dist/tests/8.10/connectors-user-flows.spec.d.ts +1 -0
  87. package/dist/tests/8.10/connectors-user-flows.spec.js +479 -0
  88. package/dist/tests/8.10/console-user-flows.spec.d.ts +1 -0
  89. package/dist/tests/8.10/console-user-flows.spec.js +187 -0
  90. package/dist/tests/8.10/hto-user-flows.spec.d.ts +1 -0
  91. package/dist/tests/8.10/hto-user-flows.spec.js +471 -0
  92. package/dist/tests/8.10/idp-user-flows.spec.d.ts +1 -0
  93. package/dist/tests/8.10/idp-user-flows.spec.js +214 -0
  94. package/dist/tests/8.10/login-negative-tests.spec.d.ts +1 -0
  95. package/dist/tests/8.10/login-negative-tests.spec.js +29 -0
  96. package/dist/tests/8.10/login.spec.d.ts +1 -0
  97. package/dist/tests/8.10/login.spec.js +26 -0
  98. package/dist/tests/8.10/navigation.spec.d.ts +1 -0
  99. package/dist/tests/8.10/navigation.spec.js +65 -0
  100. package/dist/tests/8.10/operate-access-flow.spec.d.ts +1 -0
  101. package/dist/tests/8.10/operate-access-flow.spec.js +51 -0
  102. package/dist/tests/8.10/optimize-api-tests.spec.d.ts +1 -0
  103. package/dist/tests/8.10/optimize-api-tests.spec.js +268 -0
  104. package/dist/tests/8.10/optimize-user-flows.spec.d.ts +1 -0
  105. package/dist/tests/8.10/optimize-user-flows.spec.js +255 -0
  106. package/dist/tests/8.10/play.spec.d.ts +1 -0
  107. package/dist/tests/8.10/play.spec.js +85 -0
  108. package/dist/tests/8.10/rba-enabled-v1-user-flows.spec.d.ts +1 -0
  109. package/dist/tests/8.10/rba-enabled-v1-user-flows.spec.js +443 -0
  110. package/dist/tests/8.10/rba-enabled-v2-user-flows.spec.d.ts +1 -0
  111. package/dist/tests/8.10/rba-enabled-v2-user-flows.spec.js +446 -0
  112. package/dist/tests/8.10/smoke-tests.spec.d.ts +1 -0
  113. package/dist/tests/8.10/smoke-tests.spec.js +181 -0
  114. package/dist/tests/8.10/test-setup.spec.d.ts +1 -0
  115. package/dist/tests/8.10/test-setup.spec.js +94 -0
  116. package/dist/tests/8.10/utr-enabled-user-flows.spec.d.ts +1 -0
  117. package/dist/tests/8.10/utr-enabled-user-flows.spec.js +182 -0
  118. package/dist/tests/8.10/web-modeler-user-flows.spec.d.ts +1 -0
  119. package/dist/tests/8.10/web-modeler-user-flows.spec.js +544 -0
  120. package/package.json +1 -1
@@ -0,0 +1,1166 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModelerCreatePage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const sleep_1 = require("../../utils/sleep");
6
+ const ConnectorMarketplacePage_1 = require("./ConnectorMarketplacePage");
7
+ const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
8
+ class ModelerCreatePage {
9
+ page;
10
+ generalPanel;
11
+ deployDiagramDialog;
12
+ processIdInput;
13
+ startEventElement;
14
+ appendTaskButton;
15
+ changeTypeButton;
16
+ userTaskOption;
17
+ appendEndEventButton;
18
+ startInstanceSubButton;
19
+ viewProcessInstanceLink;
20
+ nameInput;
21
+ diagramBreadcrumb;
22
+ renameDiagramNameButton;
23
+ diagramNameInput;
24
+ variableInput;
25
+ embedFormButton;
26
+ embedButton;
27
+ newForm;
28
+ deploySubButton;
29
+ deployMenuItem;
30
+ additionalActionsButton;
31
+ cancelButton;
32
+ restConnectorOption;
33
+ webhookMessageStartEventConnectorOption;
34
+ webhookTab;
35
+ webhookIsActiveButton;
36
+ copyWebhookUrlToClipboardButton;
37
+ createTask;
38
+ createEndEvent;
39
+ canvas;
40
+ endEventCanvas;
41
+ connectToOtherElementButton;
42
+ firstPlacedElement;
43
+ secondPlacedElement;
44
+ appendElementButton;
45
+ payloadInput;
46
+ marketPlaceButton;
47
+ publicHolidayConnectorOption;
48
+ publicHolidayYearOption;
49
+ publicHolidayCountryCodeOption;
50
+ implementationSection;
51
+ implementationOptions;
52
+ intermediateBoundaryEvent;
53
+ intermediateWebhookConnectorOption;
54
+ correlationKeyProcessInput;
55
+ correlationKeyPayloadInput;
56
+ firstElement;
57
+ secondElement;
58
+ thirdElement;
59
+ payloadNameInput;
60
+ payloadNumberInput;
61
+ payloadCheckboxInput;
62
+ payloadDateInput;
63
+ form;
64
+ formPropertySection;
65
+ formLinkingTypeDropdown;
66
+ formLinkTypeOptions;
67
+ addFormJsonConfigurationInput;
68
+ publicationSection;
69
+ publicAccessToggle;
70
+ publicationTab;
71
+ copyPublicLinkButton;
72
+ closeButton;
73
+ rbaEnabledDeployedDialog;
74
+ viewProcessLink;
75
+ appendGatewayButton;
76
+ parallelGatewayOption;
77
+ firstPlacedGateway;
78
+ secondPlacedGateway;
79
+ serviceTaskOption;
80
+ taskDefinitionPanel;
81
+ jobTypeInput;
82
+ playTab;
83
+ continueToPlayButton;
84
+ assigneeInput;
85
+ candidateGroupsInput;
86
+ candidateUsersInput;
87
+ assignmentSection;
88
+ priorityInput;
89
+ startEventVariableInputWithThreeVariables;
90
+ zeebeRestAddressVariable;
91
+ variableAssignmentValueTextbox;
92
+ zeebeSecretVariable;
93
+ variableAssignmentValueTextboxSecondVariable;
94
+ zeebeClientIdVariable;
95
+ variableAssignmentValueTextboxThirdVariable;
96
+ connectorsDocHandlingStartEventElement;
97
+ timerEventOption;
98
+ timerEventSettings;
99
+ timerType;
100
+ timerValue;
101
+ eighthPlacedElement;
102
+ deployAndRunMainButton;
103
+ deployAndRunSubButton;
104
+ dialog;
105
+ backupDeployButton;
106
+ globalConnectToolButton;
107
+ formLinkedSuccessMessage;
108
+ diagramNameBreadcrumb;
109
+ constructor(page) {
110
+ this.page = page;
111
+ this.generalPanel = page.locator('[data-group-id="group-general"]');
112
+ this.processIdInput = page.getByLabel('ID', { exact: true });
113
+ this.startEventElement = page.locator('.djs-hit').first();
114
+ this.appendElementButton = page
115
+ .locator('[class="djs-create-pad open djs-append-create-pad"]')
116
+ .first();
117
+ this.appendTaskButton = page.getByTitle('Append task');
118
+ this.changeTypeButton = page.getByRole('button', {
119
+ name: 'Change element',
120
+ exact: true,
121
+ });
122
+ this.userTaskOption = page
123
+ .getByRole('listitem', { name: 'User task' })
124
+ .locator('span')
125
+ .first();
126
+ this.priorityInput = page.getByRole('textbox', { name: 'priority' });
127
+ this.appendEndEventButton = page.getByTitle('Append end event');
128
+ this.dialog = page.getByRole('dialog');
129
+ this.deployAndRunMainButton = page.getByRole('button', {
130
+ name: 'Deploy & run',
131
+ exact: true,
132
+ });
133
+ this.deployAndRunSubButton = this.dialog.getByRole('button', {
134
+ name: 'Deploy & run',
135
+ exact: true,
136
+ });
137
+ this.startInstanceSubButton = page
138
+ .getByRole('button', { name: 'Run' })
139
+ .last();
140
+ this.viewProcessInstanceLink = page.getByRole('button', {
141
+ name: 'View process instance',
142
+ });
143
+ this.viewProcessLink = page.getByRole('button', {
144
+ name: 'View process in Operate',
145
+ });
146
+ this.nameInput = page.getByLabel('Name', { exact: true });
147
+ this.diagramBreadcrumb = page.locator('[data-test="breadcrumb-diagram"]');
148
+ this.renameDiagramNameButton = page.getByText('Rename');
149
+ this.diagramNameInput = page.locator('[data-test="editable-input"]');
150
+ this.variableInput = page.getByLabel('Variables');
151
+ this.embedFormButton = page.getByRole('button', { name: 'Link form' });
152
+ this.embedButton = page.locator('[data-test="confirm-move"]');
153
+ this.newForm = page
154
+ .locator('[data-test="item-New form"]')
155
+ .getByText('New form');
156
+ this.deploySubButton = page.locator('[data-test="deploy-action"]');
157
+ this.cancelButton = page.getByRole('button', { name: 'Cancel' });
158
+ this.restConnectorOption = page.getByRole('listitem', {
159
+ name: 'REST Outbound Connector',
160
+ exact: true,
161
+ });
162
+ this.webhookMessageStartEventConnectorOption = page.getByRole('listitem', {
163
+ name: 'Webhook Message Start Event Connector',
164
+ exact: true,
165
+ });
166
+ this.webhookTab = page.getByRole('tab', { name: 'Webhook' });
167
+ this.webhookIsActiveButton = page.getByRole('button', {
168
+ name: 'Webhook is active in Test',
169
+ });
170
+ this.copyWebhookUrlToClipboardButton = page
171
+ .getByRole('textbox', {
172
+ name: 'Copy to clipboard',
173
+ })
174
+ .first();
175
+ this.createTask = page.getByTitle('Create task');
176
+ this.createEndEvent = page.getByTitle('Create end event');
177
+ this.canvas = page.locator('rect').nth(1);
178
+ this.endEventCanvas = page.locator('[class="bjs-container"]');
179
+ this.connectToOtherElementButton = page
180
+ .getByLabel('Connect to other element')
181
+ .locator('path');
182
+ this.firstPlacedElement = page.locator('g:nth-child(2) > .djs-element > .djs-hit');
183
+ this.secondPlacedElement = page.locator('g:nth-child(2) > .djs-element > .djs-hit');
184
+ this.payloadInput = page.locator('[class="fjs-input"]');
185
+ this.marketPlaceButton = page.getByTitle('Browse Marketplace for more Connectors');
186
+ this.publicHolidayConnectorOption = page
187
+ .locator('[data-test="modeler"]')
188
+ .getByText('Worldwide Public Holiday');
189
+ this.publicHolidayYearOption = page.getByLabel('Year');
190
+ this.publicHolidayCountryCodeOption = page.getByLabel('Countrycode');
191
+ this.implementationSection = page.locator('[data-group-id="group-userTaskImplementation"]');
192
+ this.implementationOptions = page.locator('#bio-properties-panel-userTaskImplementation');
193
+ this.intermediateBoundaryEvent = page.getByTitle('Append intermediate/boundary');
194
+ this.intermediateWebhookConnectorOption = page.getByRole('listitem', {
195
+ name: 'Webhook Intermediate Event',
196
+ });
197
+ this.correlationKeyPayloadInput = page.getByLabel('Correlation key (payload)');
198
+ this.correlationKeyProcessInput = page.getByLabel('Correlation key (process)');
199
+ this.form = page.locator('[class="fjs-container"]');
200
+ this.firstElement = page.locator('[class="djs-element djs-shape"]').nth(0);
201
+ this.secondElement = page.locator('[class="djs-element djs-shape"]').nth(1);
202
+ this.thirdElement = page.locator('[class="djs-element djs-shape"]').nth(2);
203
+ this.processIdInput = page.getByLabel('ID', { exact: true });
204
+ this.payloadNameInput = page.getByLabel('Full Name');
205
+ this.payloadDateInput = page.getByLabel('Date of Birth');
206
+ this.payloadCheckboxInput = this.form.getByLabel('Agree');
207
+ this.payloadNumberInput = this.form.getByLabel('Count');
208
+ this.formPropertySection = page.locator('[data-group-id="group-form"]');
209
+ this.formLinkingTypeDropdown = page.getByLabel('Type');
210
+ this.formLinkTypeOptions = page.locator('#bio-properties-panel-formType');
211
+ this.addFormJsonConfigurationInput = page.getByLabel('Form JSON configuration');
212
+ this.publicationSection = page.locator('[data-group-id="group-process-publication"]');
213
+ this.publicAccessToggle = page.getByRole('switch', {
214
+ name: 'Toggle public access',
215
+ });
216
+ this.publicationTab = page.getByRole('tab', { name: 'Publication' });
217
+ this.copyPublicLinkButton = page.getByRole('button', {
218
+ name: 'Copy to clipboard',
219
+ });
220
+ this.closeButton = page.getByRole('button', { name: 'Close' });
221
+ this.rbaEnabledDeployedDialog = page.getByRole('dialog', {
222
+ name: 'Process successfully deployed',
223
+ });
224
+ this.deployDiagramDialog = page.getByRole('dialog', {
225
+ name: 'Deploy diagram',
226
+ });
227
+ this.appendGatewayButton = page.getByTitle('append gateway');
228
+ this.parallelGatewayOption = page.getByText('parallel gateway');
229
+ this.firstPlacedGateway = page
230
+ .locator('[data-element-id*="Gateway"]')
231
+ .first();
232
+ this.secondPlacedGateway = page
233
+ .locator('[data-element-id*="Gateway"]')
234
+ .last();
235
+ this.serviceTaskOption = page.getByRole('listitem', { name: 'Service Task' });
236
+ this.taskDefinitionPanel = page.locator('[data-group-id="group-taskDefinition"]');
237
+ this.jobTypeInput = page.getByRole('textbox', { name: /job type/i });
238
+ this.playTab = page.getByRole('tab', {
239
+ name: 'Play',
240
+ });
241
+ this.continueToPlayButton = page.getByRole('button', { name: 'Continue' });
242
+ this.assignmentSection = page.locator('[data-group-id="group-assignmentDefinition"]');
243
+ this.assigneeInput = page.getByRole('textbox', { name: 'assignee' });
244
+ this.candidateGroupsInput = page.getByRole('textbox', {
245
+ name: 'candidate groups',
246
+ });
247
+ this.candidateUsersInput = page.getByRole('textbox', {
248
+ name: 'candidate users',
249
+ });
250
+ this.appendGatewayButton = page.getByTitle('append gateway');
251
+ this.parallelGatewayOption = page.getByText('parallel gateway');
252
+ this.firstPlacedGateway = page
253
+ .locator('[data-element-id*="Gateway"]')
254
+ .first();
255
+ this.secondPlacedGateway = page
256
+ .locator('[data-element-id*="Gateway"]')
257
+ .last();
258
+ this.startEventVariableInputWithThreeVariables =
259
+ page.getByText('Output mapping3');
260
+ this.zeebeRestAddressVariable = page
261
+ .locator('[data-test="properties-panel"]')
262
+ .getByText('zeebeRestAdress');
263
+ this.variableAssignmentValueTextbox = page.getByRole('textbox', {
264
+ name: 'Variable assignment value',
265
+ });
266
+ this.zeebeSecretVariable = page
267
+ .locator('[data-test="properties-panel"]')
268
+ .getByText('zeebeSecret');
269
+ this.variableAssignmentValueTextboxSecondVariable = page.locator('#bio-properties-panel-StartEvent_1-output-1-source div');
270
+ this.zeebeClientIdVariable = page
271
+ .locator('[data-test="properties-panel"]')
272
+ .getByText('zeebeClientId');
273
+ this.variableAssignmentValueTextboxThirdVariable = page.locator('#bio-properties-panel-StartEvent_1-output-2-source div');
274
+ this.connectorsDocHandlingStartEventElement = page.locator('g:nth-child(5) > .djs-element > .djs-hit');
275
+ this.timerEventOption = page.getByRole('listitem', {
276
+ name: 'Timer intermediate catch event',
277
+ exact: true,
278
+ });
279
+ this.timerEventSettings = page.getByText(/^Timer$/).first();
280
+ this.timerType = page.getByLabel('Type');
281
+ this.timerValue = page.getByLabel('Value');
282
+ this.eighthPlacedElement = page
283
+ .locator('g:nth-child(8) > .djs-element > .djs-hit')
284
+ .first();
285
+ this.additionalActionsButton = page.getByRole('button', {
286
+ name: 'Additional actions',
287
+ });
288
+ this.deployMenuItem = page.getByRole('menuitem', {
289
+ name: 'Deploy',
290
+ });
291
+ this.backupDeployButton = page.getByRole('button', {
292
+ name: 'Deploy',
293
+ });
294
+ this.globalConnectToolButton = page.locator('[title="Activate global connect tool"]');
295
+ this.formLinkedSuccessMessage = page
296
+ .locator('.cds--toast-notification__subtitle')
297
+ .getByText('Form has been successfully linked.');
298
+ this.diagramNameBreadcrumb = (diagramName) => page.locator('button[data-test="breadcrumb-diagram"]', {
299
+ hasText: diagramName,
300
+ });
301
+ }
302
+ async clickSecondDeployButton() {
303
+ await this.deployAndRunMainButton
304
+ .or(this.backupDeployButton)
305
+ .click({ timeout: 30000 });
306
+ }
307
+ async modelJobWorkerDiagram(processName, embedFrom = false, processId = '') {
308
+ await (0, test_1.expect)(this.generalPanel).toBeVisible({
309
+ timeout: 120000,
310
+ });
311
+ await this.enterDiagramName(processName);
312
+ await (0, sleep_1.sleep)(10000);
313
+ if (processId.length > 0) {
314
+ await this.clickStartEventElement();
315
+ await this.clickGeneralPropertiesPanel();
316
+ await this.clickIdInput();
317
+ await this.fillIdInput(processId);
318
+ await this.clickStartEventElement();
319
+ }
320
+ await this.clickAppendElementButton();
321
+ await this.clickAppendTaskButton();
322
+ await this.clickChangeTypeButton();
323
+ await this.clickUserTaskOption();
324
+ await this.chooseImplementationOption('jobWorker');
325
+ await (0, sleep_1.sleep)(3000);
326
+ if (embedFrom) {
327
+ await this.chooseFormLinkingTypeOption('Camunda Form (embedded)');
328
+ }
329
+ await this.clickAppendElementButton();
330
+ await this.clickAppendEndEventButton();
331
+ await (0, sleep_1.sleep)(20000);
332
+ }
333
+ async modelCamundaUserTaskDiagram(processName, processId = '', formName = '') {
334
+ await (0, test_1.expect)(this.generalPanel).toBeVisible({
335
+ timeout: 180000,
336
+ });
337
+ await this.enterDiagramName(processName);
338
+ await (0, sleep_1.sleep)(15000);
339
+ if (processId.length > 0) {
340
+ await this.clickStartEventElement();
341
+ await this.clickGeneralPropertiesPanel();
342
+ await this.clickIdInput();
343
+ await this.fillIdInput(processId);
344
+ await this.clickStartEventElement();
345
+ }
346
+ await this.clickAppendElementButton();
347
+ await this.clickAppendTaskButton();
348
+ await this.clickChangeTypeButton();
349
+ await this.clickUserTaskOption();
350
+ await this.assertImplementationOption('zeebeUserTask');
351
+ if (formName.length > 0) {
352
+ await this.clickEmbedFormButton();
353
+ await this.clickForm(formName);
354
+ await this.clickEmbedButton();
355
+ }
356
+ await this.clickAppendElementButton();
357
+ await this.clickAppendEndEventButton();
358
+ await this.clickCanvas();
359
+ await this.assertThreeElementsVisible();
360
+ await (0, sleep_1.sleep)(20000);
361
+ }
362
+ async assignToCandidateGroup(taskName, candidateGroup, assignee) {
363
+ await this.clickCanvas();
364
+ await this.selectUserTask(taskName);
365
+ await this.expandAssignmentSection();
366
+ await this.clickCandidateGroupsInput();
367
+ await this.fillCandidateGroupsInput(candidateGroup);
368
+ if (assignee) {
369
+ await this.clickAssigneeInput();
370
+ await this.fillAssigneeInput(assignee);
371
+ }
372
+ }
373
+ async assignToCandidateUser(taskName, candidateUser, assignee) {
374
+ await this.clickCanvas();
375
+ await this.selectUserTask(taskName);
376
+ await this.expandAssignmentSection();
377
+ await this.clickCandidateUsersInput();
378
+ await this.fillCandidateUsersInput(candidateUser);
379
+ if (assignee) {
380
+ await this.clickAssigneeInput();
381
+ await this.fillAssigneeInput(assignee);
382
+ }
383
+ }
384
+ async expandAssignmentSection() {
385
+ const isExpanded = (await this.assignmentSection
386
+ .locator('[data-group-id="group-assignmentDefinition"] .bio-properties-panel-group-header.open')
387
+ .count()) > 0;
388
+ if (!isExpanded) {
389
+ await this.assignmentSection.click({ timeout: 60000 });
390
+ }
391
+ }
392
+ async expandFormsSection() {
393
+ const isExpanded = (await this.formPropertySection
394
+ .locator('[data-group-id="group-form"] .bio-properties-panel-group-header.open')
395
+ .count()) > 0;
396
+ if (!isExpanded) {
397
+ await this.formPropertySection.click({ timeout: 60000 });
398
+ }
399
+ }
400
+ async clickAssigneeInput() {
401
+ await this.assigneeInput.click({ timeout: 60000 });
402
+ }
403
+ async fillAssigneeInput(name) {
404
+ await this.assigneeInput.fill(name, { timeout: 60000 });
405
+ await this.page.waitForTimeout(1000);
406
+ }
407
+ async clickCandidateGroupsInput() {
408
+ await this.candidateGroupsInput.click({ timeout: 60000 });
409
+ }
410
+ async fillCandidateGroupsInput(name) {
411
+ await this.candidateGroupsInput.fill(name, { timeout: 60000 });
412
+ await this.page.waitForTimeout(1000);
413
+ }
414
+ async clickCandidateUsersInput() {
415
+ await this.candidateUsersInput.click({ timeout: 60000 });
416
+ }
417
+ async fillCandidateUsersInput(candidateUser) {
418
+ await this.candidateUsersInput.fill(candidateUser, { timeout: 60000 });
419
+ await this.page.waitForTimeout(1000);
420
+ }
421
+ async selectUserTask(userTask) {
422
+ await this.page.locator(`[data-element-id="${userTask}"]`).click();
423
+ }
424
+ async clickGeneralPropertiesPanel() {
425
+ const isExpanded = (await this.generalPanel
426
+ .locator('.bio-properties-panel-group-header.open')
427
+ .count()) > 0;
428
+ if (!isExpanded) {
429
+ await this.generalPanel.click({ timeout: 60000 });
430
+ }
431
+ }
432
+ async clickProcessIdInput() {
433
+ await this.processIdInput.click({ timeout: 60000 });
434
+ }
435
+ async fillProcessIdInput(id) {
436
+ await this.processIdInput.fill(id, { timeout: 60000 });
437
+ }
438
+ async clickStartEventElement() {
439
+ await (0, test_1.expect)(this.startEventElement).toBeVisible({ timeout: 15000 });
440
+ await this.startEventElement.click();
441
+ }
442
+ async clickAppendTaskButton() {
443
+ await (0, test_1.expect)(this.appendTaskButton).toBeVisible({ timeout: 15000 });
444
+ await this.appendTaskButton.click();
445
+ }
446
+ async clickChangeTypeButton() {
447
+ await (0, test_1.expect)(this.changeTypeButton).toBeVisible({ timeout: 15000 });
448
+ await this.changeTypeButton.click();
449
+ }
450
+ async clickUserTaskOption() {
451
+ await (0, test_1.expect)(this.userTaskOption).toBeVisible({ timeout: 15000 });
452
+ await this.userTaskOption.click();
453
+ }
454
+ async clickForm(name) {
455
+ await this.page
456
+ .locator(`[data-test="item-${name}"]`)
457
+ .getByText(name)
458
+ .click({ timeout: 90000 });
459
+ }
460
+ async clickUserTask(id) {
461
+ const priorityUserTask = this.page.locator(`[data-element-id="${id}"]`);
462
+ await priorityUserTask.click({ timeout: 60000 });
463
+ }
464
+ async clickAppendEndEventButton(parentElement) {
465
+ try {
466
+ await this.appendEndEventButton.click({ timeout: 120000 });
467
+ }
468
+ catch (error) {
469
+ await this.page.reload();
470
+ await (0, sleep_1.sleep)(10000);
471
+ if (parentElement == undefined) {
472
+ await this.clickSecondPlacedElement();
473
+ }
474
+ else if (parentElement == 'parallelGateway') {
475
+ await this.clickSecondPlacedGateway();
476
+ }
477
+ await this.appendElementButton.hover();
478
+ await this.appendEndEventButton.click({ timeout: 120000 });
479
+ }
480
+ }
481
+ async fillPriorityInput(priority) {
482
+ await this.priorityInput.fill(priority, { timeout: 60000 });
483
+ await (0, test_1.expect)(this.page
484
+ .getByText('Must be an expression, or an integer between 0 and 100')
485
+ .first()).not.toBeVisible({ timeout: 30000 });
486
+ await this.page.waitForTimeout(1000);
487
+ }
488
+ async clickPriorityInput() {
489
+ const isExpanded = (await this.assignmentSection
490
+ .locator('.bio-properties-panel-group-header empty open')
491
+ .count()) > 0;
492
+ if (!isExpanded) {
493
+ await this.assignmentSection.click();
494
+ }
495
+ await this.priorityInput.click({ timeout: 30000 });
496
+ }
497
+ async setPriority(taskName, priority, numberOfTasks) {
498
+ for (let i = 1; i <= numberOfTasks; i++) {
499
+ const userTaskId = taskName + i;
500
+ const priorityUserTask = this.page.locator(`[data-element-id="${userTaskId}"]`);
501
+ await priorityUserTask.click({ timeout: 60000 });
502
+ await this.clickPriorityInput();
503
+ await this.fillPriorityInput(priority.toString());
504
+ await this.clickCanvas();
505
+ priority += 25;
506
+ }
507
+ }
508
+ async clickCloseButton() {
509
+ await this.closeButton.click({ timeout: 60000 });
510
+ }
511
+ async clickAdditionalActionsButton() {
512
+ await (0, test_1.expect)(this.additionalActionsButton).toBeVisible({ timeout: 20000 });
513
+ await this.additionalActionsButton.click({ timeout: 60000 });
514
+ }
515
+ async clickDeployMenuItem() {
516
+ await (0, test_1.expect)(this.deployMenuItem).toBeVisible({ timeout: 20000 });
517
+ await this.deployMenuItem.click({ timeout: 60000 });
518
+ }
519
+ async deployDiagram(clusterName) {
520
+ await this.clickDeployButtonWithRetry();
521
+ await (0, test_1.expect)(this.deployDiagramDialog).toBeVisible({
522
+ timeout: 30000,
523
+ });
524
+ await this.selectCluster(clusterName);
525
+ await this.clickDeploySubButtonWithRetry(clusterName);
526
+ await (0, test_1.expect)(this.viewProcessLink).toBeVisible({ timeout: 30000 });
527
+ await (0, test_1.expect)(this.viewProcessLink).toBeHidden({ timeout: 30000 });
528
+ }
529
+ async clickStartInstanceMainButton() {
530
+ await this.deployAndRunMainButton.click({ timeout: 30000 });
531
+ }
532
+ async clickStartInstanceSubButton() {
533
+ await this.deployAndRunSubButton.click({ timeout: 30000 });
534
+ }
535
+ async runProcessInstance(clusterName, variables = '', formVariables = {}, textToVisible = '', hasDeploymentPermission = true) {
536
+ const maxRetries = 10;
537
+ const retryDelayMs = 20000;
538
+ for (let attempt = 1; attempt <= maxRetries; attempt++) {
539
+ try {
540
+ await this.clickStartInstanceMainButton();
541
+ await this.selectCluster(clusterName);
542
+ if (variables.length > 0) {
543
+ await (0, test_1.expect)(this.variableInput).toBeVisible({ timeout: 60000 });
544
+ await this.clickVariableInput();
545
+ await this.fillVariableInput(variables);
546
+ }
547
+ if (Object.keys(formVariables).length > 0) {
548
+ if (formVariables.formName) {
549
+ await this.fillStartFormName(formVariables.formName);
550
+ }
551
+ if (formVariables.checkbox === 'true') {
552
+ await this.checkStartFormCheckbox();
553
+ }
554
+ if (formVariables.startDate) {
555
+ await this.fillStartFormDate(formVariables.startDate);
556
+ }
557
+ if (formVariables.startNumber) {
558
+ await this.fillStartFormNumber(formVariables.startNumber);
559
+ }
560
+ }
561
+ if (textToVisible.length > 0) {
562
+ await (0, test_1.expect)(this.dialog.getByText(textToVisible)).toBeVisible({
563
+ timeout: 30000,
564
+ });
565
+ }
566
+ await this.clickStartInstanceSubButton();
567
+ if (hasDeploymentPermission) {
568
+ try {
569
+ await (0, test_1.expect)(this.viewProcessInstanceLink).toBeVisible({
570
+ timeout: 30000,
571
+ });
572
+ return;
573
+ }
574
+ catch (error) {
575
+ throw new Error('Process instance link not visible after starting process');
576
+ }
577
+ }
578
+ else {
579
+ return;
580
+ }
581
+ }
582
+ catch (error) {
583
+ console.warn(`Attempt ${attempt} failed: ${error instanceof Error ? error.message : error}`);
584
+ if (attempt === maxRetries) {
585
+ throw new Error(`runProcessInstance failed after ${maxRetries} attempts. Last error: ${error instanceof Error ? error.message : error}`);
586
+ }
587
+ await this.page.reload();
588
+ await this.page.waitForTimeout(retryDelayMs);
589
+ }
590
+ }
591
+ }
592
+ async selectCluster(clusterName) {
593
+ await (0, test_1.expect)(this.dialog).toBeVisible({ timeout: 30000 });
594
+ const healthCheckTimeout = 30000;
595
+ const healthyRegex = new RegExp(`${clusterName}.*?HealthydevManage`);
596
+ const cluster = this.dialog.getByText(clusterName);
597
+ await (0, test_1.expect)(cluster).toBeVisible({ timeout: 30000 });
598
+ await cluster.click();
599
+ await (0, test_1.expect)(this.dialog
600
+ .locator('label')
601
+ .filter({ hasText: clusterName })
602
+ .getByRole('switch')).toBeChecked({ timeout: 30000 });
603
+ await (0, test_1.expect)(this.dialog).toHaveText(healthyRegex, {
604
+ timeout: healthCheckTimeout,
605
+ });
606
+ }
607
+ async clickViewProcessInstanceLink() {
608
+ await this.viewProcessInstanceLink.click({ timeout: 180000 });
609
+ }
610
+ async clickNameInput() {
611
+ await this.nameInput.click({ timeout: 60000 });
612
+ }
613
+ async fillNamedInput(name) {
614
+ await this.nameInput.fill(name, { timeout: 60000 });
615
+ }
616
+ async clickDiagramBreadcrumb() {
617
+ await this.diagramBreadcrumb.click({ timeout: 10000 });
618
+ }
619
+ async clickEditDiagramNameButton() {
620
+ await this.renameDiagramNameButton.click({ timeout: 10000 });
621
+ }
622
+ async enterDiagramName(name) {
623
+ await this.diagramNameInput.fill(name, { timeout: 90000 });
624
+ await this.diagramNameInput.press('Enter', { timeout: 90000 });
625
+ }
626
+ async clickVariableInput() {
627
+ await this.variableInput.click({ timeout: 60000 });
628
+ }
629
+ async fillVariableInput(variable) {
630
+ await this.variableInput.fill(variable);
631
+ }
632
+ async clickEmbedFormButton() {
633
+ await this.embedFormButton.click({ timeout: 60000 });
634
+ }
635
+ async clickEmbedButton() {
636
+ await this.embedButton.click({ timeout: 60000 });
637
+ }
638
+ async clickNewForm() {
639
+ await this.newForm.click({ timeout: 120000 });
640
+ }
641
+ async clickDeploySubButton() {
642
+ await this.deploySubButton.click({ timeout: 120000, force: true });
643
+ }
644
+ async clickCancelButton() {
645
+ await this.cancelButton.click({ timeout: 60000 });
646
+ }
647
+ async clickRestConnectorOption() {
648
+ await (0, test_1.expect)(this.restConnectorOption).toBeVisible({ timeout: 15000 });
649
+ await this.restConnectorOption.click();
650
+ }
651
+ async clickWebhookStartEventConnectorOption() {
652
+ await this.webhookMessageStartEventConnectorOption.click({ timeout: 60000 });
653
+ }
654
+ async clickWebhookTab() {
655
+ await this.webhookTab.click({ timeout: 60000 });
656
+ }
657
+ async clickWebhookIsActiveButton() {
658
+ await this.webhookIsActiveButton.click({ timeout: 60000 });
659
+ }
660
+ async assertThreeElementsVisible() {
661
+ await (0, test_1.expect)(this.firstElement).toBeVisible({ timeout: 30000 });
662
+ await (0, test_1.expect)(this.secondElement).toBeVisible({ timeout: 30000 });
663
+ await (0, test_1.expect)(this.thirdElement).toBeVisible({ timeout: 30000 });
664
+ }
665
+ async clickDeployButtonWithRetry(retries = 3) {
666
+ for (let i = 0; i < retries; i++) {
667
+ try {
668
+ await this.clickAdditionalActionsButton();
669
+ await this.clickDeployMenuItem();
670
+ return;
671
+ }
672
+ catch (error) {
673
+ console.error(`Attempt ${i + 1} to click deploy button failed: ${error}`);
674
+ await this.page.reload();
675
+ await (0, sleep_1.sleep)(10000);
676
+ }
677
+ }
678
+ throw new Error(`Failed to click deploy button after ${retries} retries`);
679
+ }
680
+ async clickDeploySubButtonWithRetry(clusterName) {
681
+ const retries = 3;
682
+ for (let i = 0; i < retries; i++) {
683
+ try {
684
+ await (0, test_1.expect)(this.deploySubButton).toBeVisible({ timeout: 20000 });
685
+ await (0, test_1.expect)(this.deploySubButton).toBeEnabled();
686
+ await this.deploySubButton.click({ force: true });
687
+ await (0, test_1.expect)(this.dialog).not.toBeVisible();
688
+ return;
689
+ }
690
+ catch (error) {
691
+ console.error(`Attempt ${i + 1} to click deploy button failed: ${error}`);
692
+ await this.page.reload();
693
+ await (0, sleep_1.sleep)(10000);
694
+ await this.clickDeployButtonWithRetry();
695
+ await this.selectCluster(clusterName);
696
+ }
697
+ }
698
+ throw new Error(`Failed to click deploy button after ${retries} retries`);
699
+ }
700
+ async clickCreateTask() {
701
+ await this.createTask.click({ timeout: 60000 });
702
+ }
703
+ async clickCreateEndEvent() {
704
+ await this.createEndEvent.click({ timeout: 60000 });
705
+ }
706
+ async clickCanvas() {
707
+ await this.canvas.click({ timeout: 60000 });
708
+ }
709
+ async clickEndEventCanvas() {
710
+ await this.endEventCanvas.click({ timeout: 60000 });
711
+ }
712
+ async clickConnectToOtherElementButton() {
713
+ await (0, test_1.expect)(this.connectToOtherElementButton).toBeVisible({
714
+ timeout: 60000,
715
+ });
716
+ await this.connectToOtherElementButton.click({ timeout: 60000 });
717
+ }
718
+ async clickFirstPlacedElement() {
719
+ await (0, test_1.expect)(this.firstPlacedElement).toBeVisible({ timeout: 60000 });
720
+ await this.firstPlacedElement.click({ timeout: 60000 });
721
+ }
722
+ async clickSecondPlacedElement() {
723
+ await this.secondPlacedElement.click({ timeout: 60000 });
724
+ }
725
+ async clickSecondElement() {
726
+ await (0, test_1.expect)(this.secondElement).toBeVisible({ timeout: 60000 });
727
+ await this.secondElement.click({ timeout: 60000 });
728
+ }
729
+ async clickAppendElementButton() {
730
+ const maxRetries = 3;
731
+ for (let retries = 0; retries < maxRetries; retries++) {
732
+ try {
733
+ await this.page.waitForTimeout(1000);
734
+ await (0, test_1.expect)(this.appendElementButton).toBeVisible({ timeout: 10000 });
735
+ await this.appendElementButton.hover({ force: true });
736
+ return;
737
+ }
738
+ catch (error) {
739
+ console.error(`Click attempt to append element ${retries + 1} failed: ${error}`);
740
+ }
741
+ }
742
+ throw new Error(`Failed to hover append element after ${maxRetries} attempts.`);
743
+ }
744
+ async clickMarketPlaceButton() {
745
+ const maxRetries = 3;
746
+ for (let retries = 0; retries < maxRetries; retries++) {
747
+ try {
748
+ if (retries === 0) {
749
+ await this.marketPlaceButton.click({ timeout: 30000 });
750
+ }
751
+ else {
752
+ await this.changeTypeButton.click({ force: true, timeout: 30000 });
753
+ await this.marketPlaceButton.click({ timeout: 30000 });
754
+ }
755
+ return;
756
+ }
757
+ catch (error) {
758
+ console.error(`Click attempt ${retries + 1} failed: ${error}`);
759
+ await new Promise((resolve) => setTimeout(resolve, 10000));
760
+ }
761
+ }
762
+ throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
763
+ }
764
+ async clickPublicHolidayConnectorOption() {
765
+ const maxRetries = 4;
766
+ for (let retries = 0; retries < maxRetries; retries++) {
767
+ try {
768
+ if (retries <= 2) {
769
+ await this.publicHolidayConnectorOption.click({ timeout: 60000 });
770
+ }
771
+ else {
772
+ await this.clickMarketPlaceButton();
773
+ const connectorMarketplacePage = new ConnectorMarketplacePage_1.ConnectorMarketplacePage(this.page);
774
+ await connectorMarketplacePage.clickSearchForConnectorTextbox();
775
+ await connectorMarketplacePage.fillSearchForConnectorTextbox('Public Holiday Connector');
776
+ await (0, sleep_1.sleep)(10000);
777
+ await connectorMarketplacePage.downloadConnectorToProject();
778
+ await this.publicHolidayConnectorOption.click({ timeout: 120000 });
779
+ }
780
+ return;
781
+ }
782
+ catch (error) {
783
+ console.error(`Click attempt ${retries + 1} failed: ${error}`);
784
+ await this.page.reload();
785
+ await new Promise((resolve) => setTimeout(resolve, 10000));
786
+ await this.clickCanvas();
787
+ await this.secondElement.click({ timeout: 60000 });
788
+ await this.clickChangeTypeButton();
789
+ }
790
+ }
791
+ throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
792
+ }
793
+ async clickPublicHolidayYearOption() {
794
+ await this.publicHolidayYearOption.click({ timeout: 60000 });
795
+ }
796
+ async fillPublicHolidayYearOption(year) {
797
+ await this.publicHolidayYearOption.fill(year);
798
+ }
799
+ async clickPublicHolidayCountryCodeOption() {
800
+ await this.publicHolidayCountryCodeOption.click({ timeout: 60000 });
801
+ }
802
+ async fillPublicHolidayCountryCodeOption(countryCode) {
803
+ await this.publicHolidayCountryCodeOption.fill(countryCode);
804
+ }
805
+ async chooseImplementationOption(implementationType) {
806
+ await this.implementationSection.click();
807
+ if ((await this.implementationOptions.inputValue()) == implementationType) {
808
+ console.log(`${implementationType} is already selected.`);
809
+ }
810
+ else {
811
+ await this.implementationOptions.selectOption(implementationType);
812
+ }
813
+ await this.assertImplementationOption(implementationType);
814
+ }
815
+ async assertImplementationOption(implementationType) {
816
+ await this.expandImplementationOptionIfNecessary();
817
+ (0, test_1.expect)(await this.implementationOptions.inputValue()).toEqual(implementationType);
818
+ }
819
+ async expandImplementationOptionIfNecessary() {
820
+ const isExpanded = (await this.implementationSection
821
+ .locator('.bio-properties-panel-group-header empty open')
822
+ .count()) > 0;
823
+ if (!isExpanded) {
824
+ await this.implementationSection.click();
825
+ }
826
+ }
827
+ async clickIntermediateBoundaryEvent() {
828
+ await this.intermediateBoundaryEvent.click({ timeout: 60000 });
829
+ }
830
+ async clickIntermediateWebhookConnectorOption() {
831
+ await this.intermediateWebhookConnectorOption.click({ timeout: 60000 });
832
+ }
833
+ async clickCorrelationKeyProcessInput() {
834
+ await this.correlationKeyProcessInput.click({ timeout: 60000 });
835
+ }
836
+ async fillCorrelationKeyProcessInput(correlationKeyProcess) {
837
+ await this.correlationKeyProcessInput.fill(correlationKeyProcess);
838
+ }
839
+ async clickCorrelationKeyPayloadInput() {
840
+ await this.correlationKeyPayloadInput.click({ timeout: 60000 });
841
+ }
842
+ async fillCorrelationKeyPayloadInput(correlationKeyPayload) {
843
+ await this.correlationKeyPayloadInput.fill(correlationKeyPayload);
844
+ }
845
+ async clickIdInput() {
846
+ await this.processIdInput.click();
847
+ }
848
+ async fillIdInput(id) {
849
+ await this.processIdInput.fill(id);
850
+ }
851
+ async fillStartFormName(name) {
852
+ await this.payloadNameInput.fill(name);
853
+ }
854
+ async fillStartFormDate(date) {
855
+ await this.payloadDateInput.click();
856
+ await this.payloadDateInput.fill(date);
857
+ await this.payloadDateInput.press('Enter');
858
+ }
859
+ async checkStartFormCheckbox() {
860
+ await this.payloadCheckboxInput.check();
861
+ }
862
+ async fillStartFormNumber(number) {
863
+ await this.payloadNumberInput.fill(number);
864
+ }
865
+ async chooseFormLinkingTypeOption(formLinkType) {
866
+ await this.formPropertySection.click();
867
+ const jsonConfig = JSON.stringify({
868
+ executionPlatform: 'Camunda Cloud',
869
+ executionPlatformVersion: '8.6.0',
870
+ exporter: {
871
+ name: 'Camunda Web Modeler',
872
+ version: 'ca7603f',
873
+ },
874
+ schemaVersion: 17,
875
+ id: 'Form_0ex0ayi',
876
+ components: [
877
+ {
878
+ label: 'Full Name',
879
+ type: 'textfield',
880
+ id: 'Textfield_0',
881
+ validate: {
882
+ minLength: 2,
883
+ required: true,
884
+ },
885
+ key: 'fullName',
886
+ },
887
+ ],
888
+ generated: true,
889
+ type: 'default',
890
+ });
891
+ await this.formLinkTypeOptions.selectOption(formLinkType);
892
+ await this.addFormJsonConfigurationInput.click();
893
+ await this.addFormJsonConfigurationInput.fill(jsonConfig);
894
+ }
895
+ async clickAppendGatewayButton() {
896
+ await (0, test_1.expect)(this.appendGatewayButton).toBeVisible({ timeout: 30000 });
897
+ await this.appendGatewayButton.click({ timeout: 30000 });
898
+ }
899
+ async clickParallelGatewayOption() {
900
+ await (0, test_1.expect)(this.parallelGatewayOption).toBeVisible({ timeout: 30000 });
901
+ await this.parallelGatewayOption.click({ timeout: 90000 });
902
+ }
903
+ async clickFirstPlacedGateway() {
904
+ try {
905
+ await this.firstPlacedGateway.click({ timeout: 60000 });
906
+ await (0, test_1.expect)(this.appendElementButton).toBeVisible({ timeout: 60000 });
907
+ }
908
+ catch (error) {
909
+ await this.page.reload();
910
+ await (0, sleep_1.sleep)(10000);
911
+ await this.firstPlacedGateway.click({ timeout: 60000 });
912
+ }
913
+ }
914
+ async clickSecondPlacedGateway(userTaskId = '') {
915
+ try {
916
+ await this.secondPlacedGateway.click({ timeout: 60000 });
917
+ }
918
+ catch (error) {
919
+ await this.page.reload();
920
+ await (0, sleep_1.sleep)(10000);
921
+ if (userTaskId != '') {
922
+ await this.clickUserTask(userTaskId);
923
+ await this.clickConnectToOtherElementButton();
924
+ }
925
+ await this.secondPlacedGateway.click({ timeout: 60000 });
926
+ }
927
+ }
928
+ async addParallelUserTasks(numberOfTasks, taskName) {
929
+ try {
930
+ await this.clickAppendElementButton();
931
+ }
932
+ catch (error) {
933
+ await this.page.reload();
934
+ await (0, sleep_1.sleep)(20000);
935
+ await this.clickFirstPlacedElement();
936
+ await this.appendElementButton.hover();
937
+ }
938
+ await this.clickAppendGatewayButton();
939
+ await this.clickChangeTypeButton();
940
+ await this.clickParallelGatewayOption();
941
+ await this.clickAppendElementButton();
942
+ await this.clickAppendTaskButton();
943
+ await this.clickChangeTypeButton();
944
+ await this.clickUserTaskOption();
945
+ await this.assertImplementationOption('zeebeUserTask');
946
+ await this.clickGeneralPropertiesPanel();
947
+ await this.clickNameInput();
948
+ await this.fillNamedInput(taskName + '1');
949
+ await this.clickIdInput();
950
+ await this.fillIdInput(taskName + '1');
951
+ await this.clickAppendElementButton();
952
+ await this.clickAppendGatewayButton();
953
+ await this.clickChangeTypeButton();
954
+ await this.clickParallelGatewayOption();
955
+ for (let i = 2; i <= numberOfTasks; i++) {
956
+ await this.clickFirstPlacedGateway();
957
+ await this.clickAppendElementButton();
958
+ await this.clickAppendTaskButton();
959
+ await this.clickChangeTypeButton();
960
+ await this.clickUserTaskOption();
961
+ await this.assertImplementationOption('zeebeUserTask');
962
+ await this.clickNameInput();
963
+ await this.fillNamedInput(taskName + i);
964
+ await this.clickIdInput();
965
+ await this.fillIdInput(taskName + i);
966
+ await this.clickUserTask(taskName + '1');
967
+ await this.clickConnectToOtherElementButton();
968
+ await this.clickSecondPlacedGateway(taskName + i);
969
+ await this.clickCanvas();
970
+ await (0, sleep_1.sleep)(1000);
971
+ }
972
+ await this.clickSecondPlacedGateway();
973
+ }
974
+ async clickServiceTaskOption() {
975
+ const maxRetries = 3;
976
+ for (let retries = 0; retries < maxRetries; retries++) {
977
+ try {
978
+ if (retries === 0) {
979
+ await this.serviceTaskOption.click({ timeout: 30000, force: true });
980
+ }
981
+ else {
982
+ await this.changeTypeButton.click({ force: true, timeout: 30000 });
983
+ await this.serviceTaskOption.click({ timeout: 30000, force: true });
984
+ }
985
+ return;
986
+ }
987
+ catch (error) {
988
+ console.error(`Click attempt ${retries + 1} failed: ${error}`);
989
+ await new Promise((resolve) => setTimeout(resolve, 10000));
990
+ }
991
+ }
992
+ throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
993
+ }
994
+ async clickTaskDefinitionPropertiesPanel() {
995
+ const isExpanded = (await this.taskDefinitionPanel
996
+ .locator('.bio-properties-panel-group-header empty open')
997
+ .count()) > 0;
998
+ if (!isExpanded) {
999
+ await this.taskDefinitionPanel.click();
1000
+ }
1001
+ }
1002
+ async clickJobTypeInput() {
1003
+ await this.jobTypeInput.click();
1004
+ }
1005
+ async fillJobTypeInput(name) {
1006
+ await this.jobTypeInput.fill(name);
1007
+ }
1008
+ async switchToPlay() {
1009
+ await this.playTab.click();
1010
+ }
1011
+ async completePlayConfiguration(clusterName) {
1012
+ const timeout = 30000;
1013
+ let attempts = 0;
1014
+ const maxRetries = 2;
1015
+ while (attempts < maxRetries) {
1016
+ try {
1017
+ if (attempts > 0)
1018
+ await this.switchToPlay(); // Call switchToPlay on subsequent attempts
1019
+ await this.selectCluster(clusterName);
1020
+ await this.continueToPlayButton.click({ timeout });
1021
+ await (0, test_1.expect)(this.page.getByText('Play environment is ready')).toBeVisible({ timeout: 90000 });
1022
+ return; // Exit if successful
1023
+ }
1024
+ catch (error) {
1025
+ if (attempts >= maxRetries - 1)
1026
+ throw error;
1027
+ await this.page.reload();
1028
+ attempts++;
1029
+ }
1030
+ }
1031
+ }
1032
+ async embedForm(formName) {
1033
+ await this.clickEmbedFormButton();
1034
+ await this.clickForm(formName);
1035
+ await this.clickEmbedButton();
1036
+ }
1037
+ async fillStartEventVariablesForDocHandling(zeebeUrl, zeebeClientId, zeebeClientSecret) {
1038
+ console.log(`URL: ${zeebeUrl}, ClientId: ${zeebeClientId}, Secret: ${zeebeClientSecret}`);
1039
+ (0, test_1.expect)(this.connectorsDocHandlingStartEventElement).toBeVisible({
1040
+ timeout: 60000,
1041
+ });
1042
+ await this.connectorsDocHandlingStartEventElement.click();
1043
+ (0, test_1.expect)(this.startEventVariableInputWithThreeVariables).toBeVisible({
1044
+ timeout: 60000,
1045
+ });
1046
+ await this.startEventVariableInputWithThreeVariables.click();
1047
+ await this.fillZeebeRestValue(zeebeUrl);
1048
+ await this.fillZeebeSecretValue(zeebeClientSecret);
1049
+ await this.fillZeebeClientId(zeebeClientId);
1050
+ await (0, sleep_1.sleep)(1000);
1051
+ }
1052
+ async fillZeebeClientId(clientId) {
1053
+ await this.zeebeClientIdVariable.click();
1054
+ await (0, test_1.expect)(this.variableAssignmentValueTextboxThirdVariable).toBeVisible({
1055
+ timeout: 60000,
1056
+ });
1057
+ await this.variableAssignmentValueTextboxThirdVariable.click();
1058
+ await (0, sleep_1.sleep)(1000);
1059
+ await this.variableAssignmentValueTextboxThirdVariable.fill('');
1060
+ await this.variableAssignmentValueTextboxThirdVariable.fill(clientId);
1061
+ await (0, test_1.expect)(this.variableAssignmentValueTextboxThirdVariable).toHaveText(clientId);
1062
+ }
1063
+ async fillZeebeSecretValue(zeebeSecret) {
1064
+ await this.zeebeSecretVariable.click();
1065
+ await (0, test_1.expect)(this.variableAssignmentValueTextboxSecondVariable).toBeVisible({
1066
+ timeout: 60000,
1067
+ });
1068
+ await this.variableAssignmentValueTextboxSecondVariable.click();
1069
+ await (0, sleep_1.sleep)(1000);
1070
+ await this.variableAssignmentValueTextboxSecondVariable.fill('');
1071
+ await this.variableAssignmentValueTextboxSecondVariable.fill(zeebeSecret);
1072
+ await (0, test_1.expect)(this.variableAssignmentValueTextboxSecondVariable).toHaveText(zeebeSecret);
1073
+ }
1074
+ async fillZeebeRestValue(zeebeUrl) {
1075
+ await this.zeebeRestAddressVariable.click();
1076
+ await (0, test_1.expect)(this.variableAssignmentValueTextbox).toBeVisible({
1077
+ timeout: 60000,
1078
+ });
1079
+ await this.variableAssignmentValueTextbox.click();
1080
+ await (0, sleep_1.sleep)(1000);
1081
+ await this.variableAssignmentValueTextbox.fill('');
1082
+ await this.variableAssignmentValueTextbox.fill(zeebeUrl);
1083
+ await (0, test_1.expect)(this.variableAssignmentValueTextbox).toHaveText(zeebeUrl);
1084
+ }
1085
+ async clickTimerEventOption() {
1086
+ await this.timerEventOption.click();
1087
+ }
1088
+ async clickTimerEventSettings() {
1089
+ await this.timerEventSettings.click();
1090
+ }
1091
+ async selectTimerType(type) {
1092
+ await this.timerType.selectOption(type);
1093
+ }
1094
+ async clickTimerValue() {
1095
+ await this.timerValue.click();
1096
+ }
1097
+ async fillTimerValue(value) {
1098
+ await this.timerValue.fill(value);
1099
+ }
1100
+ async clickEighthPlacedElement() {
1101
+ await this.eighthPlacedElement.click();
1102
+ }
1103
+ async clickGlobalConnectToolButton() {
1104
+ await this.globalConnectToolButton.click({ timeout: 90000 });
1105
+ await (0, sleep_1.sleep)(1000);
1106
+ }
1107
+ async linkFormToStartEvent(formName) {
1108
+ await this.startEventElement.click({ timeout: 90000 });
1109
+ await (0, sleep_1.sleep)(1000);
1110
+ await this.embedForm(formName);
1111
+ }
1112
+ async expandPublicationSection() {
1113
+ const isExpanded = (await this.publicationSection
1114
+ .locator('.bio-properties-panel-group-header.open')
1115
+ .count()) > 0;
1116
+ if (!isExpanded) {
1117
+ await this.publicationSection.click({ timeout: 60000 });
1118
+ }
1119
+ }
1120
+ async enablePublicAccessIfDisabled() {
1121
+ await this.expandPublicationSection();
1122
+ const isDisabled = (await this.publicAccessToggle.getAttribute('aria-checked')) === 'false';
1123
+ if (isDisabled) {
1124
+ await this.publicAccessToggle.focus();
1125
+ await this.page.waitForTimeout(500);
1126
+ await this.publicAccessToggle.press('Space');
1127
+ await this.page.waitForTimeout(2000);
1128
+ await (0, test_1.expect)(this.page.getByText('Public access enabled')).toBeVisible({
1129
+ timeout: 15000,
1130
+ });
1131
+ console.log('Public access toggle enabled successfully');
1132
+ }
1133
+ }
1134
+ async clickPublicationTab() {
1135
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.publicationTab, {
1136
+ postAction: async () => {
1137
+ await this.clickStartEventElement();
1138
+ },
1139
+ });
1140
+ }
1141
+ async clickCopyPublicLinkButton() {
1142
+ await this.copyPublicLinkButton.click({ timeout: 60000 });
1143
+ }
1144
+ async getPublicationLink() {
1145
+ await this.clickPublicationTab();
1146
+ await (0, test_1.expect)(this.copyPublicLinkButton).toBeVisible({ timeout: 60000 });
1147
+ await this.clickCopyPublicLinkButton();
1148
+ await (0, sleep_1.sleep)(1000);
1149
+ const context = this.page.context();
1150
+ await context.grantPermissions(['clipboard-read']);
1151
+ const clipboardText = await this.page.evaluate(async () => {
1152
+ return await navigator.clipboard.readText();
1153
+ });
1154
+ console.log('Captured public link:', clipboardText);
1155
+ return clipboardText;
1156
+ }
1157
+ async assertFormEmbedded() {
1158
+ await (0, test_1.expect)(this.formLinkedSuccessMessage).toBeVisible({ timeout: 15000 });
1159
+ }
1160
+ async assertDiagramNameSet(diagramName) {
1161
+ await (0, test_1.expect)(this.diagramNameBreadcrumb(diagramName)).toBeVisible({
1162
+ timeout: 60000,
1163
+ });
1164
+ }
1165
+ }
1166
+ exports.ModelerCreatePage = ModelerCreatePage;