@camunda/e2e-test-suite 0.0.1287 → 0.0.1289

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 (45) hide show
  1. package/dist/pages/8.8/AppsPage.d.ts +7 -3
  2. package/dist/pages/8.8/AppsPage.js +96 -26
  3. package/dist/pages/8.8/ModelerCreatePage.d.ts +3 -0
  4. package/dist/pages/8.8/ModelerCreatePage.js +25 -0
  5. package/dist/pages/8.8/UtilitiesPage.js +34 -17
  6. package/dist/pages/8.8/WorkspaceMembersPage.d.ts +1 -0
  7. package/dist/pages/8.8/WorkspaceMembersPage.js +21 -10
  8. package/dist/pages/8.9/AppsPage.d.ts +9 -3
  9. package/dist/pages/8.9/AppsPage.js +262 -47
  10. package/dist/pages/8.9/ClusterDetailsPage.d.ts +5 -0
  11. package/dist/pages/8.9/ClusterDetailsPage.js +92 -9
  12. package/dist/pages/8.9/ClusterSecretsPage.js +5 -1
  13. package/dist/pages/8.9/ConnectorMarketplacePage.d.ts +1 -0
  14. package/dist/pages/8.9/ConnectorMarketplacePage.js +46 -3
  15. package/dist/pages/8.9/ConsoleOrganizationPage.d.ts +3 -2
  16. package/dist/pages/8.9/ConsoleOrganizationPage.js +47 -22
  17. package/dist/pages/8.9/FormJsPage.d.ts +4 -0
  18. package/dist/pages/8.9/FormJsPage.js +53 -19
  19. package/dist/pages/8.9/IdpCreatePage.js +5 -0
  20. package/dist/pages/8.9/ModelerCreatePage.d.ts +5 -0
  21. package/dist/pages/8.9/ModelerCreatePage.js +153 -21
  22. package/dist/pages/8.9/ModelerHomePage.d.ts +1 -0
  23. package/dist/pages/8.9/ModelerHomePage.js +29 -4
  24. package/dist/pages/8.9/PlayPage.js +11 -1
  25. package/dist/pages/8.9/ProcessApplicationPage.js +48 -4
  26. package/dist/pages/8.9/UtilitiesPage.js +57 -17
  27. package/dist/pages/8.9/WorkspaceMembersPage.d.ts +21 -0
  28. package/dist/pages/8.9/WorkspaceMembersPage.js +264 -0
  29. package/dist/tests/8.8/access-user-role-management.spec.js +57 -29
  30. package/dist/tests/8.8/console-user-flows.spec.js +22 -1
  31. package/dist/tests/8.8/rba-enabled-v1-user-flows.spec.js +13 -4
  32. package/dist/tests/8.8/rba-enabled-v2-user-flows.spec.js +50 -14
  33. package/dist/tests/8.8/test-setup.spec.js +49 -4
  34. package/dist/tests/8.9/access-user-role-management.spec.js +111 -26
  35. package/dist/tests/8.9/console-user-flows.spec.js +4 -4
  36. package/dist/tests/8.9/idp-user-flows.spec.js +2 -1
  37. package/dist/tests/8.9/rba-enabled-v1-user-flows.spec.js +13 -4
  38. package/dist/tests/8.9/rba-enabled-v2-user-flows.spec.js +13 -4
  39. package/dist/tests/8.9/test-setup.spec.js +57 -4
  40. package/dist/tests/8.9/utr-enabled-user-flows.spec.js +18 -0
  41. package/dist/tests/8.9/web-modeler-user-flows.spec.js +6 -2
  42. package/dist/utils/consoleApiHelpers.d.ts +2 -0
  43. package/dist/utils/consoleApiHelpers.js +50 -4
  44. package/dist/utils/resetSession.js +6 -1
  45. package/package.json +1 -1
@@ -9,6 +9,7 @@ const roleAuthorizations_1 = require("../../utils/roleAuthorizations");
9
9
  const expectTextWithRetry_1 = require("../../utils/assertionHelpers/expectTextWithRetry");
10
10
  const expectTextWithPagination_1 = require("../../utils/assertionHelpers/expectTextWithPagination");
11
11
  const users_1 = require("../../utils/users");
12
+ const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
12
13
  const mainUser = (0, users_1.getTestUser)('twentySixthUser');
13
14
  _8_8_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
14
15
  const clusterNames = {
@@ -18,6 +19,10 @@ _8_8_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
18
19
  'RBA On User Flow - Permission for Selected Processes Only': 'Fourth RBA V2 Cluster',
19
20
  };
