@camunda/e2e-test-suite 0.0.257 → 0.0.258

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/dist/fixtures/SM-8.10.d.ts +81 -0
  2. package/dist/fixtures/SM-8.10.js +184 -0
  3. package/dist/pages/SM-8.10/Authorization.d.ts +31 -0
  4. package/dist/pages/SM-8.10/Authorization.js +146 -0
  5. package/dist/pages/SM-8.10/ClusterDetailsPage.d.ts +8 -0
  6. package/dist/pages/SM-8.10/ClusterDetailsPage.js +28 -0
  7. package/dist/pages/SM-8.10/ClusterPage.d.ts +11 -0
  8. package/dist/pages/SM-8.10/ClusterPage.js +32 -0
  9. package/dist/pages/SM-8.10/ConnectorMarketplacePage.d.ts +16 -0
  10. package/dist/pages/SM-8.10/ConnectorMarketplacePage.js +52 -0
  11. package/dist/pages/SM-8.10/ConnectorSettingsPage.d.ts +40 -0
  12. package/dist/pages/SM-8.10/ConnectorSettingsPage.js +133 -0
  13. package/dist/pages/SM-8.10/ConnectorTemplatePage.d.ts +11 -0
  14. package/dist/pages/SM-8.10/ConnectorTemplatePage.js +34 -0
  15. package/dist/pages/SM-8.10/ConsoleHomePage.d.ts +11 -0
  16. package/dist/pages/SM-8.10/ConsoleHomePage.js +31 -0
  17. package/dist/pages/SM-8.10/ConsoleOrganizationPage.d.ts +22 -0
  18. package/dist/pages/SM-8.10/ConsoleOrganizationPage.js +68 -0
  19. package/dist/pages/SM-8.10/FormJsPage.d.ts +31 -0
  20. package/dist/pages/SM-8.10/FormJsPage.js +87 -0
  21. package/dist/pages/SM-8.10/HomePage.d.ts +20 -0
  22. package/dist/pages/SM-8.10/HomePage.js +49 -0
  23. package/dist/pages/SM-8.10/IdentityTenantPage.d.ts +52 -0
  24. package/dist/pages/SM-8.10/IdentityTenantPage.js +218 -0
  25. package/dist/pages/SM-8.10/IdentityUsersPage.d.ts +92 -0
  26. package/dist/pages/SM-8.10/IdentityUsersPage.js +473 -0
  27. package/dist/pages/SM-8.10/KeycloakAdminPage.d.ts +15 -0
  28. package/dist/pages/SM-8.10/KeycloakAdminPage.js +68 -0
  29. package/dist/pages/SM-8.10/KeycloakLoginPage.d.ts +11 -0
  30. package/dist/pages/SM-8.10/KeycloakLoginPage.js +25 -0
  31. package/dist/pages/SM-8.10/KeycloakUtils.d.ts +16 -0
  32. package/dist/pages/SM-8.10/KeycloakUtils.js +63 -0
  33. package/dist/pages/SM-8.10/LoginPage.d.ts +21 -0
  34. package/dist/pages/SM-8.10/LoginPage.js +100 -0
  35. package/dist/pages/SM-8.10/ManagementIdentityPage.d.ts +46 -0
  36. package/dist/pages/SM-8.10/ManagementIdentityPage.js +153 -0
  37. package/dist/pages/SM-8.10/ModelerCreatePage.d.ts +199 -0
  38. package/dist/pages/SM-8.10/ModelerCreatePage.js +1052 -0
  39. package/dist/pages/SM-8.10/ModelerHomePage.d.ts +44 -0
  40. package/dist/pages/SM-8.10/ModelerHomePage.js +179 -0
  41. package/dist/pages/SM-8.10/NavigationPage.d.ts +47 -0
  42. package/dist/pages/SM-8.10/NavigationPage.js +134 -0
  43. package/dist/pages/SM-8.10/OCIdentityAuthorizationsPage.d.ts +10 -0
  44. package/dist/pages/SM-8.10/OCIdentityAuthorizationsPage.js +35 -0
  45. package/dist/pages/SM-8.10/OCIdentityClusterVariablesPage.d.ts +20 -0
  46. package/dist/pages/SM-8.10/OCIdentityClusterVariablesPage.js +69 -0
  47. package/dist/pages/SM-8.10/OCIdentityGroupsPage.d.ts +39 -0
  48. package/dist/pages/SM-8.10/OCIdentityGroupsPage.js +154 -0
  49. package/dist/pages/SM-8.10/OCIdentityHomePage.d.ts +23 -0
  50. package/dist/pages/SM-8.10/OCIdentityHomePage.js +81 -0
  51. package/dist/pages/SM-8.10/OCIdentityMappingRulesPage.d.ts +23 -0
  52. package/dist/pages/SM-8.10/OCIdentityMappingRulesPage.js +110 -0
  53. package/dist/pages/SM-8.10/OCIdentityRolesPage.d.ts +55 -0
  54. package/dist/pages/SM-8.10/OCIdentityRolesPage.js +197 -0
  55. package/dist/pages/SM-8.10/OCTenantPage.d.ts +67 -0
  56. package/dist/pages/SM-8.10/OCTenantPage.js +280 -0
  57. package/dist/pages/SM-8.10/OperateHomePage.d.ts +24 -0
  58. package/dist/pages/SM-8.10/OperateHomePage.js +81 -0
  59. package/dist/pages/SM-8.10/OperateProcessInstancePage.d.ts +24 -0
  60. package/dist/pages/SM-8.10/OperateProcessInstancePage.js +170 -0
  61. package/dist/pages/SM-8.10/OperateProcessesPage.d.ts +32 -0
  62. package/dist/pages/SM-8.10/OperateProcessesPage.js +205 -0
  63. package/dist/pages/SM-8.10/OptimizeCollectionsPage.d.ts +17 -0
  64. package/dist/pages/SM-8.10/OptimizeCollectionsPage.js +66 -0
  65. package/dist/pages/SM-8.10/OptimizeDashboardPage.d.ts +14 -0
  66. package/dist/pages/SM-8.10/OptimizeDashboardPage.js +56 -0
  67. package/dist/pages/SM-8.10/OptimizeHomePage.d.ts +19 -0
  68. package/dist/pages/SM-8.10/OptimizeHomePage.js +64 -0
  69. package/dist/pages/SM-8.10/OptimizeReportPage.d.ts +50 -0
  70. package/dist/pages/SM-8.10/OptimizeReportPage.js +179 -0
  71. package/dist/pages/SM-8.10/PlayPage.d.ts +44 -0
  72. package/dist/pages/SM-8.10/PlayPage.js +235 -0
  73. package/dist/pages/SM-8.10/SettingsPage.d.ts +12 -0
  74. package/dist/pages/SM-8.10/SettingsPage.js +25 -0
  75. package/dist/pages/SM-8.10/TaskDetailsPage.d.ts +70 -0
  76. package/dist/pages/SM-8.10/TaskDetailsPage.js +266 -0
  77. package/dist/pages/SM-8.10/TaskPanelPage.d.ts +24 -0
  78. package/dist/pages/SM-8.10/TaskPanelPage.js +93 -0
  79. package/dist/pages/SM-8.10/TaskProcessesPage.d.ts +14 -0
  80. package/dist/pages/SM-8.10/TaskProcessesPage.js +53 -0
  81. package/dist/pages/SM-8.10/UtilitiesPage.d.ts +34 -0
  82. package/dist/pages/SM-8.10/UtilitiesPage.js +435 -0
  83. package/dist/pages/SM-8.10/optimizeReportUtils.d.ts +6 -0
  84. package/dist/pages/SM-8.10/optimizeReportUtils.js +42 -0
  85. package/dist/pages/SM-8.7/ModelerCreatePage.js +3 -0
  86. package/dist/pages/SM-8.7/PlayPage.d.ts +1 -0
  87. package/dist/pages/SM-8.7/PlayPage.js +4 -2
  88. package/dist/tests/SM-8.10/cluster-variables.spec.d.ts +1 -0
  89. package/dist/tests/SM-8.10/cluster-variables.spec.js +190 -0
  90. package/dist/tests/SM-8.10/connectors-user-flows.spec.d.ts +1 -0
  91. package/dist/tests/SM-8.10/connectors-user-flows.spec.js +260 -0
  92. package/dist/tests/SM-8.10/console-user-flows.spec.d.ts +1 -0
  93. package/dist/tests/SM-8.10/console-user-flows.spec.js +88 -0
  94. package/dist/tests/SM-8.10/document-handling-user-flows.spec.d.ts +1 -0
  95. package/dist/tests/SM-8.10/document-handling-user-flows.spec.js +157 -0
  96. package/dist/tests/SM-8.10/hto-user-flows.spec.d.ts +1 -0
  97. package/dist/tests/SM-8.10/hto-user-flows.spec.js +408 -0
  98. package/dist/tests/SM-8.10/identity-user-flows.spec.d.ts +1 -0
  99. package/dist/tests/SM-8.10/identity-user-flows.spec.js +233 -0
  100. package/dist/tests/SM-8.10/license-key-user-flows.spec.d.ts +1 -0
  101. package/dist/tests/SM-8.10/license-key-user-flows.spec.js +523 -0
  102. package/dist/tests/SM-8.10/login.spec.d.ts +1 -0
  103. package/dist/tests/SM-8.10/login.spec.js +24 -0
  104. package/dist/tests/SM-8.10/migration-path-user-flows.spec.d.ts +1 -0
  105. package/dist/tests/SM-8.10/migration-path-user-flows.spec.js +224 -0
  106. package/dist/tests/SM-8.10/mt-enabled-user-flows.spec.d.ts +1 -0
  107. package/dist/tests/SM-8.10/mt-enabled-user-flows.spec.js +584 -0
  108. package/dist/tests/SM-8.10/optimize-user-flows.spec.d.ts +1 -0
  109. package/dist/tests/SM-8.10/optimize-user-flows.spec.js +184 -0
  110. package/dist/tests/SM-8.10/play.spec.d.ts +1 -0
  111. package/dist/tests/SM-8.10/play.spec.js +152 -0
  112. package/dist/tests/SM-8.10/rba-enabled-user-flows.spec.d.ts +1 -0
  113. package/dist/tests/SM-8.10/rba-enabled-user-flows.spec.js +715 -0
  114. package/dist/tests/SM-8.10/smoke-tests.spec.d.ts +1 -0
  115. package/dist/tests/SM-8.10/smoke-tests.spec.js +163 -0
  116. package/dist/tests/SM-8.10/test-setup.spec.d.ts +1 -0
  117. package/dist/tests/SM-8.10/test-setup.spec.js +24 -0
  118. package/dist/tests/SM-8.10/web-modeler-user-flows.spec.d.ts +1 -0
  119. package/dist/tests/SM-8.10/web-modeler-user-flows.spec.js +178 -0
  120. package/package.json +1 -1
