@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,398 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppsPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const sleep_1 = require("../../utils/sleep");
6
+ const UtilitiesPage_1 = require("../8.10/UtilitiesPage");
7
+ class AppsPage {
8
+ page;
9
+ modelerLink;
10
+ tasklistLink;
11
+ adminLink;
12
+ operateLink;
13
+ optimizeButton;
14
+ adminButton;
15
+ tasklistButton;
16
+ operateButton;
17
+ operateListItem;
18
+ adminListItem;
19
+ optimizeListItem;
20
+ tasklistListItem;
21
+ appSwitcherButton;
22
+ optimizeLink;
23
+ consoleLink;
24
+ camundaComponentsButton;
25
+ camundaAppsButton;
26
+ constructor(page) {
27
+ this.page = page;
28
+ this.modelerLink = page.getByRole('link', { name: 'Modeler', exact: true });
29
+ this.appSwitcherButton = page.getByLabel('App Switcher');
30
+ this.tasklistLink = page.getByRole('link', { name: 'Tasklist', exact: true });
31
+ this.adminLink = page.getByRole('link', { name: /^(Admin|Identity)$/ });
32
+ this.operateLink = page.getByRole('link', { name: 'Operate', exact: true });
33
+ this.optimizeLink = page.getByRole('link', { name: 'Optimize', exact: true });
34
+ this.consoleLink = page.getByRole('link', { name: 'Console', exact: true });
35
+ this.camundaComponentsButton = page.getByLabel('Camunda components');
36
+ this.camundaAppsButton = page.getByLabel('Camunda apps');
37
+ this.tasklistListItem = this.page
38
+ .getByRole('listitem')
39
+ .filter({ hasText: 'Tasklist' });
40
+ this.optimizeListItem = this.page
41
+ .getByRole('listitem')
42
+ .filter({ hasText: 'Optimize' });
43
+ this.operateListItem = this.page
44
+ .getByRole('listitem')
45
+ .filter({ hasText: 'Operate' });
46
+ this.adminListItem = this.page
47
+ .getByRole('listitem')
48
+ .filter({ hasText: /Admin|Identity/ }); // Identity Should be removed after https://github.com/camunda/camunda/issues/46447 is fixed
49
+ this.operateButton = page.getByRole('button', {
50
+ name: 'Operate',
51
+ exact: true,
52
+ });
53
+ this.optimizeButton = page.getByRole('button', {
54
+ name: 'Optimize',
55
+ exact: true,
56
+ });
57
+ this.tasklistButton = page.getByRole('button', {
58
+ name: 'Tasklist',
59
+ exact: true,
60
+ });
61
+ this.adminButton = page.getByRole('button', {
62
+ name: /^(Admin|Identity)$/, // Identity Should be removed after https://github.com/camunda/camunda/issues/46447 is fixed
63
+ });
64
+ }
65
+ async clickCluster(component, name) {
66
+ const cluster = component.getByRole('link', { name: name, exact: true });
67
+ await (0, test_1.expect)(cluster).toBeVisible({ timeout: 30000 });
68
+ await cluster.click();
69
+ }
70
+ async clickModeler() {
71
+ const maxRetries = 3;
72
+ for (let retries = 0; retries < maxRetries; retries++) {
73
+ try {
74
+ if (retries === 0) {
75
+ await (0, test_1.expect)(this.modelerLink).toBeVisible({ timeout: 30000 });
76
+ await this.modelerLink.click();
77
+ }
78
+ else {
79
+ await this.clickCamundaApps();
80
+ await (0, test_1.expect)(this.modelerLink).toBeVisible({ timeout: 30000 });
81
+ await this.modelerLink.click();
82
+ }
83
+ return;
84
+ }
85
+ catch (error) {
86
+ console.warn(`Click attempt ${retries + 1} failed: ${error}`);
87
+ await new Promise((resolve) => setTimeout(resolve, 10000));
88
+ }
89
+ }
90
+ throw new Error(`Failed to click the modeler link after ${maxRetries} attempts.`);
91
+ }
92
+ async clickTasklist(clusterName) {
93
+ const maxRetries = 3;
94
+ for (let retries = 0; retries < maxRetries; retries++) {
95
+ try {
96
+ if (retries === 0) {
97
+ //Single cluster
98
+ if (await this.tasklistLink.isVisible({ timeout: 5000 })) {
99
+ await this.tasklistLink.click({ timeout: 10000 });
100
+ }
101
+ else {
102
+ //Multiple clusters
103
+ await this.doClickClusterInTasklist(clusterName);
104
+ }
105
+ }
106
+ else {
107
+ await this.clickCamundaApps();
108
+ if (await this.tasklistLink.isVisible({ timeout: 5000 })) {
109
+ await this.tasklistLink.click({ timeout: 10000 });
110
+ }
111
+ else {
112
+ await this.doClickClusterInTasklist(clusterName);
113
+ }
114
+ }
115
+ return;
116
+ }
117
+ catch (error) {
118
+ console.warn(`Click attempt ${retries + 1} failed: ${error}`);
119
+ if (!this.page.isClosed()) {
120
+ await this.page
121
+ .waitForLoadState('load', { timeout: 20000 })
122
+ .catch(() => { });
123
+ await this.page.reload();
124
+ await (0, sleep_1.sleep)(20000);
125
+ }
126
+ }
127
+ }
128
+ throw new Error(`Failed to click the tasklist link after ${maxRetries} attempts.`);
129
+ }
130
+ async clickAdmin(clusterName) {
131
+ const maxRetries = 5;
132
+ for (let retries = 0; retries < maxRetries; retries++) {
133
+ try {
134
+ if (retries === 0) {
135
+ //Single cluster
136
+ if (await this.adminLink.isVisible({ timeout: 5000 })) {
137
+ await this.adminLink.click({ timeout: 10000 });
138
+ }
139
+ else {
140
+ //Multiple clusters
141
+ await this.doClickClusterInAdmin(clusterName);
142
+ }
143
+ }
144
+ else {
145
+ await this.clickCamundaApps();
146
+ if (await this.adminLink.isVisible({ timeout: 5000 })) {
147
+ await this.adminLink.click({ timeout: 10000 });
148
+ }
149
+ else {
150
+ await this.doClickClusterInAdmin(clusterName);
151
+ }
152
+ }
153
+ return;
154
+ }
155
+ catch (error) {
156
+ console.warn(`Click attempt ${retries + 1} failed: ${error}`);
157
+ await (0, UtilitiesPage_1.waitForLoadingToFinish)(this.page);
158
+ await this.page.reload();
159
+ await (0, sleep_1.sleep)(20000);
160
+ }
161
+ }
162
+ throw new Error(`Failed to click the Identity link after ${maxRetries} attempts.`);
163
+ }
164
+ async doClickClusterInOperate(clusterName) {
165
+ if (await this.operateListItem
166
+ .getByRole('button', {
167
+ expanded: true,
168
+ })
169
+ .isHidden({ timeout: 5000 })) {
170
+ await this.operateButton.click({ timeout: 10000 });
171
+ }
172
+ await this.clickCluster(this.operateListItem, clusterName);
173
+ }
174
+ async doClickClusterInTasklist(clusterName) {
175
+ if (await this.tasklistListItem
176
+ .getByRole('button', {
177
+ expanded: true,
178
+ })
179
+ .isHidden({ timeout: 5000 })) {
180
+ await this.tasklistButton.click({ timeout: 10000 });
181
+ }
182
+ await this.clickCluster(this.tasklistListItem, clusterName);
183
+ }
184
+ async doClickClusterInAdmin(clusterName) {
185
+ if (await this.adminListItem
186
+ .getByRole('button', {
187
+ expanded: true,
188
+ })
189
+ .isHidden({ timeout: 5000 })) {
190
+ await this.adminButton.click({ timeout: 10000 });
191
+ }
192
+ await this.clickCluster(this.adminListItem, clusterName);
193
+ }
194
+ async doClickClusterInOptimize(clusterName) {
195
+ if (await this.optimizeListItem
196
+ .getByRole('button', {
197
+ expanded: true,
198
+ })
199
+ .isHidden({ timeout: 5000 })) {
200
+ await this.optimizeButton.click({ timeout: 10000 });
201
+ }
202
+ await this.clickCluster(this.optimizeListItem, clusterName);
203
+ }
204
+ async clickOperate(clusterName) {
205
+ const maxRetries = 3;
206
+ for (let retries = 0; retries < maxRetries; retries++) {
207
+ try {
208
+ if (retries === 0) {
209
+ if (await this.operateLink.isVisible({ timeout: 5000 })) {
210
+ //Single Cluster
211
+ await this.operateLink.click({ timeout: 10000 });
212
+ }
213
+ else {
214
+ //Multiple Cluster
215
+ await this.doClickClusterInOperate(clusterName);
216
+ }
217
+ }
218
+ else {
219
+ await this.clickCamundaApps();
220
+ if (await this.operateLink.isVisible({ timeout: 5000 })) {
221
+ await this.operateLink.click({ timeout: 10000 });
222
+ }
223
+ else {
224
+ await this.doClickClusterInOperate(clusterName);
225
+ }
226
+ }
227
+ return;
228
+ }
229
+ catch (error) {
230
+ console.warn(`Click attempt ${retries + 1} failed: ${error}`);
231
+ await this.page.waitForLoadState('domcontentloaded');
232
+ await this.page.reload();
233
+ await (0, sleep_1.sleep)(20000);
234
+ }
235
+ }
236
+ throw new Error(`Failed to click the operate link after ${maxRetries} attempts.`);
237
+ }
238
+ async clickOptimize(clusterName) {
239
+ const maxRetries = 3;
240
+ for (let retries = 0; retries < maxRetries; retries++) {
241
+ try {
242
+ if (retries === 0) {
243
+ if (await this.optimizeLink.isVisible({ timeout: 10000 })) {
244
+ //Single cluster
245
+ await this.optimizeLink.click({ timeout: 10000 });
246
+ }
247
+ else {
248
+ //Multiple clusters
249
+ await this.doClickClusterInOptimize(clusterName);
250
+ }
251
+ }
252
+ else {
253
+ await this.clickCamundaApps();
254
+ if (await this.optimizeLink.isVisible({ timeout: 5000 })) {
255
+ await this.optimizeLink.click({ timeout: 10000 });
256
+ }
257
+ else {
258
+ await this.doClickClusterInOptimize(clusterName);
259
+ }
260
+ }
261
+ return;
262
+ }
263
+ catch (error) {
264
+ console.warn(`Click attempt ${retries + 1} failed: ${error}`);
265
+ await this.page.waitForLoadState('domcontentloaded');
266
+ await this.page.reload();
267
+ await (0, sleep_1.sleep)(20000);
268
+ }
269
+ }
270
+ throw new Error(`Failed to click the optimize link after ${maxRetries} attempts.`);
271
+ }
272
+ async clickCamundaApps(maxRetries = 3) {
273
+ await (0, sleep_1.sleep)(2000);
274
+ const appButtons = [
275
+ this.camundaComponentsButton,
276
+ this.camundaAppsButton,
277
+ this.appSwitcherButton,
278
+ ];
279
+ for (let retries = 0; retries < maxRetries; retries++) {
280
+ for (const appButton of appButtons) {
281
+ if (await appButton.isVisible({ timeout: 20000 })) {
282
+ await appButton.click({ timeout: 30000 });
283
+ return;
284
+ }
285
+ }
286
+ }
287
+ }
288
+ async clickConsoleLink() {
289
+ const maxRetries = 3;
290
+ for (let retries = 0; retries < maxRetries; retries++) {
291
+ try {
292
+ if (retries === 0) {
293
+ await (0, test_1.expect)(this.consoleLink).toBeVisible({ timeout: 30000 });
294
+ await this.consoleLink.click();
295
+ }
296
+ else {
297
+ await this.clickCamundaApps();
298
+ await (0, test_1.expect)(this.consoleLink).toBeVisible({ timeout: 30000 });
299
+ await this.consoleLink.click();
300
+ }
301
+ return;
302
+ }
303
+ catch (error) {
304
+ console.warn(`Click attempt ${retries + 1} failed: ${error}`);
305
+ await new Promise((resolve) => setTimeout(resolve, 10000));
306
+ }
307
+ }
308
+ throw new Error(`Failed to click the console link after ${maxRetries} attempts.`);
309
+ }
310
+ async assertOperatePresent(shouldBeVisible = true) {
311
+ const maxRetries = 3;
312
+ for (let retries = 0; retries < maxRetries; retries++) {
313
+ try {
314
+ const isVisible = await this.operateLink.isVisible({ timeout: 5000 });
315
+ if (shouldBeVisible) {
316
+ if (isVisible) {
317
+ // Single Cluster
318
+ await (0, test_1.expect)(this.operateLink).toBeVisible();
319
+ }
320
+ else if (await this.operateListItem
321
+ .getByRole('button', { expanded: true })
322
+ .isHidden({ timeout: 5000 })) {
323
+ // Multiple Cluster
324
+ await (0, test_1.expect)(this.operateButton).toBeVisible();
325
+ }
326
+ }
327
+ else {
328
+ await (0, test_1.expect)(this.operateLink).not.toBeVisible();
329
+ }
330
+ return;
331
+ }
332
+ catch (error) {
333
+ console.warn(`Click attempt ${retries + 1} failed: ${error}`);
334
+ await new Promise((resolve) => setTimeout(resolve, 10000));
335
+ }
336
+ }
337
+ throw new Error(`Failed to assert the operate link visibility after ${maxRetries} attempts.`);
338
+ }
339
+ async assertTasklistPresent(shouldBeVisible = true) {
340
+ const maxRetries = 3;
341
+ for (let retries = 0; retries < maxRetries; retries++) {
342
+ try {
343
+ const isVisible = await this.tasklistLink.isVisible({ timeout: 5000 });
344
+ if (shouldBeVisible) {
345
+ if (isVisible) {
346
+ // Single Cluster
347
+ await (0, test_1.expect)(this.tasklistLink).toBeVisible();
348
+ }
349
+ else if (await this.tasklistListItem
350
+ .getByRole('button', { expanded: true })
351
+ .isHidden({ timeout: 5000 })) {
352
+ // Multiple Cluster
353
+ await (0, test_1.expect)(this.tasklistButton).toBeVisible();
354
+ }
355
+ }
356
+ else {
357
+ await (0, test_1.expect)(this.tasklistLink).not.toBeVisible();
358
+ }
359
+ return;
360
+ }
361
+ catch (error) {
362
+ console.warn(`Click attempt ${retries + 1} failed: ${error}`);
363
+ await new Promise((resolve) => setTimeout(resolve, 10000));
364
+ }
365
+ }
366
+ throw new Error(`Failed to assert the tasklist link visibility after ${maxRetries} attempts.`);
367
+ }
368
+ async assertOptimizePresent(shouldBeVisible = true) {
369
+ const maxRetries = 3;
370
+ for (let retries = 0; retries < maxRetries; retries++) {
371
+ try {
372
+ const isVisible = await this.optimizeLink.isVisible({ timeout: 5000 });
373
+ if (shouldBeVisible) {
374
+ if (isVisible) {
375
+ // Single Cluster
376
+ await (0, test_1.expect)(this.optimizeLink).toBeVisible();
377
+ }
378
+ else if (await this.optimizeListItem
379
+ .getByRole('button', { expanded: true })
380
+ .isHidden({ timeout: 5000 })) {
381
+ // Multiple Cluster
382
+ await (0, test_1.expect)(this.optimizeButton).toBeVisible();
383
+ }
384
+ }
385
+ else {
386
+ await (0, test_1.expect)(this.optimizeLink).not.toBeVisible();
387
+ }
388
+ return;
389
+ }
390
+ catch (error) {
391
+ console.warn(`Click attempt ${retries + 1} failed: ${error}`);
392
+ await new Promise((resolve) => setTimeout(resolve, 10000));
393
+ }
394
+ }
395
+ throw new Error(`Failed to assert the optimize link visibility after ${maxRetries} attempts.`);
396
+ }
397
+ }
398
+ exports.AppsPage = AppsPage;
@@ -0,0 +1,31 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class Authorization {
3
+ readonly page: Page;
4
+ protected readonly selectResourceTypeTab: (name: string) => Locator;
5
+ protected readonly createAuthorizationModal: Locator;
6
+ protected readonly createAuthorizationButton: Locator;
7
+ protected readonly createAuthorizationOwnerTypeCombobox: Locator;
8
+ protected readonly createAuthorizationOwnerTypeOption: (name: string) => Locator;
9
+ protected readonly createAuthorizationOwnerComboBox: Locator;
10
+ protected readonly createAuthorizationOwnerOption: (name: string) => Locator;
11
+ protected readonly createAuthorizationResourceTypeDropdown: Locator;
12
+ protected readonly createAuthorizationResourceTypeOption: (name: string) => Locator;
13
+ protected readonly createAuthorizationResourceIdField: Locator;
14
+ protected readonly createAuthorizationAccessPermission: (name: string) => Locator;
15
+ protected readonly createAuthorizationSubmitButton: Locator;
16
+ protected readonly authorizationsList: Locator;
17
+ protected readonly deleteAuthorizationButton: (name: string) => Locator;
18
+ protected readonly deleteAuthorizationModal: Locator;
19
+ protected readonly deleteAuthorizationModalDeleteButton: Locator;
20
+ constructor(page: Page);
21
+ assertAuthorization(auth: string): Promise<void>;
22
+ createAuthorization(authorization: {
23
+ ownerType: string;
24
+ ownerId: string;
25
+ resourceType: string;
26
+ resourceId: string;
27
+ accessPermissions: string[];
28
+ }): Promise<void>;
29
+ deleteAuthorization(resourceId: string, resourceType: string): Promise<void>;
30
+ }
31
+ export { Authorization };
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Authorization = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
6
+ const expectLocatorWithPagination_1 = require("../../utils/assertionHelpers/expectLocatorWithPagination");
7
+ class Authorization {
8
+ page;
9
+ selectResourceTypeTab;
10
+ createAuthorizationModal;
11
+ createAuthorizationButton;
12
+ createAuthorizationOwnerTypeCombobox;
13
+ createAuthorizationOwnerTypeOption;
14
+ createAuthorizationOwnerComboBox;
15
+ createAuthorizationOwnerOption;
16
+ createAuthorizationResourceTypeDropdown;
17
+ createAuthorizationResourceTypeOption;
18
+ createAuthorizationResourceIdField;
19
+ createAuthorizationAccessPermission;
20
+ createAuthorizationSubmitButton;
21
+ authorizationsList;
22
+ deleteAuthorizationButton;
23
+ deleteAuthorizationModal;
24
+ deleteAuthorizationModalDeleteButton;
25
+ constructor(page) {
26
+ this.page = page;
27
+ this.selectResourceTypeTab = (resourceType) => page.getByRole('tab', { name: resourceType });
28
+ this.authorizationsList = page.getByRole('table');
29
+ this.createAuthorizationButton = page.getByRole('button', {
30
+ name: /create authorization/i,
31
+ });
32
+ this.createAuthorizationModal = page.getByRole('dialog', {
33
+ name: 'Create authorization',
34
+ });
35
+ this.createAuthorizationOwnerTypeCombobox =
36
+ this.createAuthorizationModal.getByRole('combobox', {
37
+ name: 'Owner type',
38
+ });
39
+ this.createAuthorizationOwnerTypeOption = (name) => this.createAuthorizationModal.getByRole('option', {
40
+ name,
41
+ exact: true,
42
+ });
43
+ this.createAuthorizationOwnerComboBox =
44
+ this.createAuthorizationModal.getByRole('combobox', {
45
+ name: 'Owner',
46
+ exact: true,
47
+ });
48
+ this.createAuthorizationOwnerOption = (name) => this.createAuthorizationModal.getByRole('option', {
49
+ name,
50
+ exact: true,
51
+ });
52
+ this.createAuthorizationResourceTypeDropdown =
53
+ this.createAuthorizationModal.getByRole('combobox', {
54
+ name: 'Resource type',
55
+ });
56
+ this.createAuthorizationResourceTypeOption = (name) => this.createAuthorizationModal.getByRole('option', {
57
+ name,
58
+ exact: true,
59
+ });
60
+ this.createAuthorizationResourceIdField =
61
+ this.createAuthorizationModal.getByRole('textbox', {
62
+ name: 'Resource ID',
63
+ });
64
+ this.createAuthorizationAccessPermission = (name) => this.createAuthorizationModal.getByRole('checkbox', {
65
+ name,
66
+ });
67
+ this.createAuthorizationSubmitButton =
68
+ this.createAuthorizationModal.getByRole('button', {
69
+ name: 'Create authorization',
70
+ });
71
+ this.authorizationsList = page.getByRole('table');
72
+ this.deleteAuthorizationButton = (name) => this.authorizationsList
73
+ .getByRole('row')
74
+ .filter({ hasText: name })
75
+ .first()
76
+ .getByRole('button', { name: 'danger Delete' });
77
+ this.deleteAuthorizationModal = page.getByRole('dialog', {
78
+ name: /delete authorization/i,
79
+ });
80
+ this.deleteAuthorizationModalDeleteButton =
81
+ this.deleteAuthorizationModal.getByRole('button', {
82
+ name: /delete authorization/i,
83
+ });
84
+ }
85
+ async assertAuthorization(auth) {
86
+ await (0, test_1.expect)(this.authorizationsList.getByRole('row').filter({ hasText: auth }).first()).toBeVisible({ timeout: 30000 });
87
+ }
88
+ async createAuthorization(authorization) {
89
+ await this.createAuthorizationButton.click();
90
+ await (0, test_1.expect)(this.createAuthorizationModal).toBeVisible();
91
+ await this.createAuthorizationOwnerTypeCombobox.click();
92
+ await this.createAuthorizationOwnerTypeOption(authorization.ownerType).click();
93
+ await this.createAuthorizationOwnerComboBox.click();
94
+ await (0, test_1.expect)(this.createAuthorizationOwnerOption(authorization.ownerId)).toBeVisible({
95
+ timeout: 30000,
96
+ });
97
+ await this.createAuthorizationOwnerOption(authorization.ownerId).click({
98
+ timeout: 30000,
99
+ });
100
+ await this.createAuthorizationResourceTypeDropdown.click();
101
+ await this.createAuthorizationResourceTypeOption(authorization.resourceType).click({ timeout: 30000, force: true });
102
+ await this.createAuthorizationResourceIdField.fill(authorization.resourceId);
103
+ for (const permission of authorization.accessPermissions) {
104
+ await this.createAuthorizationAccessPermission(permission).click({
105
+ force: true,
106
+ });
107
+ }
108
+ await this.createAuthorizationSubmitButton.click();
109
+ await (0, test_1.expect)(this.createAuthorizationModal).not.toBeVisible({
110
+ timeout: 30000,
111
+ });
112
+ await this.selectResourceTypeTab(authorization.resourceType).click();
113
+ const item = this.page.getByRole('row').filter({
114
+ hasText: `${authorization.ownerId}${authorization.resourceId}`,
115
+ });
116
+ await (0, expectLocatorWithPagination_1.expectLocatorWithPagination)(this.page, item, {
117
+ clickLocator: this.selectResourceTypeTab(authorization.resourceType),
118
+ });
119
+ }
120
+ async deleteAuthorization(resourceId, resourceType) {
121
+ const locator = this.deleteAuthorizationButton(resourceId);
122
+ await (0, expectLocatorWithPagination_1.expectLocatorWithPagination)(this.page, locator, {
123
+ clickLocator: this.selectResourceTypeTab(resourceType),
124
+ });
125
+ await locator.click();
126
+ await (0, test_1.expect)(this.deleteAuthorizationModal).toBeVisible();
127
+ await this.deleteAuthorizationModalDeleteButton.click();
128
+ await (0, test_1.expect)(this.deleteAuthorizationModal).not.toBeVisible();
129
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.authorizationsList
130
+ .getByRole('cell', {
131
+ name: resourceId,
132
+ })
133
+ .first(), {
134
+ preAction: async () => {
135
+ await this.selectResourceTypeTab(resourceType);
136
+ await this.page.reload();
137
+ await this.page.waitForTimeout(1000);
138
+ },
139
+ shouldBeVisible: false,
140
+ });
141
+ }
142
+ }
143
+ exports.Authorization = Authorization;
@@ -0,0 +1,12 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class ClientCredentialsDetailsPage {
3
+ private page;
4
+ readonly operateUrlRow: Locator;
5
+ readonly operateUrlValue: Locator;
6
+ readonly clientNameHeading: (clientName: string) => Locator;
7
+ constructor(page: Page);
8
+ isOpen(clientName: string): Promise<void>;
9
+ getOperateUrl(): Promise<string>;
10
+ goBack(): Promise<void>;
11
+ }
12
+ export { ClientCredentialsDetailsPage };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClientCredentialsDetailsPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ class ClientCredentialsDetailsPage {
6
+ page;
7
+ operateUrlRow;
8
+ operateUrlValue;
9
+ clientNameHeading;
10
+ constructor(page) {
11
+ this.page = page;
12
+ this.operateUrlRow = page.getByRole('cell', { name: 'Operate URL' });
13
+ this.operateUrlValue = this.operateUrlRow.getByRole('textbox');
14
+ this.clientNameHeading = (clientName) => page.getByRole('heading', { name: clientName });
15
+ }
16
+ async isOpen(clientName) {
17
+ await (0, test_1.expect)(this.clientNameHeading(clientName)).toBeVisible({
18
+ timeout: 30000,
19
+ });
20
+ }
21
+ async getOperateUrl() {
22
+ if (await this.operateUrlValue.isVisible({ timeout: 10000 }).catch(() => false)) {
23
+ return await this.operateUrlValue.inputValue();
24
+ }
25
+ const text = await this.page.innerText('body');
26
+ const match = text.match(/Operate URL\s*([\w:/.-]+\/?)/i);
27
+ if (!match || !match[1]) {
28
+ throw new Error('Operate URL not found in client credentials page');
29
+ }
30
+ return match[1];
31
+ }
32
+ async goBack() {
33
+ await this.page.goBack();
34
+ }
35
+ }
36
+ exports.ClientCredentialsDetailsPage = ClientCredentialsDetailsPage;