20
21
  _8_8_1.test.beforeEach(async ({ page, homePage, clusterPage, loginPage, clusterDetailsPage, appsPage }, testInfo) => {
22
+ // Claimed here, not in each body: creating the cluster and waiting for
23
+ // it to come back Healthy after the authorizations toggle can outlast
24
+ // the default per-test timeout before the body starts.
25
+ _8_8_1.test.slow();
21
26
  await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, mainUser, (testInfo.workerIndex + 1) * 1000);
22
27
  await (0, test_1.expect)(homePage.clusterTab).toBeVisible({ timeout: 120000 });
23
28
  await homePage.clickClusters();
@@ -25,13 +30,20 @@ _8_8_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
25
30
  (0, test_1.expect)(clusterName, `No cluster mapping for test title: "${testInfo.title}")`).toBeTruthy();
26
31
  await clusterPage.createClusterIfNotExists(clusterName);
27
32
  await (0, UtilitiesPage_1.disableRBA)(clusterName, homePage, clusterPage, clusterDetailsPage, appsPage);
33
+ // The flows below hand off to test users with no elevated or DevOps org
34
+ // role, and Hub only lets those roles assign an environment to a
35
+ // workspace (camunda-hub#28955). Without this, the test user's deploy
36
+ // dialog never offers this cluster and every runProcessInstance retry
37
+ // fails until the test times out. Assign it now, while the elevated
38
+ // main user's session is active. test-setup creates the test users'
39
+ // workspaces up front so that they exist at this point.
40
+ await (0, consoleApiHelpers_1.linkClusterToWorkspacesNamedViaApi)(page, clusterName);
28
41
  });
29
42
  _8_8_1.test.afterEach(async ({ page }, testInfo) => {
30
43
  await (0, _setup_1.captureScreenshot)(page, testInfo);
31
44
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
32
45
  });
33
46
  (0, _8_8_1.test)('RBA On User Flow - No User Permission', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, loginPage, settingsPage, }, testInfo) => {
34
- _8_8_1.test.slow();
35
47
  const clusterName = clusterNames[testInfo.title];
36
48
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
37
49
  const processName = 'RBA_NO_PERM' + randomString;
@@ -68,10 +80,19 @@ _8_8_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
68
80
  await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.authorizationAllPermissions)(role));
69
81
  });
70
82
  await _8_8_1.test.step('Clear cookies and reset session', async () => {
83
+ // Reset the session directly rather than driving Hub's user-menu
84
+ // logout: that menu is not reachable from every page this step can be
85
+ // reached from, and clickOpenSettingsButton then burns all three of its
86
+ // retries (nightly: "Failed to click button after 3 retries"). Clearing
87
+ // cookies and storage is what the step is actually for, and is what
88
+ // pages/8.9's copy of this spec does.
89
+ await page.context().clearCookies();
90
+ await page.evaluate(() => {
91
+ localStorage.clear();
92
+ sessionStorage.clear();
93
+ });
71
94
  await page.goto('/');
72
- await settingsPage.clickOpenSettingsButton();
73
- await settingsPage.clickLogoutButton();
74
- await loginPage.loginWithTestUser(testUser);
95
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, 1000);
75
96
  });
76
97
  await _8_8_1.test.step('Navigate to Web Modeler', async () => {
77
98
  await appsPage.clickCamundaApps();
@@ -131,7 +152,6 @@ _8_8_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
131
152
  });
132
153
  });
133
154
  (0, _8_8_1.test)('RBA On User Flow - Permission for One Process', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, loginPage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, settingsPage, }, testInfo) => {
134
- _8_8_1.test.slow();
135
155
  const clusterName = clusterNames[testInfo.title];
136
156
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
137
157
  const processName = 'RBA_ONE_PERM' + randomString;
@@ -175,12 +195,21 @@ _8_8_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
175
195
  await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.roleAllAuthorization)(role1));
176
196
  });
177
197
  await _8_8_1.test.step('Clear cookies and reset session', async () => {
198
+ // Reset the session directly rather than driving Hub's user-menu
199
+ // logout: that menu is not reachable from every page this step can be
200
+ // reached from, and clickOpenSettingsButton then burns all three of its
201
+ // retries (nightly: "Failed to click button after 3 retries"). Clearing
202
+ // cookies and storage is what the step is actually for, and is what
203
+ // pages/8.9's copy of this spec does.
204
+ await page.context().clearCookies();
205
+ await page.evaluate(() => {
206
+ localStorage.clear();
207
+ sessionStorage.clear();
208
+ });
178
209
  await page.goto('/');
179
- await settingsPage.clickOpenSettingsButton();
180
- await settingsPage.clickLogoutButton();
181
210
  });
182
211
  await _8_8_1.test.step('Login as Test User', async () => {
183
- await loginPage.loginWithTestUser(testUser);
212
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, 1000);
184
213
  });
185
214
  await _8_8_1.test.step('Navigate to Web Modeler', async () => {
186
215
  await appsPage.clickCamundaApps();
@@ -280,7 +309,6 @@ _8_8_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
280
309
  });
281
310
  });
282
311
  (0, _8_8_1.test)('RBA On User Flow - Permission for All Processes with Full Permissions', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, }, testInfo) => {
283
- _8_8_1.test.slow();
284
312
  const clusterName = clusterNames[testInfo.title];
285
313
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
286
314
  const processName = 'AFTER_RBA' + randomString;
@@ -352,8 +380,7 @@ _8_8_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
352
380
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2);
353
381
  });
354
382
  });