@@ -0,0 +1,1052 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModelerCreatePage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const ConnectorMarketplacePage_1 = require("./ConnectorMarketplacePage");
6
+ const sleep_1 = require("../../utils/sleep");
7
+ class ModelerCreatePage {
8
+ page;
9
+ generalPanel;
10
+ taskDefinitionPanel;
11
+ processIdInput;
12
+ elemendIdInput;
13
+ startEventElement;
14
+ appendTaskButton;
15
+ changeTypeButton;
16
+ userTaskOption;
17
+ serviceTaskOption;
18
+ appendEndEventButton;
19
+ dialog;
20
+ startInstanceMainButton;
21
+ deployAndRunMainButton;
22
+ deployAndRunSubButton;
23
+ viewProcessInstanceLink;
24
+ nameInput;
25
+ jobTypeInput;
26
+ diagramBreadcrumb;
27
+ renameDiagramNameButton;
28
+ diagramNameInput;
29
+ variableInput;
30
+ embedFormButton;
31
+ embedButton;
32
+ newForm;
33
+ deploySubButton;
34
+ cancelButton;
35
+ restConnectorOption;
36
+ marketPlaceButton;
37
+ clientIdTextbox;
38
+ clientSecretTextbox;
39
+ rememberCredentialsCheckbox;
40
+ webhookMessageStartEventConnectorOption;
41
+ webhookIdInput;
42
+ implementationSection;
43
+ implementationOptions;
44
+ assignmentSection;
45
+ priorityInput;
46
+ secondElement;
47
+ firstElement;
48
+ thirdElement;
49
+ appendElementButton;
50
+ firstPlacedGateway;
51
+ secondPlacedGateway;
52
+ secondPlacedElement;
53
+ appendPreButton;
54
+ appendGatewayButton;
55
+ parallelGatewayOption;
56
+ connectToOtherElementButton;
57
+ canvas;
58
+ intermediateBoundaryEvent;
59
+ intermediateWebhookConnectorOption;
60
+ correlationKeyProcessInput;
61
+ correlationKeyPayloadInput;
62
+ playTab;
63
+ continueToPlayButton;
64
+ candidateUsersInput;
65
+ assigneeInput;
66
+ candidateGroupsInput;
67
+ tenantIdInput;
68
+ timerEventOption;
69
+ timerEventSettings;
70
+ timerType;
71
+ timerValue;
72
+ eighthPlacedElement;
73
+ processIdSecondLocator;
74
+ deployMenuItem;
75
+ additionalActionsButton;
76
+ closeModalButton;
77
+ deployErrorMessage;
78
+ implementTab;
79
+ bpmnReplaceMenu;
80
+ connectorsDocHandlingStartEventElement;
81
+ startEventVariableInputWithThreeVariables;
82
+ zeebeRestAddressVariable;
83
+ variableAssignmentValueTextbox;
84
+ zeebeSecretVariable;
85
+ variableAssignmentValueTextboxSecondVariable;
86
+ zeebeClientIdVariable;
87
+ variableAssignmentValueTextboxThirdVariable;
88
+ firstPlaceRESTConnector;
89
+ authenticationPanel;
90
+ oauthTokenEndpointInput;
91
+ closeDetailsPanel;
92
+ openDetailsPanel;
93
+ constructor(page) {
94
+ this.page = page;
95
+ this.generalPanel = page.locator('[data-group-id="group-general"]');
96
+ this.taskDefinitionPanel = page
97
+ .locator('div')
98
+ .filter({ hasText: /^Task definition$/ })
99
+ .first();
100
+ this.processIdInput = page.getByLabel('ID', { exact: true });
101
+ this.elemendIdInput = page.getByLabel('ID', { exact: true });
102
+ this.startEventElement = page.locator('.djs-hit').first();
103
+ this.appendPreButton = page.locator('.djs-create-pad-icon > svg').first();
104
+ this.appendTaskButton = page.getByTitle('Append task');
105
+ this.changeTypeButton = page.getByRole('button', {
106
+ name: 'Change element',
107
+ exact: true,
108
+ });
109
+ this.userTaskOption = page
110
+ .getByRole('listitem', { name: 'User task' })
111
+ .locator('span')
112
+ .first();
113
+ this.serviceTaskOption = page.getByRole('listitem', { name: 'Service Task' });
114
+ this.appendEndEventButton = page.getByTitle('Append end event');
115
+ this.appendGatewayButton = page.getByTitle('append gateway');
116
+ this.parallelGatewayOption = page.getByText('parallel gateway');
117
+ this.dialog = page.getByRole('dialog');
118
+ this.startInstanceMainButton = page.getByRole('button', {
119
+ name: 'Run',
120
+ exact: true,
121
+ });
122
+ this.deployAndRunMainButton = page.getByRole('button', {
123
+ name: 'Deploy & run',
124
+ exact: true,
125
+ });
126
+ this.deployAndRunSubButton = this.dialog.getByRole('button', {
127
+ name: 'Deploy & run',
128
+ exact: true,
129
+ });
130
+ this.viewProcessInstanceLink = page.getByRole('link', {
131
+ name: 'View process instance',
132
+ });
133
+ this.nameInput = page.getByLabel('Name', { exact: true });
134
+ this.jobTypeInput = page.getByRole('textbox', { name: /job type/i });
135
+ this.diagramBreadcrumb = page.locator('[data-test="breadcrumb-diagram"]');
136
+ this.renameDiagramNameButton = page.getByText('Rename');
137
+ this.diagramNameInput = page.locator('[data-test="editable-input"]');
138
+ this.variableInput = page.locator('[id="variables-json"]');
139
+ this.embedFormButton = page.getByRole('button', { name: 'Link form' });
140
+ this.embedButton = page.locator('[data-test="confirm-move"]');
141
+ this.newForm = page.locator('[data-test="item-New form"]');
142
+ this.continueToPlayButton = page.getByRole('button', { name: 'Continue' });
143
+ this.deploySubButton = page
144
+ .getByRole('dialog')
145
+ .getByRole('button', { name: 'Deploy' });
146
+ this.cancelButton = page.getByRole('button', { name: 'Cancel' });
147
+ this.restConnectorOption = page.getByRole('listitem', {
148
+ name: 'REST Outbound Connector',
149
+ });
150
+ this.marketPlaceButton = page.getByTitle('Browse Marketplace for more Connectors');
151
+ this.clientIdTextbox = page.getByLabel('Client ID');
152
+ this.clientSecretTextbox = page.getByLabel('Client secret');
153
+ this.rememberCredentialsCheckbox = page.getByText('Remember credentials');
154
+ this.webhookMessageStartEventConnectorOption = page.getByRole('listitem', {
155
+ name: 'Webhook Message Start Event Connector',
156
+ exact: true,
157
+ });
158
+ this.webhookIdInput = page.getByLabel('Webhook ID');
159
+ this.firstElement = page.locator('[class="djs-element djs-shape"]').nth(0);
160
+ this.secondElement = page.locator('[class="djs-element djs-shape"]').nth(1);
161
+ this.thirdElement = page.locator('[class="djs-element djs-shape"]').nth(2);
162
+ this.implementationSection = page.locator('[data-group-id="group-userTaskImplementation"]');
163
+ this.implementationOptions = page.locator('#bio-properties-panel-userTaskImplementation');
164
+ this.assignmentSection = page.locator('[data-group-id="group-assignmentDefinition"]');
165
+ this.priorityInput = page.getByRole('textbox', { name: 'priority' });
166
+ this.appendElementButton = page
167
+ .locator('[class="djs-context-pad open"]')
168
+ .first();
169
+ this.firstPlacedGateway = page
170
+ .locator('[data-element-id*="Gateway"]')
171
+ .first();
172
+ this.secondPlacedGateway = page
173
+ .locator('[data-element-id*="Gateway"]')
174
+ .last();
175
+ this.secondPlacedElement = page
176
+ .locator('[class= "djs-element djs-shape"]')
177
+ .last();
178
+ this.connectToOtherElementButton = page
179
+ .getByLabel('Connect to other element')
180
+ .locator('path');
181
+ this.canvas = page.locator('rect').nth(1);
182
+ this.intermediateBoundaryEvent = page.getByTitle('Append intermediate/boundary');
183
+ this.intermediateWebhookConnectorOption = page.getByRole('listitem', {
184
+ name: 'Webhook Intermediate Event Connector',
185
+ });
186
+ this.correlationKeyPayloadInput = page.getByLabel('Correlation key (payload)');
187
+ this.correlationKeyProcessInput = page.getByLabel('Correlation key (process)');
188
+ this.playTab = page.getByRole('tab', {
189
+ name: 'Play',
190
+ });
191
+ this.candidateUsersInput = page.getByRole('textbox', {
192
+ name: 'candidate users',
193
+ });
194
+ this.assigneeInput = page.getByRole('textbox', { name: 'assignee' });
195
+ this.candidateGroupsInput = page.getByRole('textbox', {
196
+ name: 'candidate groups',
197
+ });
198
+ this.tenantIdInput = page.getByLabel('Tenant ID (Optional)');
199
+ this.timerEventOption = page.getByRole('listitem', {
200
+ name: 'Timer intermediate catch event',
201
+ exact: true,
202
+ });
203
+ this.timerEventSettings = page.getByText(/^Timer$/).first();
204
+ this.timerType = page.getByLabel('Type');
205
+ this.timerValue = page.getByLabel('Value');
206
+ this.eighthPlacedElement = page
207
+ .locator('g:nth-child(8) > .djs-element > .djs-hit')
208
+ .first();
209
+ this.processIdSecondLocator = page.getByLabel('Process ID');
210
+ this.additionalActionsButton = page.getByRole('button', {
211
+ name: 'Additional actions',
212
+ });
213
+ this.deployMenuItem = page.getByRole('menuitem', {
214
+ name: 'Deploy',
215
+ });
216
+ this.closeModalButton = page
217
+ .getByRole('dialog')
218
+ .getByRole('button', { name: 'Close' });
219
+ this.deployErrorMessage = page.getByText('The diagram failed to deploy & run');
220
+ this.implementTab = page.getByRole('tab', { name: 'Implement' });
221
+ this.bpmnReplaceMenu = page.getByTestId('bpmn-replace');
222
+ this.connectorsDocHandlingStartEventElement = page.locator('g:nth-child(5) > .djs-element > .djs-hit');
223
+ this.startEventVariableInputWithThreeVariables =
224
+ page.getByText('Output mapping3');
225
+ this.zeebeRestAddressVariable = page
226
+ .locator('[data-test="properties-panel"]')
227
+ .getByText('zeebeRestAdress');
228
+ this.variableAssignmentValueTextbox = page.getByRole('textbox', {
229
+ name: 'Variable assignment value',
230
+ });
231
+ this.zeebeSecretVariable = page
232
+ .locator('[data-test="properties-panel"]')
233
+ .getByText('zeebeSecret');
234
+ this.variableAssignmentValueTextboxSecondVariable = page.locator('#bio-properties-panel-StartEvent_1-output-1-source div');
235
+ this.zeebeClientIdVariable = page
236
+ .locator('[data-test="properties-panel"]')
237
+ .getByText('zeebeClientId');
238
+ this.variableAssignmentValueTextboxThirdVariable = page.locator('#bio-properties-panel-StartEvent_1-output-2-source div');
239
+ this.firstPlaceRESTConnector = page.locator('g:nth-child(2) > .djs-element > .djs-hit');
240
+ this.authenticationPanel = page
241
+ .locator('div')
242
+ .filter({ hasText: /^Authentication$/ })
243
+ .first();
244
+ this.oauthTokenEndpointInput = page.getByLabel('OAuth 2.0 token endpoint');
245
+ this.closeDetailsPanel = page.getByTitle('Close Details Panel');
246
+ this.openDetailsPanel = page.getByTitle('Open Details Panel');
247
+ }
248
+ async deployProcessInstance() {
249
+ await this.clickDeployButton();
250
+ await this.clickDeploySubButton();
251
+ await (0, test_1.expect)(this.page.getByText('Process successfully deployed')).toBeVisible({
252
+ timeout: 30000,
253
+ });
254
+ await this.clickCloseModalButton();
255
+ }
256
+ async clickCloseModalButton() {
257
+ await this.closeModalButton.click({ timeout: 60000 });
258
+ }
259
+ // Function to model a simple Camunda User Task Diagram with or without a form
260
+ async modelCamundaUserTaskDiagram(processName, processId = '', formName = '') {
261
+ await (0, test_1.expect)(this.generalPanel).toBeVisible({
262
+ timeout: 180000,
263
+ });
264
+ await this.enterDiagramName(processName);
265
+ await (0, sleep_1.sleep)(1000);
266
+ await this.clickCanvas();
267
+ await this.clickGeneralPropertiesPanel();
268
+ await this.assertNameInput(processName);
269
+ await this.clickStartEventElement();
270
+ if (processId.length > 0) {
271
+ await this.clickStartEventElement();
272
+ await this.clickGeneralPropertiesPanel();
273
+ await this.clickIdInput();
274
+ await this.fillIdInput(processId);
275
+ await (0, sleep_1.sleep)(1000);
276
+ await this.clickStartEventElement();
277
+ try {
278
+ await (0, test_1.expect)(this.appendElementButton).toBeVisible({ timeout: 1000 });
279
+ }
280
+ catch {
281
+ await this.clickStartEventElement();
282
+ }
283
+ }
284
+ await this.clickAppendElementButton();
285
+ await this.clickAppendTaskButton();
286
+ await this.clickChangeTypeButton();
287
+ await this.clickUserTaskOption();
288
+ await this.assertImplementationOption('zeebeUserTask');
289
+ if (formName.length > 0) {
290
+ await this.clickEmbedFormButton();
291
+ await this.clickForm(formName);
292
+ await this.clickEmbedButton();
293
+ }
294
+ await this.clickAppendElementButton();
295
+ await this.clickAppendEndEventButton();
296
+ await this.clickCanvas();
297
+ await this.assertThreeElementsVisible();
298
+ }
299
+ async modelJobWorkerDiagram(processName) {
300
+ await (0, test_1.expect)(this.generalPanel).toBeVisible({
301
+ timeout: 120000,
302
+ });
303
+ await this.enterDiagramName(processName);
304
+ await (0, sleep_1.sleep)(1000);
305
+ await this.clickStartEventElement();
306
+ await this.clickGeneralPropertiesPanel();
307
+ await this.clickIdInput();
308
+ await this.fillIdInput(processName);
309
+ await this.assertNameInput(processName);
310
+ await this.clickStartEventElement();
311
+ await this.clickAppendElementButton();
312
+ await this.clickAppendTaskButton();
313
+ await this.clickChangeTypeButton();
314
+ await this.clickUserTaskOption();
315
+ await this.chooseImplementationOption('jobWorker');
316
+ await this.clickAppendElementButton();
317
+ await this.clickAppendEndEventButton();
318
+ await this.clickCanvas();
319
+ await this.assertThreeElementsVisible();
320
+ }
321
+ async assertThreeElementsVisible() {
322
+ await (0, test_1.expect)(this.firstElement).toBeVisible({ timeout: 30000 });
323
+ await (0, test_1.expect)(this.secondElement).toBeVisible({ timeout: 30000 });
324
+ await (0, test_1.expect)(this.thirdElement).toBeVisible({ timeout: 30000 });
325
+ }
326
+ async clickForm(name) {
327
+ await this.page
328
+ .locator(`[data-test="item-${name}"]`)
329
+ .getByText(name)
330
+ .click({ timeout: 90000 });
331
+ }
332
+ async runProcessInstance(variables = '', tenant = '') {
333
+ const maxRetries = 3;
334
+ for (let attempt = 0; attempt < maxRetries; attempt++) {
335
+ try {
336
+ await this.clickDeployAndRunMainButton();
337
+ await (0, test_1.expect)(this.dialog).toBeVisible({
338
+ timeout: 30000,
339
+ });
340
+ if (variables.length > 0) {
341
+ await (0, test_1.expect)(this.variableInput).toBeVisible({
342
+ timeout: 60000,
343
+ });
344
+ await this.clickVariableInput();
345
+ await this.fillVariableInput(variables);
346
+ }
347
+ if (tenant.length > 0) {
348
+ await this.clickTenantIdInput();
349
+ await this.fillTenantIdInput(tenant);
350
+ }
351
+ await this.clickDeployAndRunSubButton();
352
+ await this.instanceStartedAssertion();
353
+ return;
354
+ }
355
+ catch (error) {
356
+ if (attempt < maxRetries - 1) {
357
+ console.warn(`Attempt ${attempt + 1} failed for deploy & run running process. Retrying...`);
358
+ await this.page.reload();
359
+ await (0, sleep_1.sleep)(10000);
360
+ }
361
+ else {
362
+ throw new Error(`Assertion failed after ${maxRetries} attempts`);
363
+ }
364
+ }
365
+ }
366
+ }
367
+ async switchToPlay() {
368
+ await (0, test_1.expect)(this.playTab).toBeVisible();
369
+ await this.playTab.click();
370
+ }
371
+ async clickGeneralPropertiesPanel() {
372
+ const isExpanded = (await this.generalPanel
373
+ .locator('.bio-properties-panel-group-header open')
374
+ .count()) > 0;
375
+ if (!isExpanded) {
376
+ await this.generalPanel.click({ timeout: 60000 });
377
+ }
378
+ }
379
+ async clickIdInput() {
380
+ try {
381
+ await this.processIdInput.click();
382
+ }
383
+ catch {
384
+ await this.processIdSecondLocator.click();
385
+ }
386
+ }
387
+ async clickTaskDefinitionPropertiesPanel() {
388
+ await this.taskDefinitionPanel.click();
389
+ }
390
+ async clickProcessIdInput() {
391
+ await this.processIdInput.click();
392
+ }
393
+ async fillIdInput(id) {
394
+ try {
395
+ await this.processIdInput.fill(id);
396
+ }
397
+ catch {
398
+ await this.processIdSecondLocator.fill(id);
399
+ }
400
+ }
401
+ async clickElemendIdInput() {
402
+ await this.elemendIdInput.click();
403
+ }
404
+ async fillElementIdInput(id) {
405
+ await this.elemendIdInput.fill(id);
406
+ }
407
+ async clickStartEventElement() {
408
+ await this.startEventElement.click();
409
+ }
410
+ async selectStartEventElement() {
411
+ await this.startEventElement.click();
412
+ }
413
+ async clickAppendTaskButton() {
414
+ await this.hoverOnLocator(this.appendPreButton);
415
+ await this.appendTaskButton.click({ timeout: 90000 });
416
+ }
417
+ async hoverOnLocator(locator, selector = '.djs-create-pad-entry') {
418
+ const canvasState = await Promise.race([
419
+ this.page
420
+ .waitForSelector(selector, { state: 'visible' })
421
+ .then(() => 'pad')
422
+ .catch(() => {
423
+ throw new Error('Canvas not visible');
424
+ }),
425
+ locator
426
+ .waitFor({ state: 'visible' })
427
+ .then(() => 'hover')
428
+ .catch(() => {
429
+ throw new Error('Locator not visible');
430
+ }),
431
+ ]);
432
+ if (canvasState === 'hover') {
433
+ await locator.hover({ timeout: 5000 });
434
+ await this.page.waitForSelector(selector, { state: 'visible' });
435
+ }
436
+ }
437
+ async clickAppendGatewayButton() {
438
+ await this.appendGatewayButton.click({ timeout: 90000 });
439
+ }
440
+ async clickChangeTypeButton() {
441
+ try {
442
+ await this.changeTypeButton.click({ timeout: 180000, force: true });
443
+ }
444
+ catch {
445
+ await this.page.reload();
446
+ if (await this.secondElement.isVisible({ timeout: 6000 })) {
447
+ await this.secondElement.click({ timeout: 90000, force: true });
448
+ await this.changeTypeButton.click({ timeout: 90000, force: true });
449
+ }
450
+ else {
451
+ await this.firstElement.click({ timeout: 90000, force: true });
452
+ await this.changeTypeButton.click({ timeout: 90000, force: true });
453
+ }
454
+ }
455
+ }
456
+ async clickUserTaskOption() {
457
+ const maxRetries = 3;
458
+ for (let retries = 0; retries < maxRetries; retries++) {
459
+ try {
460
+ if (retries === 0) {
461
+ await this.userTaskOption.click({ timeout: 30000, force: true });
462
+ }
463
+ else {
464
+ await this.changeTypeButton.click({ force: true, timeout: 30000 });
465
+ await this.userTaskOption.click({ timeout: 30000, force: true });
466
+ }
467
+ return;
468
+ }
469
+ catch (error) {
470
+ console.error(`Click attempt ${retries + 1} failed: ${error}`);
471
+ await new Promise((resolve) => setTimeout(resolve, 10000));
472
+ }
473
+ }
474
+ throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
475
+ }
476
+ async clickServiceTaskOption() {
477
+ const maxRetries = 3;
478
+ for (let retries = 0; retries < maxRetries; retries++) {
479
+ try {
480
+ if (retries === 0) {
481
+ await this.serviceTaskOption.click({ timeout: 30000, force: true });
482
+ }
483
+ else {
484
+ await this.changeTypeButton.click({ force: true, timeout: 30000 });
485
+ await this.serviceTaskOption.click({ timeout: 30000, force: true });
486
+ }
487
+ return;
488
+ }
489
+ catch (error) {
490
+ console.error(`Click attempt ${retries + 1} failed: ${error}`);
491
+ await new Promise((resolve) => setTimeout(resolve, 10000));
492
+ }
493
+ }
494
+ throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
495
+ }
496
+ async clickAppendEndEventButton(parentElement) {
497
+ try {
498
+ await this.appendEndEventButton.click();
499
+ }
500
+ catch (error) {
501
+ await this.page.reload();
502
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
503
+ await sleep(10000);
504
+ if (parentElement == undefined) {
505
+ await this.clickSecondPlacedElement();
506
+ }
507
+ else if (parentElement == 'parallelGateway') {
508
+ await this.clickSecondPlacedGateway();
509
+ }
510
+ await this.hoverOnLocator(this.appendElementButton);
511
+ await this.appendEndEventButton.click({ timeout: 30000 });
512
+ }
513
+ }
514
+ async clickFirstPlacedElement() {
515
+ await this.firstElement.click({ timeout: 90000 });
516
+ }
517
+ async clickSecondPlacedElement() {
518
+ await this.secondPlacedElement.click({ timeout: 60000 });
519
+ }
520
+ async clickFirstPlacedGateway() {
521
+ try {
522
+ await this.firstPlacedGateway.click({ timeout: 3000 });
523
+ await this.appendElementButton.isVisible({ timeout: 3000 });
524
+ }
525
+ catch (error) {
526
+ await this.page.reload();
527
+ await this.firstPlacedGateway.click({ timeout: 3000 });
528
+ }
529
+ }
530
+ async clickSecondPlacedGateway() {
531
+ try {
532
+ await this.secondPlacedGateway.click({ timeout: 3000 });
533
+ await this.appendElementButton.isVisible({ timeout: 3000 });
534
+ }
535
+ catch (error) {
536
+ await this.page.reload();
537
+ await this.secondPlacedGateway.click({ timeout: 3000 });
538
+ }
539
+ }
540
+ async clickDeployAndRunMainButton() {
541
+ await this.deployAndRunMainButton.click({ timeout: 30000 });
542
+ }
543
+ async clickDeployAndRunSubButton() {
544
+ await this.deployAndRunSubButton.click({ timeout: 30000 });
545
+ }
546
+ async clickViewProcessInstanceLink() {
547
+ await this.viewProcessInstanceLink.click({ timeout: 90000 });
548
+ }
549
+ async clickNameInput() {
550
+ await this.nameInput.click();
551
+ }
552
+ async clickUserTask(id) {
553
+ const priorityUserTask = this.page.locator(`[data-element-id="${id}"]`);
554
+ await priorityUserTask.click({ timeout: 60000 });
555
+ }
556
+ async fillNameInput(name) {
557
+ await this.nameInput.fill(name);
558
+ }
559
+ async clickJobTypeInput() {
560
+ await this.jobTypeInput.click();
561
+ }
562
+ async fillJobTypeInput(name) {
563
+ await this.jobTypeInput.fill(name);
564
+ }
565
+ async clickDiagramBreadcrumb() {
566
+ await this.diagramBreadcrumb.click({ timeout: 60000 });
567
+ }
568
+ async clickEditDiagramNameButton() {
569
+ await this.renameDiagramNameButton.click();
570
+ }
571
+ async enterDiagramName(name) {
572
+ await this.diagramNameInput.fill(name, { timeout: 60000 });
573
+ await this.diagramNameInput.press('Enter', { timeout: 60000 });
574
+ }
575
+ async clickVariableInput() {
576
+ await this.variableInput.click();
577
+ }
578
+ async fillVariableInput(variable) {
579
+ await this.variableInput.fill(variable);
580
+ }
581
+ async clickEmbedFormButton() {
582
+ await this.embedFormButton.click({ timeout: 90000 });
583
+ }
584
+ async clickEmbedButton() {
585
+ await this.embedButton.click();
586
+ }
587
+ async clickAdditionalActionsButton() {
588
+ await (0, test_1.expect)(this.additionalActionsButton).toBeVisible({ timeout: 20000 });
589
+ await this.additionalActionsButton.click({ timeout: 60000 });
590
+ }
591
+ async clickDeployMenuItem() {
592
+ await (0, test_1.expect)(this.deployMenuItem).toBeVisible({ timeout: 20000 });
593
+ await this.deployMenuItem.click({ timeout: 60000 });
594
+ }
595
+ async clickDeployButton() {
596
+ await this.clickAdditionalActionsButton();
597
+ await this.clickDeployMenuItem();
598
+ }
599
+ async clickDeploySubButton() {
600
+ await this.deploySubButton.click({ timeout: 90000 });
601
+ }
602
+ async clickCancelButton() {
603
+ await this.cancelButton.click();
604
+ }
605
+ async clickRestConnectorOption() {
606
+ const maxRetries = 4;
607
+ for (let retries = 0; retries < maxRetries; retries++) {
608
+ try {
609
+ if (retries === 0) {
610
+ // First attempt
611
+ await this.restConnectorOption.highlight();
612
+ await this.restConnectorOption.click({ timeout: 60000 });
613
+ }
614
+ else if (retries === 1 || retries === 2) {
615
+ // Second or third attempt
616
+ await this.page.reload();
617
+ await this.secondElement.click({ timeout: 60000 });
618
+ await this.changeTypeButton.click({ force: true, timeout: 60000 });
619
+ await this.restConnectorOption.click({ timeout: 90000 });
620
+ }
621
+ else {
622
+ // Forth and subsequent attempts
623
+ await this.clickMarketPlaceButton();
624
+ const connectorMarketplacePage = new ConnectorMarketplacePage_1.ConnectorMarketplacePage(this.page);
625
+ await connectorMarketplacePage.clickSearchForConnectorTextbox();
626
+ await (0, sleep_1.sleep)(5000);
627
+ await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
628
+ await connectorMarketplacePage.downloadConnectorToProject();
629
+ await this.restConnectorOption.click({ timeout: 120000 });
630
+ }
631
+ return;
632
+ }
633
+ catch (error) {
634
+ console.error(`Click attempt ${retries + 1} failed: ${error}`);
635
+ await new Promise((resolve) => setTimeout(resolve, 10000));
636
+ }
637
+ }
638
+ throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
639
+ }
640
+ async clickMarketPlaceButton() {
641
+ const maxRetries = 3;
642
+ for (let retries = 0; retries < maxRetries; retries++) {
643
+ try {
644
+ if (retries === 0) {
645
+ await this.marketPlaceButton.click({ timeout: 30000 });
646
+ }
647
+ else {
648
+ await this.changeTypeButton.click({ force: true, timeout: 30000 });
649
+ await this.marketPlaceButton.click({ timeout: 30000 });
650
+ }
651
+ return;
652
+ }
653
+ catch (error) {
654
+ console.error(`Click attempt ${retries + 1} failed: ${error}`);
655
+ await new Promise((resolve) => setTimeout(resolve, 10000));
656
+ }
657
+ }
658
+ throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
659
+ }
660
+ async completeDeploymentEndpointConfiguration() {
661
+ await (0, test_1.expect)(this.clientIdTextbox).toBeVisible({ timeout: 60000 });
662
+ await this.clientIdTextbox.click({ timeout: 30000 });
663
+ await this.clientIdTextbox.fill('test', { timeout: 30000 });
664
+ await this.clientSecretTextbox.click({ timeout: 30000 });
665
+ await this.clientSecretTextbox.fill(process.env.DISTRO_QA_E2E_TESTS_KEYCLOAK_CLIENTS_SECRET);
666
+ await this.rememberCredentialsCheckbox.click({ timeout: 30000 });
667
+ }
668
+ async completePlayConfiguration() {
669
+ const timeout = 30000;
670
+ let attempts = 0;
671
+ const maxRetries = 2;
672
+ while (attempts < maxRetries) {
673
+ try {
674
+ if (attempts > 0)
675
+ await this.switchToPlay(); // Call switchToPlay on subsequent attempts
676
+ await this.continueToPlayButton.click({ timeout });
677
+ await (0, test_1.expect)(this.page.getByText('Play environment is ready')).toBeVisible({ timeout: 90000 });
678
+ return; // Exit if successful
679
+ }
680
+ catch (error) {
681
+ if (attempts >= maxRetries - 1)
682
+ throw error;
683
+ await this.page.reload();
684
+ attempts++;
685
+ }
686
+ }
687
+ }
688
+ async clickWebhookMessageStartEventConnectorOption() {
689
+ const maxRetries = 3;
690
+ for (let retries = 0; retries < maxRetries; retries++) {
691
+ try {
692
+ if (retries === 0) {
693
+ await this.webhookMessageStartEventConnectorOption.click({
694
+ timeout: 30000,
695
+ });
696
+ }
697
+ else {
698
+ await this.page.reload();
699
+ await this.changeTypeButton.click({ force: true, timeout: 30000 });
700
+ await this.webhookMessageStartEventConnectorOption.click({
701
+ timeout: 90000,
702
+ });
703
+ }
704
+ return;
705
+ }
706
+ catch (error) {
707
+ console.error(`Click attempt ${retries + 1} failed: ${error}`);
708
+ await new Promise((resolve) => setTimeout(resolve, 10000));
709
+ }
710
+ }
711
+ throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
712
+ }
713
+ async clickWebhookIdInput() {
714
+ await this.webhookIdInput.click();
715
+ }
716
+ async clearWebhookIdInput() {
717
+ await this.webhookIdInput.clear();
718
+ }
719
+ async fillWebhookIdInput(webhookId) {
720
+ await this.webhookIdInput.fill(webhookId);
721
+ }
722
+ async hoverOnStartEvent() {
723
+ await this.hoverOnLocator(this.startEventElement, '.djs-context-pad');
724
+ }
725
+ async instanceStartedAssertion() {
726
+ await (0, test_1.expect)(this.page.getByText('Instance started!')).toBeVisible({
727
+ timeout: 10000,
728
+ });
729
+ }
730
+ async assertImplementationOption(implementationType) {
731
+ await this.expandImplementationOptionIfNecessary();
732
+ (0, test_1.expect)(await this.implementationOptions.inputValue()).toEqual(implementationType);
733
+ }
734
+ async chooseImplementationOption(implementationType) {
735
+ // Wait for implementation section to be attached and stable after task type change
736
+ await this.implementationSection.waitFor({
737
+ state: 'attached',
738
+ timeout: 10000,
739
+ });
740
+ await this.implementationSection.click({ timeout: 30000 });
741
+ if ((await this.implementationOptions.inputValue()) == implementationType) {
742
+ console.log(`${implementationType} is already selected.`);
743
+ }
744
+ else {
745
+ await this.implementationOptions.selectOption(implementationType);
746
+ }
747
+ await this.assertImplementationOption(implementationType);
748
+ }
749
+ async expandImplementationOptionIfNecessary() {
750
+ const isExpanded = (await this.implementationSection
751
+ .locator('.bio-properties-panel-group-header empty open')
752
+ .count()) > 0;
753
+ if (!isExpanded) {
754
+ await this.implementationSection.click();
755
+ }
756
+ }
757
+ async expandAssignmentSection() {
758
+ const isExpanded = (await this.assignmentSection
759
+ .locator('[data-group-id="group-assignmentDefinition"] .bio-properties-panel-group-header.open')
760
+ .count()) > 0;
761
+ if (!isExpanded) {
762
+ await this.assignmentSection.click({ timeout: 60000 });
763
+ }
764
+ }
765
+ async clickAppendElementButton() {
766
+ for (let attempt = 1; attempt <= 3; attempt++) {
767
+ try {
768
+ await this.hoverOnLocator(this.appendPreButton);
769
+ return; // Exit loop if successful
770
+ }
771
+ catch (error) {
772
+ if (attempt === 3)
773
+ throw error; // Rethrow after 3 failed attempts
774
+ }
775
+ }
776
+ }
777
+ async clickParallelGatewayOption() {
778
+ await this.parallelGatewayOption.click({ timeout: 90000 });
779
+ }
780
+ async clickConnectToOtherElementButton() {
781
+ await this.connectToOtherElementButton.click({ timeout: 60000 });
782
+ }
783
+ async clickPriorityInput() {
784
+ try {
785
+ await this.priorityInput.click();
786
+ }
787
+ catch (error) {
788
+ await this.assignmentSection.click({ timeout: 60000 });
789
+ await this.priorityInput.click({ timeout: 60000 });
790
+ }
791
+ }
792
+ async fillPriorityInput(priority) {
793
+ await this.priorityInput.fill(priority, { timeout: 60000 });
794
+ }
795
+ async clickCanvas() {
796
+ await this.canvas.click({ timeout: 60000 });
797
+ }
798
+ async addParallelUserTasks(numberOfTasks, taskName) {
799
+ try {
800
+ await this.clickAppendElementButton();
801
+ }
802
+ catch (error) {
803
+ await this.page.reload();
804
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
805
+ await sleep(10000);
806
+ await this.clickFirstPlacedElement();
807
+ await this.hoverOnLocator(this.appendElementButton);
808
+ }
809
+ await this.clickAppendGatewayButton();
810
+ await this.clickChangeTypeButton();
811
+ await this.clickParallelGatewayOption();
812
+ await this.clickAppendElementButton();
813
+ await this.clickAppendTaskButton();
814
+ await this.clickChangeTypeButton();
815
+ await this.clickUserTaskOption();
816
+ await this.clickGeneralPropertiesPanel();
817
+ await this.clickNameInput();
818
+ await this.fillNameInput(taskName + '1');
819
+ await this.clickIdInput();
820
+ await this.fillIdInput(taskName + '1');
821
+ await this.assertImplementationOption('zeebeUserTask');
822
+ await this.clickAppendElementButton();
823
+ await this.clickAppendGatewayButton();
824
+ await this.clickChangeTypeButton();
825
+ await this.clickParallelGatewayOption();
826
+ for (let i = 2; i <= numberOfTasks; i++) {
827
+ await this.clickFirstPlacedGateway();
828
+ await this.clickAppendElementButton();
829
+ await this.clickAppendTaskButton();
830
+ await this.clickChangeTypeButton();
831
+ await this.clickUserTaskOption();
832
+ await this.clickNameInput();
833
+ await this.fillNameInput(taskName + i);
834
+ await this.clickIdInput();
835
+ await this.fillIdInput(taskName + i);
836
+ await this.assertImplementationOption('zeebeUserTask');
837
+ await this.clickConnectToOtherElementButton();
838
+ await this.clickSecondPlacedGateway();
839
+ await this.clickCanvas();
840
+ }
841
+ await this.clickSecondPlacedGateway();
842
+ }
843
+ async setPriority(taskName, priority, numberOfTasks) {
844
+ for (let i = 1; i <= numberOfTasks; i++) {
845
+ const userTaskId = taskName + i;
846
+ const priorityUserTask = this.page.locator(`g[data-element-id="${userTaskId}"]`);
847
+ await priorityUserTask.click();
848
+ await this.expandAssignmentSection();
849
+ await this.clickPriorityInput();
850
+ await this.fillPriorityInput(priority.toString());
851
+ await (0, sleep_1.sleep)(5000);
852
+ await this.clickCanvas();
853
+ priority += 25;
854
+ }
855
+ }
856
+ async clickIntermediateBoundaryEvent() {
857
+ await this.intermediateBoundaryEvent.click({ timeout: 60000 });
858
+ }
859
+ async clickIntermediateWebhookConnectorOption() {
860
+ try {
861
+ await (0, test_1.expect)(this.intermediateWebhookConnectorOption).toBeVisible({
862
+ timeout: 20000,
863
+ });
864
+ await this.intermediateWebhookConnectorOption.click();
865
+ }
866
+ catch (error) {
867
+ await this.page.reload();
868
+ await (0, test_1.expect)(this.secondElement).toBeVisible({ timeout: 20000 });
869
+ await this.secondElement.click();
870
+ await this.changeTypeButton.click({ force: true });
871
+ await this.intermediateWebhookConnectorOption.click();
872
+ }
873
+ }
874
+ async clickCorrelationKeyProcessInput() {
875
+ await this.correlationKeyProcessInput.click({ timeout: 60000 });
876
+ }
877
+ async fillCorrelationKeyProcessInput(correlationKeyProcess) {
878
+ await this.correlationKeyProcessInput.fill(correlationKeyProcess);
879
+ await (0, test_1.expect)(this.page.getByText('Correlation key (process) must not be empty.')).not.toBeVisible({ timeout: 30000 });
880
+ }
881
+ async clickCorrelationKeyPayloadInput() {
882
+ await this.correlationKeyPayloadInput.click({ timeout: 60000 });
883
+ }
884
+ async fillCorrelationKeyPayloadInput(correlationKeyPayload) {
885
+ await this.correlationKeyPayloadInput.fill(correlationKeyPayload);
886
+ await (0, test_1.expect)(this.page.getByText('Correlation key (payload) must not be empty.')).not.toBeVisible({ timeout: 30000 });
887
+ }
888
+ async selectUserTask(userTask) {
889
+ await this.page.locator(`[data-element-id="${userTask}"]`).click();
890
+ }
891
+ async clickCandidateUsersInput() {
892
+ await this.candidateUsersInput.click({ timeout: 60000 });
893
+ }
894
+ async fillCandidateUsersInput(candidateUser) {
895
+ await this.candidateUsersInput.fill(candidateUser, { timeout: 60000 });
896
+ await this.page.waitForTimeout(1000);
897
+ }
898
+ async clickCandidateGroupsInput() {
899
+ await this.candidateGroupsInput.click({ timeout: 60000 });
900
+ }
901
+ async fillCandidateGroupsInput(candidateGroup) {
902
+ await this.candidateGroupsInput.fill(candidateGroup, { timeout: 60000 });
903
+ }
904
+ async clickAssigneeInput() {
905
+ await this.assigneeInput.click({ timeout: 60000 });
906
+ }
907
+ async fillAssigneeInput(name) {
908
+ await this.assigneeInput.fill(name, { timeout: 60000 });
909
+ await this.page.waitForTimeout(1000);
910
+ }
911
+ async clickTenantIdInput() {
912
+ await (0, test_1.expect)(this.tenantIdInput).toBeVisible({ timeout: 60000 });
913
+ await this.tenantIdInput.click({ timeout: 60000 });
914
+ }
915
+ async fillTenantIdInput(tenant) {
916
+ await this.tenantIdInput.fill(tenant, { timeout: 60000 });
917
+ await (0, sleep_1.sleep)(1000);
918
+ }
919
+ async clickTimerEventOption() {
920
+ await this.timerEventOption.click();
921
+ }
922
+ async clickTimerEventSettings() {
923
+ await this.timerEventSettings.click();
924
+ }
925
+ async selectTimerType(type) {
926
+ await this.timerType.selectOption(type);
927
+ await (0, test_1.expect)(this.page.getByText('Type must be defined.')).not.toBeVisible({
928
+ timeout: 30000,
929
+ });
930
+ }
931
+ async clickTimerValue() {
932
+ await this.timerValue.click();
933
+ }
934
+ async fillTimerValue(value) {
935
+ await this.timerValue.fill(value);
936
+ await (0, test_1.expect)(this.page.getByText('Value must be defined.')).not.toBeVisible({ timeout: 30000 });
937
+ await (0, sleep_1.sleep)(10000);
938
+ }
939
+ async clickEighthPlacedElement() {
940
+ await this.eighthPlacedElement.click();
941
+ }
942
+ async assertNameInput(processName) {
943
+ try {
944
+ await (0, test_1.expect)(this.nameInput).toHaveValue(processName, { timeout: 2000 });
945
+ }
946
+ catch {
947
+ await this.nameInput.click();
948
+ await this.nameInput.fill(processName);
949
+ await (0, test_1.expect)(this.nameInput).toHaveValue(processName);
950
+ }
951
+ }
952
+ async switchToImplementTab() {
953
+ await this.implementTab.click({ timeout: 30000 });
954
+ }
955
+ async clickStartEvent() {
956
+ await this.startEventElement.click({ timeout: 30000 });
957
+ }
958
+ async clickContinueToPlay() {
959
+ await this.continueToPlayButton.click({ timeout: 30000 });
960
+ }
961
+ async assertScenarioNameVisible(scenarioName) {
962
+ await (0, test_1.expect)(this.page.getByTestId('instance-header').getByText(scenarioName)).toBeVisible();
963
+ }
964
+ async fillStartEventVariablesForDocHandling(zeebeUrl, zeebeClientId, zeebeClientSecret) {
965
+ console.log(`URL: ${zeebeUrl}, ClientId: ${zeebeClientId}, Secret: ${zeebeClientSecret}`);
966
+ (0, test_1.expect)(this.connectorsDocHandlingStartEventElement).toBeVisible({
967
+ timeout: 60000,
968
+ });
969
+ await this.connectorsDocHandlingStartEventElement.click();
970
+ (0, test_1.expect)(this.startEventVariableInputWithThreeVariables).toBeVisible({
971
+ timeout: 60000,
972
+ });
973
+ await this.startEventVariableInputWithThreeVariables.click();
974
+ await this.fillZeebeRestValue(zeebeUrl);
975
+ await this.fillZeebeSecretValue(zeebeClientSecret);
976
+ await this.fillZeebeClientId(zeebeClientId);
977
+ await (0, sleep_1.sleep)(1000);
978
+ }
979
+ async fillZeebeClientId(clientId) {
980
+ await this.zeebeClientIdVariable.click();
981
+ await (0, test_1.expect)(this.variableAssignmentValueTextboxThirdVariable).toBeVisible({
982
+ timeout: 60000,
983
+ });
984
+ await this.variableAssignmentValueTextboxThirdVariable.click();
985
+ await (0, sleep_1.sleep)(1000);
986
+ await this.variableAssignmentValueTextboxThirdVariable.fill('');
987
+ await this.variableAssignmentValueTextboxThirdVariable.fill(clientId);
988
+ await (0, test_1.expect)(this.variableAssignmentValueTextboxThirdVariable).toHaveText(clientId);
989
+ }
990
+ async fillZeebeSecretValue(zeebeSecret) {
991
+ await this.zeebeSecretVariable.click();
992
+ await (0, test_1.expect)(this.variableAssignmentValueTextboxSecondVariable).toBeVisible({
993
+ timeout: 60000,
994
+ });
995
+ await this.variableAssignmentValueTextboxSecondVariable.click();
996
+ await (0, sleep_1.sleep)(1000);
997
+ await this.variableAssignmentValueTextboxSecondVariable.fill('');
998
+ await this.variableAssignmentValueTextboxSecondVariable.fill(zeebeSecret);
999
+ await (0, test_1.expect)(this.variableAssignmentValueTextboxSecondVariable).toHaveText(zeebeSecret);
1000
+ }
1001
+ async fillZeebeRestValue(zeebeUrl) {
1002
+ await this.zeebeRestAddressVariable.click();
1003
+ await (0, test_1.expect)(this.variableAssignmentValueTextbox).toBeVisible({
1004
+ timeout: 60000,
1005
+ });
1006
+ await this.variableAssignmentValueTextbox.click();
1007
+ await (0, sleep_1.sleep)(1000);
1008
+ await this.variableAssignmentValueTextbox.fill('');
1009
+ await this.variableAssignmentValueTextbox.fill(zeebeUrl);
1010
+ await (0, test_1.expect)(this.variableAssignmentValueTextbox).toHaveText(zeebeUrl);
1011
+ }
1012
+ async embedForm(formName) {
1013
+ await this.clickEmbedFormButton();
1014
+ await this.clickForm(formName);
1015
+ await this.clickEmbedButton();
1016
+ }
1017
+ async clickFirstPlaceRESTConnector() {
1018
+ await this.firstPlaceRESTConnector.click({ timeout: 60000 });
1019
+ }
1020
+ async setOAuthTokenEndpoint(elementToClick, endpoint, options) {
1021
+ const retries = options?.retries ?? 2;
1022
+ const settleMs = options?.settleMs ?? 250;
1023
+ const openPanel = options?.openPanel ?? false;
1024
+ await elementToClick.click({ timeout: 60000 });
1025
+ if (openPanel) {
1026
+ await this.clickOpenDetailsPanel();
1027
+ }
1028
+ await this.authenticationPanel.click({ timeout: 60000 });
1029
+ let lastError;
1030
+ for (let attempt = 1; attempt <= retries; attempt++) {
1031
+ try {
1032
+ await (0, test_1.expect)(this.oauthTokenEndpointInput).toBeVisible({ timeout: 3000 });
1033
+ await this.oauthTokenEndpointInput.click({ timeout: 3000 });
1034
+ await this.oauthTokenEndpointInput.fill(endpoint, { timeout: 30000 });
1035
+ return;
1036
+ }
1037
+ catch (err) {
1038
+ lastError = err;
1039
+ await this.authenticationPanel.click({ timeout: 60000 });
1040
+ await (0, sleep_1.sleep)(settleMs);
1041
+ }
1042
+ }
1043
+ throw new Error(`Failed to set OAuth 2.0 token endpoint after ${retries} attempt(s). Last error: ${String(lastError)}`);
1044
+ }
1045
+ async clickCloseDetailsPanel() {
1046
+ await this.closeDetailsPanel.click({ timeout: 30000 });
1047
+ }
1048
+ async clickOpenDetailsPanel() {
1049
+ await this.openDetailsPanel.click({ timeout: 30000 });
1050
+ }
1051
+ }
1052
+ exports.ModelerCreatePage = ModelerCreatePage;