@camunda/e2e-test-suite 0.0.201 → 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 +8 -4
  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,402 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConsoleOrganizationPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const sleep_1 = require("../../utils/sleep");
6
+ class ConsoleOrganizationPage {
7
+ page;
8
+ usersTab;
9
+ optionsButton;
10
+ editUserMenuItem;
11
+ modelerCheckbox;
12
+ adminCheckbox;
13
+ analystCheckbox;
14
+ confirmButton;
15
+ settingsTab;
16
+ optInButton;
17
+ optInCheckbox;
18
+ newContextPadButton;
19
+ newContextPadButtonText;
20
+ mainUser;
21
+ dialog;
22
+ idComboBox;
23
+ readPermissionCheckbox;
24
+ startProcessIPermissionCheckbox;
25
+ optInAICheckbox;
26
+ rows;
27
+ groupsTab;
28
+ createGroupButton;
29
+ createGroupSubButton;
30
+ groupNameInput;
31
+ noGroupsHeading;
32
+ createFirstGroupButton;
33
+ createGroupDialoge;
34
+ assignMembersButton;
35
+ assignMembersSubButton;
36
+ assignMembersSearchbox;
37
+ assignMembersSearchResult;
38
+ organizationManagementLink;
39
+ deleteSubButton;
40
+ deleteButton;
41
+ filterTableSearchbox;
42
+ constructor(page) {
43
+ this.page = page;
44
+ this.usersTab = page.getByRole('tab', { name: 'Users' });
45
+ this.optionsButton = page.getByRole('button', { name: 'Options' });
46
+ this.editUserMenuItem = page.getByRole('menuitem', { name: 'Edit User' });
47
+ this.modelerCheckbox = page
48
+ .getByRole('group')
49
+ .locator('label')
50
+ .filter({ hasText: 'Modeler' });
51
+ this.adminCheckbox = page
52
+ .getByRole('group')
53
+ .locator('label')
54
+ .filter({ hasText: 'Admin' });
55
+ this.analystCheckbox = page
56
+ .getByRole('group')
57
+ .locator('label')
58
+ .filter({ hasText: 'Analyst' });
59
+ this.confirmButton = page.getByRole('button', { name: 'Confirm' });
60
+ this.settingsTab = page.getByRole('tab', { name: 'Settings' });
61
+ this.optInButton = page.getByRole('button', { name: 'Opt-in', exact: true });
62
+ this.optInCheckbox = page.getByLabel('I understand and agree to the');
63
+ this.newContextPadButton = page.getByRole('switch').last();
64
+ this.newContextPadButtonText = page
65
+ .locator('[class= "cds--toggle__text"]')
66
+ .last();
67
+ this.mainUser = page
68
+ .getByRole('row')
69
+ .filter({ hasText: process.env.C8_USERNAME });
70
+ this.dialog = page.getByRole('dialog');
71
+ this.idComboBox = page.getByRole('combobox', { name: 'ID' });
72
+ this.readPermissionCheckbox = page.getByRole('checkbox', {
73
+ name: 'Read definition',
74
+ });
75
+ this.startProcessIPermissionCheckbox = page.getByRole('checkbox', {
76
+ name: 'Start process instance',
77
+ });
78
+ this.optInAICheckbox = page.getByLabel('I understand and agree to Terms for AI Usage');
79
+ this.rows = this.page.getByRole('row');
80
+ this.groupsTab = page.getByRole('tab', { name: 'Groups' });
81
+ this.createGroupButton = page.getByRole('button', {
82
+ name: 'create group',
83
+ });
84
+ this.createGroupSubButton = page
85
+ .getByRole('button', {
86
+ name: 'create group',
87
+ })
88
+ .last();
89
+ this.groupNameInput = page.getByRole('textbox', { name: 'name' });
90
+ this.noGroupsHeading = page.getByRole('heading', {
91
+ name: 'you don’t have any groups yet',
92
+ });
93
+ this.createFirstGroupButton = page.getByRole('button', {
94
+ name: 'create a group',
95
+ });
96
+ this.createGroupDialoge = page.getByRole('dialog', {
97
+ name: 'create group',
98
+ });
99
+ this.assignMembersButton = page.getByRole('button', {
100
+ name: 'assign members',
101
+ });
102
+ this.assignMembersSubButton = page
103
+ .getByRole('button', {
104
+ name: 'assign',
105
+ })
106
+ .last();
107
+ this.assignMembersSearchbox = page.getByRole('searchbox', {
108
+ name: 'search by full name or email address',
109
+ });
110
+ this.assignMembersSearchResult = page.locator('.cds--list-box__menu-item');
111
+ this.organizationManagementLink = page.getByRole('link', {
112
+ name: 'organization management',
113
+ });
114
+ this.deleteButton = page.getByRole('button', { name: 'delete' });
115
+ this.deleteSubButton = page
116
+ .getByRole('button', {
117
+ name: 'danger',
118
+ })
119
+ .last();
120
+ this.filterTableSearchbox = page.getByRole('searchbox', {
121
+ name: 'Filter table',
122
+ });
123
+ }
124
+ async filterTable(names) {
125
+ for (const name of names) {
126
+ await this.filterTableSearchbox.click({ timeout: 60000 });
127
+ await this.filterTableSearchbox.fill(name);
128
+ }
129
+ }
130
+ async clickProcessIdInput() {
131
+ await (0, test_1.expect)(this.idComboBox).toBeVisible({ timeout: 60000 });
132
+ await this.idComboBox.click();
133
+ }
134
+ async fillProcessIdInput(processId) {
135
+ await this.idComboBox.fill(processId);
136
+ }
137
+ async checkReadPermissionCheckbox() {
138
+ await (0, test_1.expect)(this.readPermissionCheckbox).toBeVisible({ timeout: 60000 });
139
+ if (!(await this.readPermissionCheckbox.isChecked())) {
140
+ await this.readPermissionCheckbox.click({ force: true });
141
+ }
142
+ }
143
+ async checkStartInstancePermissionCheckbox() {
144
+ if (!(await this.startProcessIPermissionCheckbox.isChecked({ timeout: 60000 }))) {
145
+ await this.startProcessIPermissionCheckbox.click({ force: true });
146
+ }
147
+ }
148
+ async clickUsersTab() {
149
+ await this.usersTab.click({ timeout: 60000 });
150
+ }
151
+ async selectAnalystRole(username) {
152
+ await this.filterTable([username]);
153
+ await this.clickOptionsButton();
154
+ await this.clickEditUserMenuItem();
155
+ await this.checkAnalystCheckbox();
156
+ await this.uncheckModelerCheckbox();
157
+ await this.uncheckAdminCheckbox();
158
+ await this.clickConfirmButton();
159
+ await (0, test_1.expect)(this.page.getByText('Updating...')).not.toBeVisible({
160
+ timeout: 90000,
161
+ });
162
+ }
163
+ async selectModelerRole(username) {
164
+ await this.filterTable([username]);
165
+ await this.clickOptionsButton();
166
+ await this.clickEditUserMenuItem();
167
+ await this.uncheckAnalystCheckbox();
168
+ await this.uncheckAdminCheckbox();
169
+ await this.checkModelerCheckbox();
170
+ await this.clickConfirmButton();
171
+ await (0, test_1.expect)(this.page.getByText('Updating...')).not.toBeVisible({
172
+ timeout: 90000,
173
+ });
174
+ }
175
+ async selectAdminRole(username) {
176
+ await this.filterTable([username]);
177
+ await this.clickOptionsButton();
178
+ await this.clickEditUserMenuItem();
179
+ await this.uncheckAnalystCheckbox();
180
+ await this.uncheckModelerCheckbox();
181
+ await this.checkAdminCheckbox();
182
+ await this.clickConfirmButton();
183
+ await (0, test_1.expect)(this.page.getByText('Updating...')).not.toBeVisible({
184
+ timeout: 90000,
185
+ });
186
+ }
187
+ async clickOptionsButton() {
188
+ await this.optionsButton.click({ timeout: 60000 });
189
+ }
190
+ async clickEditUserMenuItem() {
191
+ await this.editUserMenuItem.click({ timeout: 60000 });
192
+ }
193
+ async checkModelerCheckbox() {
194
+ if (!(await this.modelerCheckbox.isChecked({ timeout: 60000 }))) {
195
+ await this.modelerCheckbox.click({ timeout: 60000 });
196
+ }
197
+ }
198
+ async checkAdminCheckbox() {
199
+ if (!(await this.adminCheckbox.isChecked({ timeout: 60000 }))) {
200
+ await this.adminCheckbox.click({ timeout: 60000 });
201
+ }
202
+ }
203
+ async checkAnalystCheckbox() {
204
+ if (!(await this.analystCheckbox.isChecked({ timeout: 60000 }))) {
205
+ await this.analystCheckbox.click({ timeout: 60000 });
206
+ }
207
+ }
208
+ async uncheckAnalystCheckbox() {
209
+ if (await this.analystCheckbox.isChecked({ timeout: 60000 })) {
210
+ await this.analystCheckbox.click({ timeout: 60000 });
211
+ }
212
+ }
213
+ async uncheckModelerCheckbox() {
214
+ if (await this.modelerCheckbox.isChecked({ timeout: 60000 })) {
215
+ await this.modelerCheckbox.click({ timeout: 60000 });
216
+ }
217
+ }
218
+ async uncheckAdminCheckbox() {
219
+ if (await this.adminCheckbox.isChecked({ timeout: 60000 })) {
220
+ await this.adminCheckbox.click({ timeout: 60000 });
221
+ }
222
+ }
223
+ async clickConfirmButton() {
224
+ await this.confirmButton.click({ timeout: 60000 });
225
+ }
226
+ async clickSettingsTab() {
227
+ await this.settingsTab.click({ timeout: 120000 });
228
+ try {
229
+ await (0, test_1.expect)(this.page.getByRole('heading', { name: 'Alpha features' })).toBeVisible({
230
+ timeout: 120000,
231
+ });
232
+ }
233
+ catch (error) {
234
+ await this.settingsTab.click({ timeout: 120000 });
235
+ }
236
+ }
237
+ async clickOptInButton() {
238
+ await this.optInButton.click({ timeout: 60000 });
239
+ }
240
+ async enableAlphaFeature(name) {
241
+ await (0, test_1.expect)(this.rows.first()).toBeVisible({ timeout: 10000 });
242
+ const alphaFeature = this.rows.filter({ hasText: name }).first();
243
+ if ((await alphaFeature.count()) < 1) {
244
+ console.error(`No alpha feature(${name}) is found.`);
245
+ return;
246
+ }
247
+ //Opt-in The Alpha Feature
248
+ const alphaFeatureOptInButton = alphaFeature.getByRole('button', {
249
+ name: 'Opt-in to enable',
250
+ });
251
+ if (await alphaFeatureOptInButton.isVisible({ timeout: 10000 })) {
252
+ await alphaFeatureOptInButton.click({ timeout: 90000 });
253
+ await this.optInAICheckbox.scrollIntoViewIfNeeded();
254
+ await this.optInAICheckbox.check({ timeout: 90000 });
255
+ await (0, sleep_1.sleep)(3000);
256
+ }
257
+ //Enable Alpha Feature
258
+ const toggleText = await alphaFeature
259
+ .locator('[class= "cds--toggle__text"]')
260
+ .textContent();
261
+ console.info(`Previous feature(${name}) setting is ${toggleText}.`);
262
+ if (toggleText == 'Enabled') {
263
+ console.log(`Feature ${name} is already enabled.`);
264
+ return;
265
+ }
266
+ if (toggleText == 'Disabled') {
267
+ await alphaFeature
268
+ .locator('[class= "cds--toggle__switch"]')
269
+ .first()
270
+ .click();
271
+ await (0, sleep_1.sleep)(10000);
272
+ }
273
+ await (0, test_1.expect)(alphaFeature.locator('[class= "cds--toggle__text"]')).toHaveText('Enabled');
274
+ }
275
+ async scrollToOptInCheckbox() {
276
+ await this.page
277
+ .getByText('Access and Use of the Camunda')
278
+ .scrollIntoViewIfNeeded();
279
+ await this.page
280
+ .getByText('Pre-release. The Customer')
281
+ .scrollIntoViewIfNeeded();
282
+ await this.page
283
+ .getByText('Confidential Information. The')
284
+ .scrollIntoViewIfNeeded();
285
+ await this.page
286
+ .getByText('THESE TERMS DO NOT ENTITLE')
287
+ .scrollIntoViewIfNeeded();
288
+ await this.page
289
+ .getByText('Rights and Obligations Upon')
290
+ .scrollIntoViewIfNeeded();
291
+ await this.page
292
+ .getByText('NOTWITHSTANDING ANYTHING TO')
293
+ .scrollIntoViewIfNeeded();
294
+ await this.page
295
+ .getByRole('heading', { name: 'General' })
296
+ .scrollIntoViewIfNeeded();
297
+ await this.page
298
+ .getByText('Liability. Camunda is liable')
299
+ .scrollIntoViewIfNeeded();
300
+ await this.page
301
+ .getByLabel('I understand and agree to the')
302
+ .scrollIntoViewIfNeeded();
303
+ }
304
+ async checkOptInCheckbox() {
305
+ await this.optInCheckbox.check({ timeout: 90000 });
306
+ }
307
+ async clickMainUser() {
308
+ await (0, test_1.expect)(this.mainUser).toBeVisible({ timeout: 60000 });
309
+ await this.mainUser.click();
310
+ }
311
+ async clickNewContextPadButton() {
312
+ try {
313
+ await (0, test_1.expect)(this.newContextPadButtonText).toHaveText('Enabled', {
314
+ timeout: 90000,
315
+ });
316
+ }
317
+ catch {
318
+ await this.page.reload();
319
+ await this.newContextPadButton.click({ timeout: 90000 });
320
+ await (0, test_1.expect)(this.newContextPadButtonText).toHaveText('Enabled', {
321
+ timeout: 60000,
322
+ });
323
+ }
324
+ }
325
+ async optInToAlphaFeatures() {
326
+ try {
327
+ await (0, test_1.expect)(this.optInButton).toBeVisible({ timeout: 30000 });
328
+ await this.clickOptInButton();
329
+ await this.scrollToOptInCheckbox();
330
+ await this.checkOptInCheckbox();
331
+ }
332
+ catch {
333
+ await (0, test_1.expect)(this.optInButton).not.toBeVisible();
334
+ }
335
+ }
336
+ async clickGroupsTab() {
337
+ await this.groupsTab.click({ timeout: 60000 });
338
+ }
339
+ async clickCreateGroupButton() {
340
+ const maxRetries = 3;
341
+ for (let retries = 0; retries < maxRetries; retries++) {
342
+ try {
343
+ if (!(await this.noGroupsHeading.isVisible({ timeout: 120000 }))) {
344
+ await this.createGroupButton.click();
345
+ }
346
+ else {
347
+ await this.createFirstGroupButton.click();
348
+ }
349
+ return;
350
+ }
351
+ catch (error) {
352
+ console.error(`Click attempt ${retries + 1} failed`);
353
+ }
354
+ }
355
+ throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
356
+ }
357
+ async fillGroupNameInput(name) {
358
+ await this.groupNameInput.fill(name);
359
+ }
360
+ async clickCreateGroupSubButton() {
361
+ await this.createGroupSubButton.click();
362
+ }
363
+ async clickUserGroup(name) {
364
+ await this.page.getByRole('cell', { name: name }).click();
365
+ }
366
+ async clickAssignMembers() {
367
+ await this.assignMembersButton.click();
368
+ }
369
+ async fillAssignMembers(names) {
370
+ for (const name of names) {
371
+ await this.assignMembersSearchbox.click();
372
+ await this.assignMembersSearchbox.fill(name);
373
+ await this.assignMembersSearchResult
374
+ .filter({ hasText: name })
375
+ .click({ timeout: 120000 });
376
+ }
377
+ }
378
+ async clickAssignSubButton() {
379
+ await this.assignMembersSubButton.click();
380
+ }
381
+ async clickOrganizationManagementLink() {
382
+ await this.organizationManagementLink.click();
383
+ }
384
+ async deleteAllGroups() {
385
+ try {
386
+ await this.deleteButton
387
+ .first()
388
+ .waitFor({ state: 'visible', timeout: 60000 });
389
+ const count = await this.deleteButton.count();
390
+ if (count > 0) {
391
+ for (let i = 0; i < count; i++) {
392
+ await this.deleteButton.nth(i).click({ timeout: 60000 });
393
+ await this.deleteSubButton.click({ timeout: 60000 });
394
+ }
395
+ }
396
+ }
397
+ catch (error) {
398
+ console.log('Delete Button Not Clicked ' + error);
399
+ }
400
+ }
401
+ }
402
+ exports.ConsoleOrganizationPage = ConsoleOrganizationPage;
@@ -0,0 +1,28 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class FormJsPage {
3
+ private page;
4
+ readonly aiFormGeneratorButton: Locator;
5
+ readonly formRequestInput: Locator;
6
+ readonly generateFormButton: Locator;
7
+ readonly formEditor: Locator;
8
+ readonly filePicker: Locator;
9
+ readonly textField: Locator;
10
+ readonly documentPreview: Locator;
11
+ readonly keyInput: Locator;
12
+ readonly uploadMultipleFilesToggle: Locator;
13
+ readonly documentReferenceInput: Locator;
14
+ readonly generalPanel: Locator;
15
+ readonly textFieldInForm: Locator;
16
+ constructor(page: Page);
17
+ generateAIForm(request?: string): Promise<void>;
18
+ clickAIFormGeneratorButton(): Promise<void>;
19
+ clickFormRequestInput(): Promise<void>;
20
+ fillFormRequestInput(formRequest: string): Promise<void>;
21
+ clickGenerateFormButton(): Promise<void>;
22
+ dragAndDrop(source: Locator, target: Locator): Promise<void>;
23
+ fillKeyInput(key: string): Promise<void>;
24
+ enableUploadMultipleFiles(): Promise<void>;
25
+ filldocumentReferenceInput(key: string): Promise<void>;
26
+ clickGeneralPropertiesPanel(): Promise<void>;
27
+ }
28
+ export { FormJsPage };
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormJsPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const sleep_1 = require("../../utils/sleep");
6
+ class FormJsPage {
7
+ page;
8
+ aiFormGeneratorButton;
9
+ formRequestInput;
10
+ generateFormButton;
11
+ formEditor;
12
+ filePicker;
13
+ textField;
14
+ documentPreview;
15
+ keyInput;
16
+ uploadMultipleFilesToggle;
17
+ documentReferenceInput;
18
+ generalPanel;
19
+ textFieldInForm;
20
+ constructor(page) {
21
+ this.page = page;
22
+ this.aiFormGeneratorButton = page.getByRole('button', {
23
+ name: 'AI Form Generator',
24
+ });
25
+ this.formRequestInput = page.getByPlaceholder('A form for an american standard loan request');
26
+ this.generateFormButton = page.getByRole('button', { name: 'Generate form' });
27
+ this.formEditor = page.getByLabel('Form Definition');
28
+ this.documentPreview = page.locator('button[data-field-type="documentPreview"]');
29
+ this.filePicker = page.locator('button[data-field-type="filepicker"]');
30
+ this.textField = page.locator('button[data-field-type="textfield"]');
31
+ this.keyInput = page.getByRole('textbox', { name: 'key' });
32
+ this.uploadMultipleFilesToggle = page.locator('div[data-entry-id="multiple"] .bio-properties-panel-toggle-switch__switcher');
33
+ this.documentReferenceInput = page.getByRole('textbox', {
34
+ name: 'document reference',
35
+ });
36
+ this.generalPanel = page.locator('[data-group-id="group-general"]').first();
37
+ this.textFieldInForm = page
38
+ .getByLabel('Form Definition')
39
+ .getByText('Text field');
40
+ }
41
+ async generateAIForm(request = 'Create a form with the following fields: 1. A text field with the label "Full Name" 2. A number with the label "Count" 3. A date input with the label "Date of birth"4. A Checkbox with the label "Agree"') {
42
+ await (0, test_1.expect)(this.aiFormGeneratorButton).toBeVisible({
43
+ timeout: 90000,
44
+ });
45
+ await this.clickAIFormGeneratorButton();
46
+ await this.clickFormRequestInput();
47
+ await this.fillFormRequestInput(request);
48
+ await this.clickGenerateFormButton();
49
+ await (0, test_1.expect)(this.page.getByText('Generating...')).toBeVisible();
50
+ await (0, test_1.expect)(this.page.getByText('Successfully generated smart form.')).toBeVisible({ timeout: 300000 });
51
+ await (0, sleep_1.sleep)(60000);
52
+ }
53
+ async clickAIFormGeneratorButton() {
54
+ await this.aiFormGeneratorButton.click();
55
+ }
56
+ async clickFormRequestInput() {
57
+ await this.formRequestInput.click();
58
+ }
59
+ async fillFormRequestInput(formRequest) {
60
+ await this.formRequestInput.fill(formRequest);
61
+ }
62
+ async clickGenerateFormButton() {
63
+ await this.generateFormButton.click();
64
+ }
65
+ async dragAndDrop(source, target) {
66
+ await source.waitFor();
67
+ await target.waitFor();
68
+ await source.dragTo(target);
69
+ }
70
+ async fillKeyInput(key) {
71
+ await this.keyInput.fill(key, { timeout: 60000 });
72
+ await (0, test_1.expect)(this.keyInput).toHaveValue(key, { timeout: 20000 });
73
+ await (0, sleep_1.sleep)(1000);
74
+ }
75
+ async enableUploadMultipleFiles() {
76
+ await this.uploadMultipleFilesToggle.click({ timeout: 60000 });
77
+ }
78
+ async filldocumentReferenceInput(key) {
79
+ await this.documentReferenceInput.fill(key, { timeout: 60000 });
80
+ }
81
+ async clickGeneralPropertiesPanel() {
82
+ await this.generalPanel.click({ timeout: 60000 });
83
+ }
84
+ }
85
+ exports.FormJsPage = FormJsPage;
@@ -0,0 +1,27 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class HomePage {
3
+ private page;
4
+ readonly dashboardTab: Locator;
5
+ readonly clusterTab: Locator;
6
+ readonly organizationTab: Locator;
7
+ readonly organizationViewTitle: Locator;
8
+ readonly welcomeMessage: Locator;
9
+ readonly informationDialog: Locator;
10
+ readonly camundaAppsButton: Locator;
11
+ readonly camundaComponentsButton: Locator;
12
+ readonly appSwitcher: Locator;
13
+ readonly openOrganizationButton: Locator;
14
+ readonly consoleBanner: Locator;
15
+ readonly modelerBanner: Locator;
16
+ readonly gettingStartedHeading: Locator;
17
+ readonly buttonSkipCustomization: Locator;
18
+ constructor(page: Page);
19
+ clickClusters(): Promise<void>;
20
+ clickDashboard(): Promise<void>;
21
+ clickOrganization(): Promise<void>;
22
+ closeInformationDialog(): Promise<void>;
23
+ organizationUuid(): string;
24
+ clickOpenOrganizationButton(): Promise<void>;
25
+ clickSkipCustomization(): Promise<void>;
26
+ }
27
+ export { HomePage };
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HomePage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ class HomePage {
6
+ page;
7
+ dashboardTab;
8
+ clusterTab;
9
+ organizationTab;
10
+ organizationViewTitle;
11
+ welcomeMessage;
12
+ informationDialog;
13
+ camundaAppsButton;
14
+ camundaComponentsButton;
15
+ appSwitcher;
16
+ openOrganizationButton;
17
+ consoleBanner;
18
+ modelerBanner;
19
+ gettingStartedHeading;
20
+ buttonSkipCustomization;
21
+ constructor(page) {
22
+ this.page = page;
23
+ this.dashboardTab = page.getByRole('link', { name: 'Dashboard' });
24
+ this.clusterTab = page
25
+ .getByRole('banner')
26
+ .getByRole('link', { name: 'Clusters' });
27
+ this.organizationTab = page.getByRole('link', { name: 'Organization' });
28
+ this.organizationViewTitle = page.getByText('Organization Management');
29
+ this.welcomeMessage = page.getByText('Welcome to Camunda!').first();
30
+ this.informationDialog = page.getByRole('button', {
31
+ name: 'Close',
32
+ });
33
+ this.camundaComponentsButton = page.getByLabel('Camunda components');
34
+ this.camundaAppsButton = page.getByLabel('Camunda apps');
35
+ this.appSwitcher = page.getByLabel('App Switcher');
36
+ this.openOrganizationButton = page.getByLabel('Open Organizations');
37
+ this.consoleBanner = page.getByRole('link', {
38
+ name: 'Camunda logo Console',
39
+ });
40
+ this.gettingStartedHeading = page.getByText('start by creating a project');
41
+ this.buttonSkipCustomization = page.getByRole('button', {
42
+ name: 'Skip customization',
43
+ });
44
+ this.modelerBanner = page.getByRole('banner', {
45
+ name: 'Camunda Modeler',
46
+ });
47
+ }
48
+ async clickClusters() {
49
+ await (0, test_1.expect)(this.clusterTab).toBeVisible({ timeout: 30000 });
50
+ await this.clusterTab.click({ timeout: 15000 });
51
+ }
52
+ async clickDashboard() {
53
+ await this.dashboardTab.click({ timeout: 90000 });
54
+ }
55
+ async clickOrganization() {
56
+ await this.organizationTab.click({ timeout: 90000 });
57
+ }
58
+ async closeInformationDialog() {
59
+ if (await this.informationDialog.isVisible({ timeout: 30000 })) {
60
+ await this.informationDialog.click({ timeout: 30000 });
61
+ }
62
+ }
63
+ organizationUuid() {
64
+ const uuidPattern = /\/org\/([a-f0-9-]+)/;
65
+ const originalMatch = this.page.url().match(uuidPattern);
66
+ if (!originalMatch || originalMatch.length != 2) {
67
+ throw new Error('Organization UUID not found in the URL');
68
+ }
69
+ return originalMatch[1];
70
+ }
71
+ async clickOpenOrganizationButton() {
72
+ await this.openOrganizationButton.click({ timeout: 60000 });
73
+ }
74
+ async clickSkipCustomization() {
75
+ try {
76
+ await (0, test_1.expect)(this.buttonSkipCustomization).toBeVisible({
77
+ timeout: 30000,
78
+ });
79
+ await this.buttonSkipCustomization.click({ timeout: 60000 });
80
+ await this.closeInformationDialog();
81
+ return;
82
+ }
83
+ catch (error) {
84
+ console.error(error);
85
+ }
86
+ }
87
+ }
88
+ exports.HomePage = HomePage;