@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,473 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IdentityUsersPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const sleep_1 = require("../../utils/sleep");
6
+ class IdentityUsersPage {
7
+ page;
8
+ usersTab;
9
+ optionsButton;
10
+ editUserMenuItem;
11
+ operationsEngineerCheckbox;
12
+ developerCheckbox;
13
+ analystCheckbox;
14
+ confirmButton;
15
+ settingsTab;
16
+ optInButton;
17
+ optInCheckbox;
18
+ newContextPadButton;
19
+ newContextPadButtonText;
20
+ mainUser;
21
+ authorizations;
22
+ noAuthorizedResourceMessage;
23
+ dialog;
24
+ deleteAuthorisedResourceButton;
25
+ deleteAuthorisedResourceSubButton;
26
+ createResourceAuthorizationButton;
27
+ createResourceAuthorizationDialog;
28
+ nextButton;
29
+ createButton;
30
+ idComboBox;
31
+ readPermissionCheckbox;
32
+ startProcessIPermissionCheckbox;
33
+ optInAICheckbox;
34
+ rows;
35
+ groupsTab;
36
+ createGroupButton;
37
+ createGroupSubButton;
38
+ groupNameInput;
39
+ noGroupsHeading;
40
+ createFirstGroupButton;
41
+ createGroupDialoge;
42
+ assignMembersButton;
43
+ assignMembersSubButton;
44
+ assignMembersSearchbox;
45
+ assignMembersSearchResult;
46
+ organizationManagementLink;
47
+ deleteSubButton;
48
+ deleteButton;
49
+ filterTableSearchbox;
50
+ assignAuthorizationButton;
51
+ assignedRolesTab;
52
+ constructor(page) {
53
+ this.page = page;
54
+ this.usersTab = page.getByRole('tab', { name: 'Users' });
55
+ this.optionsButton = page.getByRole('button', { name: 'Options' });
56
+ this.editUserMenuItem = page.getByRole('menuitem', { name: 'Edit User' });
57
+ this.operationsEngineerCheckbox = page
58
+ .getByRole('group')
59
+ .locator('label')
60
+ .filter({ hasText: 'Operations Engineer' });
61
+ this.developerCheckbox = page
62
+ .getByRole('group')
63
+ .locator('label')
64
+ .filter({ hasText: 'Developer' });
65
+ this.analystCheckbox = page
66
+ .getByRole('group')
67
+ .locator('label')
68
+ .filter({ hasText: 'Analyst' });
69
+ this.confirmButton = page.getByRole('button', { name: 'Confirm' });
70
+ this.settingsTab = page.getByRole('tab', { name: 'Settings' });
71
+ this.optInButton = page.getByRole('button', { name: 'Opt-in', exact: true });
72
+ this.optInCheckbox = page.getByLabel('I understand and agree to the');
73
+ this.newContextPadButton = page.getByRole('switch').last();
74
+ this.newContextPadButtonText = page
75
+ .locator('[class= "cds--toggle__text"]')
76
+ .last();
77
+ this.mainUser = page
78
+ .getByRole('row')
79
+ .filter({ hasText: process.env.C8_USERNAME });
80
+ this.authorizations = page.getByRole('tab', {
81
+ name: 'Authorizations',
82
+ });
83
+ this.noAuthorizedResourceMessage = page.getByText("You haven't created any resource authorizations yet", { exact: true });
84
+ this.dialog = page.getByRole('dialog');
85
+ this.deleteAuthorisedResourceButton = page.getByRole('button', {
86
+ name: 'Delete',
87
+ });
88
+ this.deleteAuthorisedResourceSubButton = page.getByRole('button', {
89
+ name: 'danger Delete',
90
+ });
91
+ this.createResourceAuthorizationButton = page.getByRole('button', {
92
+ name: 'Create resource authorization',
93
+ exact: true,
94
+ });
95
+ this.createResourceAuthorizationDialog = page.getByRole('dialog', {
96
+ name: 'Create resource authorizations',
97
+ exact: true,
98
+ });
99
+ this.nextButton = this.createResourceAuthorizationDialog.getByRole('button', {
100
+ name: 'Next',
101
+ });
102
+ this.createButton = this.createResourceAuthorizationDialog.getByRole('button', {
103
+ name: 'Create',
104
+ });
105
+ this.idComboBox = page.getByRole('combobox', { name: 'ID' });
106
+ this.readPermissionCheckbox = page
107
+ .locator('label')
108
+ .filter({ hasText: 'ReadRead-only access to' });
109
+ this.startProcessIPermissionCheckbox = page.getByRole('checkbox', {
110
+ name: 'Start process instance',
111
+ });
112
+ this.optInAICheckbox = page.getByLabel('I understand and agree to Terms for AI Usage');
113
+ this.rows = this.page.getByRole('row');
114
+ this.groupsTab = page.getByRole('tab', { name: 'Groups' });
115
+ this.createGroupButton = page.getByRole('button', {
116
+ name: 'create group',
117
+ });
118
+ this.createGroupSubButton = page
119
+ .getByRole('button', {
120
+ name: 'create group',
121
+ })
122
+ .last();
123
+ this.groupNameInput = page.getByRole('textbox', { name: 'name' });
124
+ this.noGroupsHeading = page.getByRole('heading', {
125
+ name: 'you don’t have any groups yet',
126
+ });
127
+ this.createFirstGroupButton = page.getByRole('button', {
128
+ name: 'create a group',
129
+ });
130
+ this.createGroupDialoge = page.getByRole('dialog', {
131
+ name: 'create group',
132
+ });
133
+ this.assignMembersButton = page.getByRole('button', {
134
+ name: 'assign members',
135
+ });
136
+ this.assignMembersSubButton = page
137
+ .getByRole('button', {
138
+ name: 'assign',
139
+ })
140
+ .last();
141
+ this.assignMembersSearchbox = page.getByRole('searchbox', {
142
+ name: 'search by full name or email address',
143
+ });
144
+ this.assignMembersSearchResult = page.locator('.cds--list-box__menu-item');
145
+ this.organizationManagementLink = page.getByRole('link', {
146
+ name: 'organization management',
147
+ });
148
+ this.deleteButton = page.getByRole('button', { name: 'delete' });
149
+ this.deleteSubButton = page
150
+ .getByRole('button', {
151
+ name: 'danger',
152
+ })
153
+ .last();
154
+ this.filterTableSearchbox = page.getByRole('searchbox', {
155
+ name: 'Filter table',
156
+ });
157
+ this.assignAuthorizationButton = page.getByRole('button', {
158
+ name: 'Assign authorization',
159
+ exact: true,
160
+ });
161
+ this.assignedRolesTab = page.getByRole('tab', { name: 'Assigned roles' });
162
+ }
163
+ async clickCreateAuthorizedResourceButton() {
164
+ await (0, test_1.expect)(this.createButton).toBeVisible({ timeout: 60000 });
165
+ await this.createButton.click();
166
+ }
167
+ async processIdResourceAssertion(processId) {
168
+ await (0, test_1.expect)(this.page.getByRole('row', { name: processId })).toBeVisible({
169
+ timeout: 90000,
170
+ });
171
+ }
172
+ async clickCreateResourceAuthorizationButton() {
173
+ await (0, test_1.expect)(this.createResourceAuthorizationButton).toBeVisible({
174
+ timeout: 60000,
175
+ });
176
+ await this.createResourceAuthorizationButton.click();
177
+ }
178
+ async clickNextButton() {
179
+ await (0, test_1.expect)(this.nextButton).toBeVisible({
180
+ timeout: 60000,
181
+ });
182
+ await this.nextButton.click();
183
+ }
184
+ async clickProcessIdInput() {
185
+ await (0, test_1.expect)(this.idComboBox).toBeVisible({ timeout: 60000 });
186
+ await this.idComboBox.click();
187
+ }
188
+ async fillProcessIdInput(processId) {
189
+ await this.idComboBox.fill(processId);
190
+ }
191
+ async checkReadPermissionCheckbox() {
192
+ await (0, test_1.expect)(this.readPermissionCheckbox).toBeVisible({ timeout: 60000 });
193
+ if (!(await this.readPermissionCheckbox.isChecked())) {
194
+ await this.readPermissionCheckbox.click({ force: true });
195
+ }
196
+ }
197
+ async checkStartInstancePermissionCheckbox() {
198
+ if (!(await this.startProcessIPermissionCheckbox.isChecked())) {
199
+ await this.startProcessIPermissionCheckbox.click({ force: true });
200
+ }
201
+ }
202
+ async clickUsersTab() {
203
+ await this.usersTab.click({ timeout: 60000 });
204
+ }
205
+ async clickOptionsButton() {
206
+ await this.optionsButton.click({ timeout: 90000 });
207
+ }
208
+ async clickEditUserMenuItem() {
209
+ await this.editUserMenuItem.click({ timeout: 60000 });
210
+ }
211
+ async clickOperationsEngineerCheckbox() {
212
+ await this.operationsEngineerCheckbox.click();
213
+ }
214
+ async checkDeveloperCheckbox() {
215
+ if (!(await this.developerCheckbox.isChecked())) {
216
+ await this.developerCheckbox.click({ timeout: 60000 });
217
+ }
218
+ }
219
+ async uncheckDeveloperCheckbox() {
220
+ if (await this.developerCheckbox.isChecked()) {
221
+ await this.developerCheckbox.click({ timeout: 60000 });
222
+ }
223
+ }
224
+ async checkAnalystCheckbox() {
225
+ if (!(await this.analystCheckbox.isChecked())) {
226
+ await this.analystCheckbox.click({ timeout: 60000 });
227
+ }
228
+ }
229
+ async uncheckAnalystCheckbox() {
230
+ if (await this.analystCheckbox.isChecked()) {
231
+ await this.analystCheckbox.click({ timeout: 60000 });
232
+ }
233
+ }
234
+ async clickConfirmButton() {
235
+ await this.confirmButton.click({ timeout: 60000 });
236
+ }
237
+ async clickSettingsTab() {
238
+ await this.settingsTab.click({ timeout: 120000 });
239
+ try {
240
+ await (0, test_1.expect)(this.page.getByRole('heading', { name: 'Alpha features' })).toBeVisible({
241
+ timeout: 120000,
242
+ });
243
+ }
244
+ catch (error) {
245
+ await this.settingsTab.click({ timeout: 120000 });
246
+ }
247
+ }
248
+ async clickOptInButton() {
249
+ await this.optInButton.click({ timeout: 60000 });
250
+ }
251
+ async enableAlphaFeature(name) {
252
+ await (0, test_1.expect)(this.rows.first()).toBeVisible({ timeout: 10000 });
253
+ const alphaFeature = this.rows.filter({ hasText: name }).first();
254
+ if ((await alphaFeature.count()) < 1) {
255
+ console.error(`No alpha feature(${name}) is found.`);
256
+ return;
257
+ }
258
+ //Opt-in The Alpha Feature
259
+ const alphaFeatureOptInButton = alphaFeature.getByRole('button', {
260
+ name: 'Opt-in to enable',
261
+ });
262
+ if (await alphaFeatureOptInButton.isVisible({ timeout: 10000 })) {
263
+ await alphaFeatureOptInButton.click();
264
+ await this.optInAICheckbox.scrollIntoViewIfNeeded();
265
+ await this.optInAICheckbox.check({ timeout: 90000 });
266
+ await (0, sleep_1.sleep)(3000);
267
+ }
268
+ //Enable Alpha Feature
269
+ const toggleText = await alphaFeature
270
+ .locator('[class= "cds--toggle__text"]')
271
+ .textContent();
272
+ console.info(`Previous feature(${name}) setting is ${toggleText}.`);
273
+ if (toggleText == 'Enabled') {
274
+ console.log(`Feature ${name} is already enabled.`);
275
+ return;
276
+ }
277
+ if (toggleText == 'Disabled') {
278
+ await alphaFeature
279
+ .locator('[class= "cds--toggle__switch"]')
280
+ .first()
281
+ .click();
282
+ await (0, sleep_1.sleep)(10000);
283
+ }
284
+ await (0, test_1.expect)(alphaFeature.locator('[class= "cds--toggle__text"]')).toHaveText('Enabled');
285
+ }
286
+ async scrollToOptInCheckbox() {
287
+ await this.page
288
+ .getByText('Access and Use of the Camunda')
289
+ .scrollIntoViewIfNeeded();
290
+ await this.page
291
+ .getByText('Pre-release. The Customer')
292
+ .scrollIntoViewIfNeeded();
293
+ await this.page
294
+ .getByText('Confidential Information. The')
295
+ .scrollIntoViewIfNeeded();
296
+ await this.page
297
+ .getByText('THESE TERMS DO NOT ENTITLE')
298
+ .scrollIntoViewIfNeeded();
299
+ await this.page
300
+ .getByText('Rights and Obligations Upon')
301
+ .scrollIntoViewIfNeeded();
302
+ await this.page
303
+ .getByText('NOTWITHSTANDING ANYTHING TO')
304
+ .scrollIntoViewIfNeeded();
305
+ await this.page
306
+ .getByRole('heading', { name: 'General' })
307
+ .scrollIntoViewIfNeeded();
308
+ await this.page
309
+ .getByText('Liability. Camunda is liable')
310
+ .scrollIntoViewIfNeeded();
311
+ await this.page
312
+ .getByLabel('I understand and agree to the')
313
+ .scrollIntoViewIfNeeded();
314
+ }
315
+ async checkOptInCheckbox() {
316
+ await this.optInCheckbox.check({ timeout: 90000 });
317
+ }
318
+ async clickMainUser() {
319
+ await (0, test_1.expect)(this.mainUser).toBeVisible({ timeout: 60000 });
320
+ await this.mainUser.click();
321
+ }
322
+ async clickAuthorizations() {
323
+ await (0, test_1.expect)(this.authorizations).toBeVisible({ timeout: 60000 });
324
+ await this.authorizations.click();
325
+ }
326
+ async authorizedResourceAssertion(processId, maxRetries = 3, timeout = 30000) {
327
+ for (let attempt = 0; attempt < maxRetries; attempt++) {
328
+ try {
329
+ await this.page.reload();
330
+ await this.clickAuthorizations();
331
+ await (0, test_1.expect)(this.page.getByRole('row', { name: processId })).toBeVisible({ timeout: timeout });
332
+ return;
333
+ }
334
+ catch (error) {
335
+ if (attempt < maxRetries - 1) {
336
+ console.warn(`Attempt ${attempt + 1} failed. Retrying...`);
337
+ }
338
+ else {
339
+ throw new Error(`Assertion failed after ${maxRetries} attempts`);
340
+ }
341
+ }
342
+ }
343
+ }
344
+ async clickNewContextPadButton() {
345
+ try {
346
+ await (0, test_1.expect)(this.newContextPadButtonText).toHaveText('Enabled', {
347
+ timeout: 90000,
348
+ });
349
+ }
350
+ catch {
351
+ await this.page.reload();
352
+ await this.newContextPadButton.click({ timeout: 90000 });
353
+ await (0, test_1.expect)(this.newContextPadButtonText).toHaveText('Enabled', {
354
+ timeout: 60000,
355
+ });
356
+ }
357
+ }
358
+ async optInToAlphaFeatures() {
359
+ try {
360
+ await (0, test_1.expect)(this.optInButton).toBeVisible({ timeout: 30000 });
361
+ await this.clickOptInButton();
362
+ await this.scrollToOptInCheckbox();
363
+ await this.checkOptInCheckbox();
364
+ }
365
+ catch {
366
+ await (0, test_1.expect)(this.optInButton).not.toBeVisible();
367
+ }
368
+ }
369
+ async clickGroupsTab() {
370
+ await this.groupsTab.click({ timeout: 60000 });
371
+ }
372
+ async clickCreateGroupButton() {
373
+ const maxRetries = 3;
374
+ for (let retries = 0; retries < maxRetries; retries++) {
375
+ try {
376
+ if (!(await this.noGroupsHeading.isVisible({ timeout: 120000 }))) {
377
+ await this.createGroupButton.click();
378
+ }
379
+ else {
380
+ await this.createFirstGroupButton.click();
381
+ }
382
+ return;
383
+ }
384
+ catch (error) {
385
+ console.error(`Click attempt ${retries + 1} failed`);
386
+ }
387
+ }
388
+ throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
389
+ }
390
+ async fillGroupNameInput(name) {
391
+ await this.groupNameInput.fill(name);
392
+ }
393
+ async clickCreateGroupSubButton() {
394
+ await this.createGroupSubButton.click();
395
+ }
396
+ async clickUserGroup(name) {
397
+ await this.page.getByRole('cell', { name: name }).click();
398
+ }
399
+ async clickAssignMembers() {
400
+ await this.assignMembersButton.click();
401
+ }
402
+ async fillAssignMembers(names) {
403
+ for (const name of names) {
404
+ await this.assignMembersSearchbox.click({ timeout: 60000 });
405
+ await this.assignMembersSearchbox.fill(name);
406
+ await this.assignMembersSearchResult
407
+ .filter({ hasText: name })
408
+ .click({ timeout: 120000 });
409
+ }
410
+ }
411
+ async filterTable(names) {
412
+ for (const name of names) {
413
+ await this.filterTableSearchbox.click({ timeout: 60000 });
414
+ await this.filterTableSearchbox.fill(name);
415
+ }
416
+ }
417
+ async clickAssignSubButton() {
418
+ await this.assignMembersSubButton.click();
419
+ }
420
+ async clickOrganizationManagementLink() {
421
+ await this.organizationManagementLink.click();
422
+ }
423
+ async deleteAllGroups() {
424
+ try {
425
+ await this.deleteButton
426
+ .first()
427
+ .waitFor({ state: 'visible', timeout: 60000 });
428
+ const count = await this.deleteButton.count();
429
+ if (count > 0) {
430
+ for (let i = 0; i < count; i++) {
431
+ await this.deleteButton.nth(i).click({ timeout: 60000 });
432
+ await this.deleteSubButton.click({ timeout: 60000 });
433
+ }
434
+ }
435
+ }
436
+ catch (error) {
437
+ console.log('Delete Button Not Clicked ' + error);
438
+ }
439
+ }
440
+ async createResourceAuthorization(processId) {
441
+ try {
442
+ await this.clickCreateResourceAuthorizationButton();
443
+ }
444
+ catch {
445
+ await this.clickAssignAuthorizationButton();
446
+ }
447
+ await (0, test_1.expect)(this.createResourceAuthorizationDialog).toBeVisible({
448
+ timeout: 60000,
449
+ });
450
+ await this.clickNextButton();
451
+ await this.clickProcessIdInput();
452
+ await this.fillProcessIdInput(processId);
453
+ await this.clickNextButton();
454
+ await this.checkReadPermissionCheckbox();
455
+ await this.checkStartInstancePermissionCheckbox();
456
+ await this.clickCreateAuthorizedResourceButton();
457
+ await this.processIdResourceAssertion(processId);
458
+ }
459
+ async clickAssignAuthorizationButton() {
460
+ await this.assignAuthorizationButton.click();
461
+ }
462
+ async clickAssignedRolesTab() {
463
+ await this.assignedRolesTab.click();
464
+ }
465
+ async assertUserIsAssignedCorrectRole(username, roles) {
466
+ await this.page.getByRole('cell', { name: username, exact: true }).click();
467
+ await this.assignedRolesTab.click();
468
+ for (const role of roles) {
469
+ await (0, test_1.expect)(this.page.getByRole('cell', { name: role, exact: true })).toBeVisible();
470
+ }
471
+ }
472
+ }
473
+ exports.IdentityUsersPage = IdentityUsersPage;
@@ -0,0 +1,15 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class KeycloakAdminPage {
3
+ private page;
4
+ readonly keycloakBanner: Locator;
5
+ constructor(page: Page);
6
+ toBeVisible(): Promise<void>;
7
+ switchToCamundaPlatform(): Promise<void>;
8
+ clickUsersTab(): Promise<void>;
9
+ clickAddUser(): Promise<void>;
10
+ fillUser(username: string): Promise<void>;
11
+ saveUser(): Promise<void>;
12
+ fillPassword(password: string): Promise<void>;
13
+ savePassword(): Promise<void>;
14
+ }
15
+ export { KeycloakAdminPage };
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KeycloakAdminPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const sleep_1 = require("../../utils/sleep");
6
+ class KeycloakAdminPage {
7
+ page;
8
+ keycloakBanner;
9
+ constructor(page) {
10
+ this.page = page;
11
+ this.keycloakBanner = page.locator('#kc-main-content-page-container');
12
+ }
13
+ async toBeVisible() {
14
+ await (0, test_1.expect)(this.keycloakBanner).toBeVisible({ timeout: 10000 });
15
+ }
16
+ async switchToCamundaPlatform() {
17
+ const realmSelector = this.page.getByTestId('nav-item-realms');
18
+ await realmSelector.click();
19
+ const searchField = this.page.getByTestId('selectRealminput');
20
+ await searchField.click();
21
+ await this.page
22
+ .getByPlaceholder('Search')
23
+ .fill(process.env.KEYCLOAK_REALM || 'camunda-platform');
24
+ await this.page
25
+ .locator('[data-ouia-component-id="OUIA-Generated-Button-control-1"]')
26
+ .click();
27
+ await this.page
28
+ .getByText(process.env.KEYCLOAK_REALM || 'camunda-platform')
29
+ .click();
30
+ const mainLocator = this.page.locator('#kc-main-content-page-container');
31
+ await (0, test_1.expect)(mainLocator).toBeVisible();
32
+ }
33
+ async clickUsersTab() {
34
+ await this.page.click('a[id="nav-item-users"]');
35
+ }
36
+ async clickAddUser() {
37
+ await this.page.getByTestId('add-user').click();
38
+ }
39
+ async fillUser(username) {
40
+ await this.page.getByTestId('username').fill(username);
41
+ await this.page.getByTestId('firstName').fill(`test${username}`);
42
+ await this.page.getByTestId('lastName').fill('user');
43
+ await this.page
44
+ .getByTestId('email')
45
+ .fill(`qacamunda+${username}@gmail.com`);
46
+ }
47
+ async saveUser() {
48
+ await this.page.getByTestId('user-creation-save').click();
49
+ }
50
+ async fillPassword(password) {
51
+ await this.page.getByTestId('credentials').click();
52
+ await this.page.getByTestId('no-credentials-empty-action').click();
53
+ await this.page.getByTestId('passwordField').fill(password);
54
+ await this.page.getByTestId('passwordConfirmationField').fill(password);
55
+ }
56
+ async savePassword() {
57
+ await this.page
58
+ .locator('label.pf-v5-c-switch[for="temporaryPassword"]')
59
+ .click();
60
+ await this.page.getByTestId('confirm').click();
61
+ await this.page.getByTestId('confirm').click();
62
+ // if the browser is firefox, delay for 500 ms
63
+ if (await this.page.evaluate(() => navigator.userAgent.includes('Firefox'))) {
64
+ await (0, sleep_1.sleep)(500);
65
+ }
66
+ }
67
+ }
68
+ exports.KeycloakAdminPage = KeycloakAdminPage;
@@ -0,0 +1,11 @@
1
+ import { Locator, Page } from '@playwright/test';
2
+ declare class KeycloakLoginPage {
3
+ private page;
4
+ readonly keycloakBanner: Locator;
5
+ constructor(page: Page);
6
+ toBeVisible(): Promise<void>;
7
+ fillUsername(username: string): Promise<void>;
8
+ fillPassword(password: string): Promise<void>;
9
+ clickLogin(): Promise<void>;
10
+ }
11
+ export { KeycloakLoginPage };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KeycloakLoginPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ class KeycloakLoginPage {
6
+ page;
7
+ keycloakBanner;
8
+ constructor(page) {
9
+ this.page = page;
10
+ this.keycloakBanner = page.locator('#keycloak-bg');
11
+ }
12
+ async toBeVisible() {
13
+ await (0, test_1.expect)(this.keycloakBanner).toBeVisible();
14
+ }
15
+ async fillUsername(username) {
16
+ await this.page.fill('#username', username);
17
+ }
18
+ async fillPassword(password) {
19
+ await this.page.fill('#password', password);
20
+ }
21
+ async clickLogin() {
22
+ await this.page.click('button[type="submit"]');
23
+ }
24
+ }
25
+ exports.KeycloakLoginPage = KeycloakLoginPage;
@@ -0,0 +1,16 @@
1
+ import { NavigationPage } from '../SM-8.10/NavigationPage';
2
+ import { ManagementIdentityPage } from '../SM-8.10/ManagementIdentityPage';
3
+ import { KeycloakLoginPage } from '../SM-8.10/KeycloakLoginPage';
4
+ import { KeycloakAdminPage } from '../SM-8.10/KeycloakAdminPage';
5
+ import { OCIdentityHomePage } from './OCIdentityHomePage';
6
+ import { OCIdentityRolesPage } from './OCIdentityRolesPage';
7
+ export declare const keycloakAdminCredentials: () => {
8
+ username: string;
9
+ password: string;
10
+ };
11
+ export declare const setupKeycloakUser: (navigationPage: NavigationPage, identityPage: ManagementIdentityPage, keycloakLoginPage: KeycloakLoginPage, keycloakAdminPage: KeycloakAdminPage, ocIdentityHomePage: OCIdentityHomePage, ocIdentityRolesPage: OCIdentityRolesPage) => Promise<{
12
+ testUsername: string;
13
+ testPassword: string;
14
+ }>;
15
+ export declare function createUser(navigationPage: NavigationPage, identityPage: ManagementIdentityPage, keycloakLoginPage: KeycloakLoginPage, keycloakAdminPage: KeycloakAdminPage, username: string, password: string): Promise<void>;
16
+ export declare function createKeycloakUser(navigationPage: NavigationPage, keycloakLoginPage: KeycloakLoginPage, keycloakAdminPage: KeycloakAdminPage, username: string, password: string): Promise<void>;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createKeycloakUser = exports.createUser = exports.setupKeycloakUser = exports.keycloakAdminCredentials = void 0;
4
+ const keycloakAdminCredentials = () => {
5
+ return {
6
+ username: process.env.DISTRO_QA_E2E_TESTS_KEYCLOAK_USERNAME || 'admin',
7
+ password: process.env.DISTRO_QA_E2E_TESTS_KEYCLOAK_PASSWORD,
8
+ };
9
+ };
10
+ exports.keycloakAdminCredentials = keycloakAdminCredentials;
11
+ const setupKeycloakUser = async (navigationPage, identityPage, keycloakLoginPage, keycloakAdminPage, ocIdentityHomePage, ocIdentityRolesPage) => {
12
+ const testUsername = `test-user-${new Date().getTime()}-${Math.random()
13
+ .toString(36)
14
+ .substring(7)}`;
15
+ const testPassword = 'test-password';
16
+ await createKeycloakUser(navigationPage, keycloakLoginPage, keycloakAdminPage, testUsername, testPassword);
17
+ await createIdentityUser(navigationPage, identityPage, testUsername);
18
+ await createOCUser(navigationPage, ocIdentityHomePage, ocIdentityRolesPage, testUsername);
19
+ return { testUsername, testPassword };
20
+ };
21
+ exports.setupKeycloakUser = setupKeycloakUser;
22
+ async function createUser(navigationPage, identityPage, keycloakLoginPage, keycloakAdminPage, username, password) {
23
+ await createKeycloakUser(navigationPage, keycloakLoginPage, keycloakAdminPage, username, password);
24
+ await createIdentityUser(navigationPage, identityPage, username);
25
+ }
26
+ exports.createUser = createUser;
27
+ async function createKeycloakUser(navigationPage, keycloakLoginPage, keycloakAdminPage, username, password) {
28
+ await navigationPage.goToKeycloak();
29
+ await keycloakLoginPage.toBeVisible();
30
+ await keycloakLoginPage.fillUsername((0, exports.keycloakAdminCredentials)().username);
31
+ await keycloakLoginPage.fillPassword((0, exports.keycloakAdminCredentials)().password);
32
+ await keycloakLoginPage.clickLogin();
33
+ await keycloakAdminPage.toBeVisible();
34
+ await keycloakAdminPage.switchToCamundaPlatform();
35
+ await keycloakAdminPage.clickUsersTab();
36
+ await keycloakAdminPage.clickAddUser();
37
+ await keycloakAdminPage.fillUser(username);
38
+ await keycloakAdminPage.saveUser();
39
+ await keycloakAdminPage.fillPassword(password);
40
+ await keycloakAdminPage.savePassword();
41
+ }
42
+ exports.createKeycloakUser = createKeycloakUser;
43
+ const createIdentityUser = async (navigationPage, managementIdentity, username) => {
44
+ await navigationPage.goToManagementIdentity();
45
+ await managementIdentity.clickUsersLink();
46
+ await managementIdentity.clickUser(username);
47
+ await managementIdentity.clickAssignedRolesTab();
48
+ await managementIdentity.clickAssignRolesButton();
49
+ if (process.env.IS_OPTIMIZE !== 'false') {
50
+ await managementIdentity.clickOptimizeCheckbox();
51
+ }
52
+ await managementIdentity.clickModelerCheckbox();
53
+ await managementIdentity.clickConsoleCheckbox();
54
+ await managementIdentity.clickIdentityCheckbox();
55
+ await managementIdentity.clickOrchestrationCheckbox();
56
+ await managementIdentity.clickAddButton();
57
+ };
58
+ const createOCUser = async (navigationPage, ocIdentityHomePage, ocIdentityRolesPage, username) => {
59
+ await navigationPage.goToOCIdentity();
60
+ await ocIdentityHomePage.clickRolesTab();
61
+ await ocIdentityRolesPage.clickAdminRole();
62
+ await ocIdentityRolesPage.assignUserToRole(username);
63
+ };