355
- (0, _8_8_1.test)('RBA On User Flow - Permission for Selected Processes Only', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, loginPage, settingsPage, }, testInfo) => {
356
- _8_8_1.test.slow();
383
+ (0, _8_8_1.test)('RBA On User Flow - Permission for Selected Processes Only', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, loginPage, }, testInfo) => {
357
384
  const clusterName = clusterNames[testInfo.title];
358
385
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
359
386
  const processName = 'RBA_SELECTED_PERM' + randomString;
@@ -392,10 +419,19 @@ _8_8_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
392
419
  await (0, sleep_1.sleep)(20000);
393
420
  });
394
421
  await _8_8_1.test.step('Clear cookies and reset session', async () => {
422
+ // Reset the session directly rather than driving Hub's user-menu
423
+ // logout: that menu is not reachable from every page this step can be
424
+ // reached from, and clickOpenSettingsButton then burns all three of its
425
+ // retries (nightly: "Failed to click button after 3 retries"). Clearing
426
+ // cookies and storage is what the step is actually for, and is what
427
+ // pages/8.9's copy of this spec does.
428
+ await page.context().clearCookies();
429
+ await page.evaluate(() => {
430
+ localStorage.clear();
431
+ sessionStorage.clear();
432
+ });
395
433
  await page.goto('/');
396
- await settingsPage.clickOpenSettingsButton();
397
- await settingsPage.clickLogoutButton();
398
- await loginPage.loginWithTestUser(testUser);
434
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, 1000);
399
435
  });
400
436
  await _8_8_1.test.step('Navigate to Web Modeler', async () => {
401
437
  await appsPage.clickCamundaApps();
@@ -118,11 +118,56 @@ _8_8_1.test.describe('Cluster Setup Tests', () => {
118
118
  await clusterSecretsPage.createSetOfSecrets(clusterName, connectorSecrets_1.connectorSecretsValues);
119
119
  }
120
120
  });
121
- for (const [index, user] of (0, users_1.getTestUsers)().entries()) {
122
- (0, _8_8_1.test)(`Create Project Folder for User ${index + 1}`, async ({ page, loginPage, homePage, appsPage, modelerHomePage, }, testInfo) => {
123
- await _8_8_1.test.step('Log in', async () => {
124
- await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, user, (testInfo.workerIndex + 1) * 1000);
121
+ // The RBA specs hand off to these developer-role users, who cannot assign an
122
+ // environment to a workspace (camunda-hub#28955). Their workspaces must exist
123
+ // before the RBA beforeEach links its cluster to them as the admin main user.
124
+ const rbaHandoffUsers = process.env.IS_AG === 'true' && process.env.RUN_FULL_SUITE !== 'true'
125
+ ? []
126
+ : ['4', '5', '6']
127
+ .map((n) => ({
128
+ username: process.env[`C8_USERNAME_TEST_${n}`] ?? '',
129
+ password: process.env[`C8_PASSWORD_TEST_${n}`] ?? '',
130
+ title: `Create Project Folder for RBA hand-off user TEST_${n}`,
131
+ }))
132
+ .filter((user) => user.username !== '' && user.password !== '');
133
+ for (const [index, user] of [
134
+ ...(0, users_1.getTestUsers)().map((u, i) => ({
135
+ ...u,
136
+ title: `Create Project Folder for User ${i + 1}`,
137
+ })),
138
+ ...rbaHandoffUsers,
139
+ ].entries()) {
140
+ const isRbaHandoffUser = index >= (0, users_1.getTestUsers)().length;
141
+ (0, _8_8_1.test)(user.title, async ({ page, loginPage, homePage, appsPage, modelerHomePage }, testInfo) => {
142
+ const loggedIn = await _8_8_1.test.step('Log in', async () => {
143
+ try {
144
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, user, (testInfo.workerIndex + 1) * 1000);
145
+ return true;
146
+ }
147
+ catch (error) {
148
+ // Every spec in the project depends on this setup project, so a
149
+ // hand-off slot the org did not provision must not block the whole
150
+ // suite (an 8.9 PR run lost 162 tests to exactly that). Nothing but
151
+ // the RBA specs reads these three workspaces, and each of those logs
152
+ // in as its own user, so it fails on its own login instead.
153
+ //
154
+ // Any failure, not just a credential rejection: unlike 8.9/8.10,
155
+ // this version's LoginPage does not run classifyLoginRejection, so
156
+ // no AUTH0_INVALID_CREDENTIALS marker ever reaches here to match on.
157
+ if (!isRbaHandoffUser) {
158
+ throw error;
159
+ }
160
+ console.warn(`${user.title}: ${String(error)}`);
161
+ testInfo.annotations.push({
162
+ type: 'warning',
163
+ description: 'Could not log in as this hand-off user; no workspace',
164
+ });
165
+ return false;
166
+ }
125
167
  });
168
+ if (!loggedIn) {
169
+ return;
170
+ }
126
171
  await _8_8_1.test.step('Navigate to Web Modeler', async () => {
127
172
  // Camunda Hub replaced Console + Web Modeler on SaaS: it lands on the
128
173
  // Modeler home directly and has no app switcher to wait for.
@@ -6,9 +6,15 @@ const UtilitiesPage_1 = require("../../pages/8.9/UtilitiesPage");
6
6
  const sleep_1 = require("../../utils/sleep");
7
7
  const resetSession_1 = require("../../utils/resetSession");
8
8
  const LoginPage_1 = require("../../pages/8.9/LoginPage");
9
+ const WorkspaceMembersPage_1 = require("../../pages/8.9/WorkspaceMembersPage");
9
10
  const test_1 = require("@playwright/test");
10
11
  const users_1 = require("../../utils/users");
12
+ const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
11
13
  const testUser = (0, users_1.getTestUser)('mainUser');
14
+ // The workspace the Analyst flow borrows Editor rights on, and whether that
15
+ // grant is currently outstanding (read by the teardown below).
16
+ const analystWorkspaceName = 'Cross Component Test Project';
17
+ let analystWorkspaceGrantMade = false;
12
18
  _8_9_1.test.describe.configure({ mode: 'parallel' });
13
19
  _8_9_1.test.describe('User Roles User Flow', () => {
14
20
  const clusterNames = {
@@ -17,6 +23,10 @@ _8_9_1.test.describe('User Roles User Flow', () => {
17
23
  'Admin Role User Flow': 'Admin Role Cluster',
18
24
  };
19
25
  _8_9_1.test.beforeEach(async ({ page, homePage, clusterPage, loginPage, clusterDetailsPage, appsPage }, testInfo) => {
26
+ // Claimed here, not in each body: creating the cluster and waiting for
27
+ // it to come back Healthy after the authorizations toggle can outlast
28
+ // the default per-test timeout before the body starts. Same as 8.8.
29
+ _8_9_1.test.slow();
20
30
  await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
21
31
  await (0, test_1.expect)(homePage.clusterTab).toBeVisible({ timeout: 120000 });
22
32
  await homePage.clickClusters();
@@ -30,9 +40,30 @@ _8_9_1.test.describe('User Roles User Flow', () => {
30
40
  await (0, _setup_1.captureScreenshot)(page, testInfo);
31
41
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
32
42
  });
43
+ // Workspace membership is durable org state: left behind, a retry starts
44
+ // with the analyst already an Editor and its "not reachable without
45
+ // workspace access" step fails. Hand it back whether the test passed or not.
46
+ _8_9_1.test.afterEach(async ({ page, loginPage }, testInfo) => {
47
+ if (!testInfo.title.startsWith('Analyst Role User Flow')) {
48
+ return;
49
+ }
50
+ if (!analystWorkspaceGrantMade) {
51
+ return;
52
+ }
53
+ // Leave Hub before the analyst's session is dropped. A Hub deep link
54
+ // reloaded signed out is persisted as the next login's destination
55
+ // (camunda-hub auth-service.saas.ts persistReturnTo), so the admin landed
56
+ // on the analyst's diagram, whose sidebar has no org link for
57
+ // assertTestUsesCorrectOrganization to find.
58
+ await page.goto('about:blank');
59
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
60
+ const workspaceMembersPage = new WorkspaceMembersPage_1.WorkspaceMembersPage(page);
61
+ await workspaceMembersPage.openManageMembers(analystWorkspaceName);
62
+ await workspaceMembersPage.removeMember(process.env.C8_USERNAME_TEST_9);
63
+ analystWorkspaceGrantMade = false;
64
+ });
33
65
  //Fix will be implemented in https://github.com/camunda/c8-cross-component-e2e-tests/issues/1236
34
66
  _8_9_1.test.skip('Modeler Role User Flow', async ({ page, modelerHomePage, appsPage, homePage, clusterPage, clusterDetailsPage, context, consoleOrganizationsPage, settingsPage, operateHomePage, ocIdentityHomePage, taskPanelPage, optimizeHomePage, modelerCreatePage, }) => {
35
- _8_9_1.test.slow();
36
67
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
37
68
  const processName = 'User Roles User Flow' + randomString;
38
69
  const clusterName = clusterNames['Modeler Role User Flow'];
@@ -65,9 +96,9 @@ _8_9_1.test.describe('User Roles User Flow', () => {
65
96
  timeout: 60000,
66
97
  });
67
98
  await appsPage.clickCamundaApps();
68
- await appsPage.assertOptimizePresent();
69
- await appsPage.assertOperatePresent();
70
- await appsPage.assertTasklistPresent();
99
+ await appsPage.assertOptimizePresent(clusterName);
100
+ await appsPage.assertOperatePresent(clusterName);
101
+ await appsPage.assertTasklistPresent(clusterName);
71
102
  await (0, test_1.expect)(appsPage.modelerLink).toBeVisible();
72
103
  await appsPage.clickCamundaApps();
73
104
  });
@@ -79,7 +110,7 @@ _8_9_1.test.describe('User Roles User Flow', () => {
79
110
  });
80
111
  });
81
112
  await _8_9_1.test.step('Navigate to Tasklist and Ensure Tasklist is not Accessible', async () => {
82
- await page.goBack();
113
+ await appsPage.goBackToHub();
83
114
  await (0, UtilitiesPage_1.waitForLoadingToFinish)(page);
84
115
  await appsPage.clickCamundaApps();
85
116
  await appsPage.clickTasklist(clusterName);
@@ -88,7 +119,7 @@ _8_9_1.test.describe('User Roles User Flow', () => {
88
119
  });
89
120
  });
90
121
  await _8_9_1.test.step('Navigate to Identity and Ensure Identity is not Accessible', async () => {
91
- await page.goBack();
122
+ await appsPage.goBackToHub();
92
123
  await (0, UtilitiesPage_1.waitForLoadingToFinish)(page);
93
124
  await appsPage.clickCamundaApps();
94
125
  await appsPage.clickAdmin(clusterName);
@@ -97,7 +128,7 @@ _8_9_1.test.describe('User Roles User Flow', () => {
97
128
  });
98
129
  });
99
130
  await _8_9_1.test.step('Navigate to Optimize and Ensure Optimize is Not Accessible', async () => {
100
- await page.goBack();
131
+ await appsPage.goBackToHub();
101
132
  await (0, UtilitiesPage_1.waitForLoadingToFinish)(page);
102
133
  await appsPage.clickCamundaApps();
103
134
  await appsPage.clickOptimize(clusterName);
@@ -106,7 +137,7 @@ _8_9_1.test.describe('User Roles User Flow', () => {
106
137
  });
107
138
  });
108
139
  await _8_9_1.test.step('Navigate to Modeler and Ensure Diagram Failed To Deploy', async () => {
109
- await page.goBack();
140
+ await appsPage.goBackToHub();
110
141
  await (0, UtilitiesPage_1.waitForLoadingToFinish)(page);
111
142
  await appsPage.clickCamundaApps();
112
143
  await appsPage.clickModeler();
@@ -130,10 +161,20 @@ _8_9_1.test.describe('User Roles User Flow', () => {
130
161
  });
131
162
  });
132
163
  (0, _8_9_1.test)('Analyst Role User Flow', async ({ page, modelerHomePage, appsPage, homePage, clusterPage, clusterDetailsPage, browser, consoleOrganizationsPage, settingsPage, operateHomePage, ocIdentityHomePage, taskPanelPage, optimizeHomePage, modelerCreatePage, }) => {
133
- _8_9_1.test.slow();
134
164
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
135
165
  const processName = 'User Roles User Flow' + randomString;
136
166
  const clusterName = clusterNames['Analyst Role User Flow'];
167
+ // A retry runs in a fresh worker, where analystWorkspaceGrantMade starts
168
+ // false even when the previous attempt's teardown failed to hand the
169
+ // grant back. The "not reachable" step below would then always fail.
170
+ if (_8_9_1.test.info().retry > 0) {
171
+ await _8_9_1.test.step('Hand back a workspace grant left by the previous attempt', async () => {
172
+ await appsPage.clickModeler();
173
+ const workspaceMembersPage = new WorkspaceMembersPage_1.WorkspaceMembersPage(page);
174
+ await workspaceMembersPage.openManageMembers(analystWorkspaceName);
175
+ await workspaceMembersPage.removeMember(process.env.C8_USERNAME_TEST_9);
176
+ });
177
+ }
137
178
  await _8_9_1.test.step('Navigate to Console and Enable RBA', async () => {
138
179
  await (0, UtilitiesPage_1.enableAuthorizations)(clusterName, homePage, clusterPage, clusterDetailsPage, appsPage);
139
180
  await (0, sleep_1.sleep)(15000);
@@ -155,6 +196,50 @@ _8_9_1.test.describe('User Roles User Flow', () => {
155
196
  password: process.env.C8_PASSWORD_TEST_9,
156
197
  });
157
198
  });
199
+ // Hub no longer lets an organization role alone reach a cluster's apps: a
200
+ // non-admin sees only environments assigned to a workspace they are Editor
201
+ // or Workspace Admin on (camunda-hub EnvironmentVisibilityResolver,
202
+ // ProjectOperation.VIEW_ENVIRONMENTS). Assert that gate, then grant it.
203
+ await _8_9_1.test.step('Ensure Optimize is not reachable without workspace access', async () => {
204
+ await appsPage.clickCamundaApps();
205
+ await (0, test_1.expect)(page
206
+ .getByText('Your organization has no workspaces yet')
207
+ .or(page.getByText("You don't have explicit membership in any workspace"))
208
+ .first()).toBeVisible({ timeout: 60000 });
209
+ const hubSidebar = page.getByRole('navigation', {
210
+ name: 'Main navigation',
211
+ });
212
+ // The negative counts below mean nothing before the shell has rendered.
213
+ await (0, test_1.expect)(hubSidebar).toBeVisible({ timeout: 30000 });
214
+ await (0, test_1.expect)(hubSidebar.getByRole('button', { name: clusterName })).toHaveCount(0, { timeout: 30000 });
215
+ await (0, test_1.expect)(hubSidebar.getByRole('link', { name: /Optimize/ })).toHaveCount(0, { timeout: 30000 });
216
+ await (0, test_1.expect)(optimizeHomePage.optimizeBanner).not.toBeVisible({
217
+ timeout: 30000,
218
+ });
219
+ });
220
+ await _8_9_1.test.step('Grant the analyst Editor rights on the shared workspace', async () => {
221
+ // Membership and environment assignment are org-admin actions, so this
222
+ // runs as the main user and switches back afterwards.
223
+ await (0, resetSession_1.resetSession)(browser, page);
224
+ await new LoginPage_1.LoginPage(page).loginWithTestUser({
225
+ username: process.env.C8_USERNAME,
226
+ password: process.env.C8_PASSWORD,
227
+ });
228
+ const workspaceMembersPage = new WorkspaceMembersPage_1.WorkspaceMembersPage(page);
229
+ await workspaceMembersPage.openManageMembers(analystWorkspaceName);
230
+ // Set before the grant: a failure partway through can still have added
231
+ // the member, and teardown must undo that too.
232
+ analystWorkspaceGrantMade = true;
233
+ await workspaceMembersPage.setMemberRole(process.env.C8_USERNAME_TEST_9, 'Editor');
234
+ // Editorship alone surfaces nothing: this cluster's environment must
235
+ // also be assigned to that same workspace, and nothing else assigns it.
236
+ await (0, consoleApiHelpers_1.linkClusterToWorkspaceViaApi)(page, workspaceMembersPage.workspaceId(), clusterName);
237
+ await (0, resetSession_1.resetSession)(browser, page);
238
+ await new LoginPage_1.LoginPage(page).loginWithTestUser({
239
+ username: process.env.C8_USERNAME_TEST_9,
240
+ password: process.env.C8_PASSWORD_TEST_9,
241
+ });
242
+ });
158
243
  await _8_9_1.test.step('Wait for the role change to reach Optimize', async () => {
159
244
  // Replaces a blind `sleep(600000)`. The role change only takes effect in
160
245
  // Optimize once its permission cache refreshes, and reaching Optimize is
@@ -188,9 +273,9 @@ _8_9_1.test.describe('User Roles User Flow', () => {
188
273
  timeout: 60000,
189
274
  });
190
275
  await appsPage.clickCamundaApps();
191
- await appsPage.assertOptimizePresent();
192
- await appsPage.assertOperatePresent();
193
- await appsPage.assertTasklistPresent();
276
+ await appsPage.assertOptimizePresent(clusterName);
277
+ await appsPage.assertOperatePresent(clusterName);
278
+ await appsPage.assertTasklistPresent(clusterName);
194
279
  await (0, test_1.expect)(appsPage.modelerLink).toBeVisible();
195
280
  await appsPage.clickCamundaApps();
196
281
  });
@@ -200,7 +285,7 @@ _8_9_1.test.describe('User Roles User Flow', () => {
200
285
  await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(page, operateHomePage.noPermissionsMessage, 'Operate No Permission message');
201
286
  });
202
287
  await _8_9_1.test.step('Navigate to Tasklist and Ensure Tasklist is not Accessible', async () => {
203
- await page.goBack();
288
+ await appsPage.goBackToHub();
204
289
  await appsPage.clickCamundaApps();
205
290
  await appsPage.clickTasklist(clusterName);
206
291
  await (0, test_1.expect)(taskPanelPage.noPermissionsMessage).toBeVisible({
@@ -208,7 +293,7 @@ _8_9_1.test.describe('User Roles User Flow', () => {
208
293
  });
209
294
  });
210
295
  await _8_9_1.test.step('Navigate to Identity and Ensure Identity is not Accessible', async () => {
211
- await page.goBack();
296
+ await appsPage.goBackToHub();
212
297
  await appsPage.clickCamundaApps();
213
298
  await appsPage.clickAdmin(clusterName);
214
299
  await (0, test_1.expect)(ocIdentityHomePage.noPermissionsMessage).toBeVisible({
@@ -216,14 +301,14 @@ _8_9_1.test.describe('User Roles User Flow', () => {
216
301
  });
217
302
  });
218
303
  await _8_9_1.test.step('Navigate to Optimize and Ensure Optimize is Accessible', async () => {
219
- await page.goBack();
304
+ await appsPage.goBackToHub();
220
305
  await appsPage.clickCamundaApps();
221
306
  await appsPage.clickOptimize(clusterName);
222
307
  await (0, test_1.expect)(optimizeHomePage.optimizeBanner).toBeVisible({
223
308
  timeout: 60000,
224
309
  });
225
310
  });
226
- await _8_9_1.test.step('Navigate to Modeler and Ensure Diagram Failed To Deploy', async () => {
311
+ await _8_9_1.test.step('Navigate to Modeler and Ensure Diagram Cannot Be Deployed & Run', async () => {
227
312
  await appsPage.clickCamundaApps();
228
313
  await appsPage.clickModeler();
229
314
  await homePage.clickSkipCustomization();
@@ -240,13 +325,13 @@ _8_9_1.test.describe('User Roles User Flow', () => {
240
325
  await modelerCreatePage.clickAppendElementButton();
241
326
  await modelerCreatePage.clickAppendEndEventButton();
242
327
  await (0, sleep_1.sleep)(20000);
243
- await modelerCreatePage.runProcessInstance(clusterName, '', {}, '', false);
244
- await (0, test_1.expect)(page.getByText(/The (diagram|application) failed to deploy & run/)).toBeVisible({ timeout: 60000 });
245
- await modelerCreatePage.clickCloseButton();
328
+ // Hub gates this in the UI: an Analyst holds no instance or workflow
329
+ // create permission, so "Deploy & run" is offered only disabled, where
330
+ // Console let the attempt through and reported a failed deployment.
331
+ await modelerCreatePage.assertDeployAndRunNotPermitted();
246
332
  });
247
333
  });
248
334
  (0, _8_9_1.test)('Admin Role User Flow', async ({ page, modelerHomePage, appsPage, homePage, clusterPage, clusterDetailsPage, browser, consoleOrganizationsPage, settingsPage, operateHomePage, ocIdentityHomePage, taskPanelPage, optimizeHomePage, modelerCreatePage, }) => {
249
- _8_9_1.test.slow();
250
335
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
251
336
  const processName = 'User Roles User Flow' + randomString;
252
337
  const clusterName = clusterNames['Admin Role User Flow'];
@@ -304,9 +389,9 @@ _8_9_1.test.describe('User Roles User Flow', () => {
304
389
  timeout: 60000,
305
390
  });
306
391
  await appsPage.clickCamundaApps();
307
- await appsPage.assertOptimizePresent();
308
- await appsPage.assertOperatePresent();
309
- await appsPage.assertTasklistPresent();
392
+ await appsPage.assertOptimizePresent(clusterName);
393
+ await appsPage.assertOperatePresent(clusterName);
394
+ await appsPage.assertTasklistPresent(clusterName);
310
395
  await (0, test_1.expect)(appsPage.modelerLink).toBeVisible();
311
396
  await appsPage.clickCamundaApps();
312
397
  });
@@ -318,7 +403,7 @@ _8_9_1.test.describe('User Roles User Flow', () => {
318
403
  });
319
404
  });
320
405
  await _8_9_1.test.step('Navigate to Tasklist and Ensure Tasklist is Accessible', async () => {
321
- await page.goBack();
406
+ await appsPage.goBackToHub();
322
407
  await appsPage.clickCamundaApps();
323
408
  await appsPage.clickTasklist(clusterName);
324
409
  await (0, test_1.expect)(taskPanelPage.taskListPageBanner).toBeVisible({
@@ -326,7 +411,7 @@ _8_9_1.test.describe('User Roles User Flow', () => {
326
411
  });
327
412
  });
328
413
  await _8_9_1.test.step('Navigate to Identity and Ensure Identity is Accessible', async () => {
329
- await page.goBack();
414
+ await appsPage.goBackToHub();
330
415
  await appsPage.clickCamundaApps();
331
416
  await appsPage.clickAdmin(clusterName);
332
417
  await (0, test_1.expect)(ocIdentityHomePage.adminBanner).toBeVisible({
@@ -337,7 +422,7 @@ _8_9_1.test.describe('User Roles User Flow', () => {
337
422
  });
338
423
  });
339
424
  await _8_9_1.test.step('Navigate to Optimize and Ensure Optimize is Accessible', async () => {
340
- await page.goBack();
425
+ await appsPage.goBackToHub();
341
426
  await appsPage.clickCamundaApps();
342
427
  await appsPage.clickOptimize(clusterName);
343
428
  await (0, test_1.expect)(optimizeHomePage.optimizeBanner).toBeVisible({
@@ -154,7 +154,7 @@ _8_9_1.test.describe('Console User Flow Tests @tasklistV2', () => {
154
154
  await _8_9_1.test.step('Verify Alert Count Increases to 1 After Trigger', async () => {
155
155
  await clusterDetailsPage.clickAlertsTab();
156
156
  await (0, test_1.expect)(async () => {
157
- await page.reload();
157
+ await clusterDetailsPage.reopenAlertsTab();
158
158
  await (0, test_1.expect)(clusterDetailsPage.alertsList.first()).toBeVisible({
159
159
  timeout: 20000,
160
160
  });
@@ -162,7 +162,7 @@ _8_9_1.test.describe('Console User Flow Tests @tasklistV2', () => {
162
162
  (0, test_1.expect)(await clusterDetailsPage.alertsList.count()).toBeGreaterThan(1);
163
163
  await (0, test_1.expect)(clusterDetailsPage.alertsList.nth(0)).toContainText(`Email`);
164
164
  await clusterDetailsPage.assertAlertText('Amount triggered1');
165
- }).toPass({ timeout: 60000 });
165
+ }).toPass({ timeout: 240000 });
166
166
  });
167
167
  await _8_9_1.test.step('Verify Alerts Received via Email for Incident', async () => {
168
168
  await (0, sleep_1.sleep)(60000);
@@ -194,13 +194,13 @@ _8_9_1.test.describe('Console User Flow Tests @tasklistV2', () => {
194
194
  await _8_9_1.test.step('Verify Alert Count Increases to 3 After Trigger', async () => {
195
195
  await clusterDetailsPage.clickAlertsTab();
196
196
  await (0, test_1.expect)(async () => {
197
- await page.reload();
197
+ await clusterDetailsPage.reopenAlertsTab();
198
198
  await (0, test_1.expect)(clusterDetailsPage.alertsList.first()).toBeVisible({
199
199
  timeout: 20000,
200
200
  });
201
201
  await clusterDetailsPage.expandAlerts();
202
202
  (0, test_1.expect)(await clusterDetailsPage.alertsList.count()).toBeGreaterThan(1);
203
- }).toPass({ timeout: 60000 });
203
+ }).toPass({ timeout: 240000 });
204
204
  await clusterDetailsPage.assertAlertText('Amount triggered3');
205
205
  });
206
206
  await _8_9_1.test.step('Verify Alerts Received via Email for Incident', async () => {
@@ -237,7 +237,8 @@ _8_9_1.test.describe('IDP User Flow Tests', () => {
237
237
  });
238
238
  _8_9_1.test.describe('Classification Template', () => {
239
239
  for (const params of classificationTestCases) {
240
- (0, _8_9_1.test)(`${params.provider} classification - User creates an idp application with a classification template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
240
+ // Skipped due to bug #29644: https://github.com/camunda/camunda-hub/issues/29644
241
+ _8_9_1.test.skip(`${params.provider} classification - User creates an idp application with a classification template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
241
242
  _8_9_1.test.slow();
242
243
  const idpApplicationName = await (0, randomName_1.randomNameAgregator)(`${params.provider} classification` + ' - IDP_Application_Name');
243
244
  const idpClassificationTemplateName = await (0, randomName_1.randomNameAgregator)(`${params.provider} classification` +
@@ -9,6 +9,7 @@ const roleAuthorizations_1 = require("../../utils/roleAuthorizations");
9
9
  const expectTextWithRetry_1 = require("../../utils/assertionHelpers/expectTextWithRetry");
10
10
  const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
11
11
  const users_1 = require("../../utils/users");
12
+ const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
12
13
  const mainUser = (0, users_1.getTestUser)('twentyFifthUser');
13
14
  _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
14
15
  const clusterNames = {
@@ -18,19 +19,30 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
18
19
  'RBA On User Flow - Permission for Selected Processes Only': 'Fourth RBA V1 Cluster',
19
20
  };
20
21
  _8_9_1.test.beforeEach(async ({ page, homePage, clusterPage, loginPage, clusterDetailsPage, appsPage }, testInfo) => {
22
+ // Claimed here, not in each body: creating the cluster and waiting for
23
+ // it to come back Healthy after the authorizations toggle can outlast
24
+ // the default per-test timeout before the body starts.
25
+ _8_9_1.test.slow();
21
26
  await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, mainUser, (testInfo.workerIndex + 1) * 1000);
22
27
  await homePage.clickClusters();
23
28
  const clusterName = clusterNames[testInfo.title];
24
29
  (0, test_1.expect)(clusterName, `No cluster mapping for test title: "${testInfo.title}")`).toBeTruthy();
25
30
  await clusterPage.createClusterIfNotExists(clusterName);
26
31
  await (0, UtilitiesPage_1.disableRBA)(clusterName, homePage, clusterPage, clusterDetailsPage, appsPage);
32
+ // The flows below hand off to test users with no elevated or DevOps org
33
+ // role, and Hub only lets those roles assign an environment to a
34
+ // workspace (camunda-hub#28955). Without this, the test user's deploy
35
+ // dialog never offers this cluster and every runProcessInstance retry
36
+ // fails until the test times out. Assign it now, while the elevated
37
+ // main user's session is active. test-setup creates the test users'
38
+ // workspaces up front so that they exist at this point.
39
+ await (0, consoleApiHelpers_1.linkClusterToWorkspacesNamedViaApi)(page, clusterName);
27
40
  });
28
41
  _8_9_1.test.afterEach(async ({ page }, testInfo) => {
29
42
  await (0, _setup_1.captureScreenshot)(page, testInfo);
30
43
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
31
44
  });
32
45
  (0, _8_9_1.test)('RBA On User Flow - No User Permission', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, loginPage, settingsPage, }, testInfo) => {
33
- _8_9_1.test.slow();
34
46
  const clusterName = clusterNames[testInfo.title];
35
47
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
36
48
  const processName = 'RBA_NO_PERM' + randomString;
@@ -150,7 +162,6 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
150
162
  });
151
163
  });
152
164
  (0, _8_9_1.test)('RBA On User Flow - Permission for One Process', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, loginPage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, settingsPage, }, testInfo) => {
153
- _8_9_1.test.slow();
154
165
  const clusterName = clusterNames[testInfo.title];
155
166
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
156
167
  const processName = 'RBA_ONE_PERM' + randomString;
@@ -298,7 +309,6 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
298
309
  });
299
310
  });
300
311
  (0, _8_9_1.test)('RBA On User Flow - Permission for All Processes with Full Permissions', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, }, testInfo) => {
301
- _8_9_1.test.slow();
302
312
  const clusterName = clusterNames[testInfo.title];
303
313
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
304
314
  const processName = 'AFTER_RBA' + randomString;
@@ -367,7 +377,6 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
367
377
  });
368
378
  });
369
379
  (0, _8_9_1.test)('RBA On User Flow - Permission for Selected Processes Only', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, loginPage, }, testInfo) => {
370
- _8_9_1.test.slow();
371
380
  const clusterName = clusterNames[testInfo.title];
372
381
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
373
382
  const processName = 'RBA_SELECTED_PERM' + randomString;