@camunda/e2e-test-suite 0.0.461 → 0.0.463

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.
@@ -19,7 +19,7 @@ export declare function runMultipleProcesses(page: Page, modelerHomePage: Modele
19
19
  export declare function createUserAndAssignToRole(page: Page, navigationPage: NavigationPage, managementIdentityPage: ManagementIdentityPage, keycloakLoginPage: KeycloakLoginPage, keycloakAdminPage: KeycloakAdminPage, ocIdentityHomePage: OCIdentityHomePage, identityMappingRulesPage: OCIdentityMappingRulesPage, ocIdentityRolesPage: OCIdentityRolesPage, username: string, password: string, role?: string, testMappings?: Serializable): Promise<void>;
20
20
  export declare function assignMappingToRole(page: Page, ocIdentityHomePage: OCIdentityHomePage, ocIdentityRolesPage: OCIdentityRolesPage, role: string, mappingRuleId: string, testMappings?: Serializable): Promise<void>;
21
21
  export declare function createAndRunProcess(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, processId?: string): Promise<void>;
22
- export declare function completeTaskWithRetry(page: Page, taskPanelPage: TaskPanelPage, taskDetailsPage: TaskDetailsPage, taskName: string, taskPriority: string, maxRetries?: number): Promise<void>;
22
+ export declare function completeTaskWithRetry(page: Page, taskPanelPage: TaskPanelPage, taskDetailsPage: TaskDetailsPage, taskName: string, taskPriority: string): Promise<void>;
23
23
  export declare function modelRestConnector(modelerCreatePage: ModelerCreatePage, connectorSettingsPage: ConnectorSettingsPage, connectorMarketplacePage: ConnectorMarketplacePage, processName: string, url: string, auth: string, resultExpression: string, resultVariable?: string, basicAuthCredentials?: {
24
24
  username: string;
25
25
  password: string;
@@ -8,6 +8,7 @@ const fileUpload_1 = require("../../utils/fileUpload");
8
8
  const findLocatorInPaginatedList_1 = require("../../utils/findLocatorInPaginatedList");
9
9
  const KeycloakUtils_1 = require("../SM-8.8/KeycloakUtils");
10
10
  const expectLocatorWithPagination_1 = require("../../utils/assertionHelpers/expectLocatorWithPagination");
11
+ const env_1 = require("../../utils/env");
11
12
  // This step will be skipped until new Identity expected flow is confirmed
12
13
  async function deleteAllUserGroups() {
13
14
  // await navigationPage.goToOCIdentity();
@@ -66,8 +67,14 @@ async function createAndRunProcess(page, modelerHomePage, modelerCreatePage, pro
66
67
  await modelerHomePage.clickProjectBreadcrumb();
67
68
  }
68
69
  exports.createAndRunProcess = createAndRunProcess;
69
- async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskName, taskPriority, maxRetries = 7) {
70
- for (let attempt = 0; attempt < maxRetries; attempt++) {
70
+ async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskName, taskPriority) {
71
+ // OpenSearch indexes slower than Elasticsearch, so allow more time
72
+ const TOTAL_TIMEOUT_MS = env_1.isOpenSearch ? 5 * 60 * 1000 : 2 * 60 * 1000;
73
+ const taskVisibilityTimeout = env_1.isOpenSearch ? 30000 : 10000;
74
+ const startTime = Date.now();
75
+ let attempt = 0;
76
+ while (Date.now() - startTime < TOTAL_TIMEOUT_MS) {
77
+ attempt++;
71
78
  try {
72
79
  await page.waitForLoadState('networkidle');
73
80
  await (0, sleep_1.sleep)(500);
@@ -75,7 +82,10 @@ async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskN
75
82
  .getByText(taskName, { exact: true })
76
83
  .first();
77
84
  try {
78
- await taskLocator.waitFor({ state: 'visible', timeout: 10000 });
85
+ await taskLocator.waitFor({
86
+ state: 'visible',
87
+ timeout: taskVisibilityTimeout,
88
+ });
79
89
  }
80
90
  catch {
81
91
  throw new Error(`Task ${taskName} not found in available tasks`);
@@ -93,18 +103,13 @@ async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskN
93
103
  return;
94
104
  }
95
105
  catch (error) {
96
- console.warn(`Attempt ${attempt + 1} failed for completing task ${taskName}:`, error instanceof Error ? error.message : error);
97
- if (attempt < maxRetries - 1) {
98
- await page.reload();
99
- await page.waitForLoadState('networkidle');
100
- await (0, sleep_1.sleep)(500);
101
- }
102
- else {
103
- console.error(`All ${maxRetries} attempts failed for task ${taskName}`);
104
- throw new Error(`Completion of task ${taskName} failed after ${maxRetries} attempts`);
105
- }
106
+ console.warn(`Attempt ${attempt} failed for completing task ${taskName}:`, error instanceof Error ? error.message : error);
107
+ await page.reload();
108
+ await page.waitForLoadState('networkidle');
109
+ await (0, sleep_1.sleep)(500);
106
110
  }
107
111
  }
112
+ throw new Error(`Completion of task ${taskName} failed after ${attempt} attempts (${TOTAL_TIMEOUT_MS / 1000}s timeout)`);
108
113
  }
109
114
  exports.completeTaskWithRetry = completeTaskWithRetry;
110
115
  async function modelRestConnector(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, url, auth, resultExpression, resultVariable = '', basicAuthCredentials = {
@@ -266,3 +266,172 @@ _8_9_1.test.describe('API optimize SaaS Tests', () => {
266
266
  (0, test_1.expect)(status).toBe(404);
267
267
  });
268
268
  });
269
+ _8_9_1.test.describe('API optimize SaaS Tests - Conditional Events', () => {
270
+ let optimizeCookie;
271
+ let optimizeBearerToken;
272
+ let conditionalEventsCollectionId;
273
+ let conditionalEventsReportId;
274
+ let baseUrl;
275
+ const CONDITIONAL_EVENTS_PROCESS_KEY = 'conditional-events-auto-process';
276
+ _8_9_1.test.beforeAll(async ({ browser, request }) => {
277
+ const page = await browser.newPage();
278
+ optimizeCookie = await (0, apiHelpers_1.getOptimizeCoockie)(page);
279
+ await page.close();
280
+ optimizeBearerToken = await (0, apiHelpers_1.authSaasAPI)(process.env.OPTIMIZE_API_TOKEN_AUDIENCE);
281
+ conditionalEventsCollectionId = await (0, apiHelpers_1.createCollection)(request, {
282
+ name: await (0, randomName_1.randomNameAgregator)('Conditional Events Collection'),
283
+ optimizeCookie,
284
+ });
285
+ await (0, apiHelpers_1.updateCollectionScope)(request, {
286
+ optimizeCookie,
287
+ collectionId: conditionalEventsCollectionId,
288
+ data: [
289
+ {
290
+ definitionKey: CONDITIONAL_EVENTS_PROCESS_KEY,
291
+ definitionType: 'process',
292
+ tenants: ['<default>'],
293
+ },
294
+ ],
295
+ });
296
+ conditionalEventsReportId = await (0, apiHelpers_1.createSingleProcessReport)(request, {
297
+ optimizeCookie,
298
+ collectionId: conditionalEventsCollectionId,
299
+ name: await (0, randomName_1.randomNameAgregator)('Conditional Events Report'),
300
+ definitions: [
301
+ {
302
+ key: CONDITIONAL_EVENTS_PROCESS_KEY,
303
+ filter: [],
304
+ groupBy: { type: 'none', value: null },
305
+ distributedBy: { type: 'none', value: null },
306
+ view: { entity: 'processInstance', properties: ['frequency'] },
307
+ },
308
+ ],
309
+ });
310
+ baseUrl = process.env.CAMUNDA_OPTIMIZE_BASE_URL;
311
+ });
312
+ (0, _8_9_1.test)('CE-OPT-09: Creating a Process Report for Conditional Events via API returns HTTP 200', async ({ request, }) => {
313
+ await _8_9_1.test.step('Create a process report for conditional-events-auto-process (200)', async () => {
314
+ const response = await request.post(`${baseUrl}/api/report/process/single`, {
315
+ headers: {
316
+ Cookie: optimizeCookie,
317
+ 'Content-Type': 'application/json',
318
+ },
319
+ data: {
320
+ collectionId: conditionalEventsCollectionId,
321
+ name: await (0, randomName_1.randomNameAgregator)('CE Report Inline'),
322
+ description: null,
323
+ data: {},
324
+ configuration: {
325
+ definitions: [
326
+ {
327
+ key: CONDITIONAL_EVENTS_PROCESS_KEY,
328
+ filter: [],
329
+ groupBy: { type: 'none', value: null },
330
+ distributedBy: { type: 'none', value: null },
331
+ view: {
332
+ entity: 'processInstance',
333
+ properties: ['frequency'],
334
+ },
335
+ },
336
+ ],
337
+ visualization: null,
338
+ },
339
+ },
340
+ });
341
+ await (0, apiHelpers_1.assertResponseStatus)(response, 200);
342
+ const body = await response.json();
343
+ (0, test_1.expect)(body).toHaveProperty('id');
344
+ (0, test_1.expect)(body.id).toBeTruthy();
345
+ });
346
+ });
347
+ (0, _8_9_1.test)('CE-OPT-10: Exporting the Conditional Events report definition via API returns the full report payload', async ({ request, }) => {
348
+ await _8_9_1.test.step('Export report definition successfully (200)', async () => {
349
+ const response = await request.post(`${baseUrl}/api/public/export/report/definition/json`, {
350
+ headers: {
351
+ Authorization: optimizeBearerToken,
352
+ 'Content-Type': 'application/json',
353
+ },
354
+ data: [conditionalEventsReportId],
355
+ });
356
+ await (0, apiHelpers_1.assertResponseStatus)(response, 200);
357
+ const body = await response.json();
358
+ (0, test_1.expect)(Array.isArray(body)).toBeTruthy();
359
+ (0, test_1.expect)(body.length).toBeGreaterThan(0);
360
+ (0, test_1.expect)(body[0]).toHaveProperty('id');
361
+ (0, test_1.expect)(body[0]).toHaveProperty('exportEntityType');
362
+ (0, test_1.expect)(body[0]).toHaveProperty('name');
363
+ (0, test_1.expect)(body[0]).toHaveProperty('collectionId');
364
+ });
365
+ });
366
+ (0, _8_9_1.test)('CE-OPT-11: Exporting the Conditional Events report without a token returns 401', async ({ request, }) => {
367
+ await _8_9_1.test.step('Export report definition without Authorization header (401)', async () => {
368
+ const response = await request.post(`${baseUrl}/api/public/export/report/definition/json`, {
369
+ headers: { 'Content-Type': 'application/json' },
370
+ data: [conditionalEventsReportId],
371
+ });
372
+ (0, test_1.expect)(response.status()).toBe(401);
373
+ });
374
+ });
375
+ (0, _8_9_1.test)('CE-OPT-12: Exporting the Conditional Events report with an invalid token returns 401', async ({ request, }) => {
376
+ await _8_9_1.test.step('Export report definition with invalid token (401)', async () => {
377
+ const response = await request.post(`${baseUrl}/api/public/export/report/definition/json`, {
378
+ headers: {
379
+ Authorization: 'Bearer invalid_token',
380
+ 'Content-Type': 'application/json',
381
+ },
382
+ data: [conditionalEventsReportId],
383
+ });
384
+ (0, test_1.expect)(response.status()).toBe(401);
385
+ });
386
+ });
387
+ (0, _8_9_1.test)('CE-OPT-13: Deleting the Conditional Events report via API succeeds with HTTP 200', async ({ request, }) => {
388
+ const reportToDeleteId = await (0, apiHelpers_1.createSingleProcessReport)(request, {
389
+ optimizeCookie,
390
+ collectionId: conditionalEventsCollectionId,
391
+ name: await (0, randomName_1.randomNameAgregator)('CE Report To Delete'),
392
+ definitions: [
393
+ {
394
+ key: CONDITIONAL_EVENTS_PROCESS_KEY,
395
+ filter: [],
396
+ groupBy: { type: 'none', value: null },
397
+ distributedBy: { type: 'none', value: null },
398
+ view: { entity: 'processInstance', properties: ['frequency'] },
399
+ },
400
+ ],
401
+ });
402
+ await _8_9_1.test.step('Delete report successfully (200)', async () => {
403
+ const response = await request.delete(`${baseUrl}/api/public/report/${reportToDeleteId}`, { headers: { Authorization: optimizeBearerToken } });
404
+ await (0, apiHelpers_1.assertResponseStatus)(response, 200);
405
+ });
406
+ });
407
+ (0, _8_9_1.test)('CE-OPT-14: A deleted Conditional Events report is no longer retrievable via the API', async ({ request, }) => {
408
+ const reportToDeleteId = await (0, apiHelpers_1.createSingleProcessReport)(request, {
409
+ optimizeCookie,
410
+ collectionId: conditionalEventsCollectionId,
411
+ name: await (0, randomName_1.randomNameAgregator)('CE Report Delete Verify'),
412
+ definitions: [
413
+ {
414
+ key: CONDITIONAL_EVENTS_PROCESS_KEY,
415
+ filter: [],
416
+ groupBy: { type: 'none', value: null },
417
+ distributedBy: { type: 'none', value: null },
418
+ view: { entity: 'processInstance', properties: ['frequency'] },
419
+ },
420
+ ],
421
+ });
422
+ await _8_9_1.test.step('Delete the report', async () => {
423
+ const deleteResponse = await request.delete(`${baseUrl}/api/public/report/${reportToDeleteId}`, { headers: { Authorization: optimizeBearerToken } });
424
+ await (0, apiHelpers_1.assertResponseStatus)(deleteResponse, 200);
425
+ });
426
+ await _8_9_1.test.step('Verify deleted report is no longer retrievable (404 or 500)', async () => {
427
+ const getResponse = await request.get(`${baseUrl}/api/public/report/${reportToDeleteId}`, { headers: { Authorization: optimizeBearerToken } });
428
+ (0, test_1.expect)([404, 500]).toContain(getResponse.status());
429
+ });
430
+ });
431
+ (0, _8_9_1.test)('CE-OPT-15: Attempting to delete the Conditional Events report with an invalid token returns 401', async ({ request, }) => {
432
+ await _8_9_1.test.step('Delete report with invalid token (401)', async () => {
433
+ const response = await request.delete(`${baseUrl}/api/public/report/${conditionalEventsReportId}`, { headers: { Authorization: 'Bearer invalid_token' } });
434
+ (0, test_1.expect)(response.status()).toBe(401);
435
+ });
436
+ });
437
+ });
@@ -5,9 +5,9 @@ const _8_9_1 = require("../../fixtures/8.9");
5
5
  const _setup_1 = require("../../test-setup.js");
6
6
  const UtilitiesPage_1 = require("../../pages/8.9/UtilitiesPage");
7
7
  const sleep_1 = require("../../utils/sleep");
8
- const resetSession_1 = require("../../utils/resetSession");
9
8
  const roleAuthorizations_1 = require("../../utils/roleAuthorizations");
10
9
  const expectTextWithRetry_1 = require("../../utils/assertionHelpers/expectTextWithRetry");
10
+ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
11
11
  const users_1 = require("../../utils/users");
12
12
  const mainUser = (0, users_1.getTestUser)('twentyFifthUser');
13
13
  _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
@@ -29,7 +29,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
29
29
  await (0, _setup_1.captureScreenshot)(page, testInfo);
30
30
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
31
31
  });
32
- (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, browser, loginPage, settingsPage, }, testInfo) => {
32
+ (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
33
  _8_9_1.test.slow();
34
34
  const clusterName = clusterNames[testInfo.title];
35
35
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
@@ -67,7 +67,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
67
67
  await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.authorizationAllPermissions)(role));
68
68
  });
69
69
  await _8_9_1.test.step('Clear cookies and reset session', async () => {
70
- await (0, resetSession_1.resetSession)(browser, page);
70
+ await page.context().clearCookies();
71
+ await page.evaluate(() => {
72
+ localStorage.clear();
73
+ sessionStorage.clear();
74
+ });
75
+ await page.goto('/');
71
76
  await loginPage.loginWithTestUser(testUser);
72
77
  });
73
78
  await _8_9_1.test.step('Navigate to Web Modeler', async () => {
@@ -100,7 +105,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
100
105
  await (0, sleep_1.sleep)(20000);
101
106
  });
102
107
  await _8_9_1.test.step('Login as Test User', async () => {
103
- await (0, resetSession_1.resetSession)(browser, page);
108
+ await page.context().clearCookies();
109
+ await page.evaluate(() => {
110
+ localStorage.clear();
111
+ sessionStorage.clear();
112
+ });
113
+ await page.goto('/');
104
114
  await loginPage.loginWithTestUser(testUser);
105
115
  });
106
116
  await _8_9_1.test.step('Navigate to Tasklist and Make Sure that the Two Deployed Processes Are Accessible', async () => {
@@ -145,7 +155,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
145
155
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2, { shouldBeVisible: false });
146
156
  });
147
157
  });
148
- (0, _8_9_1.test)('RBA On User Flow - Permission for One Process', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, browser, loginPage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, settingsPage, }, testInfo) => {
158
+ (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) => {
149
159
  _8_9_1.test.slow();
150
160
  const clusterName = clusterNames[testInfo.title];
151
161
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
@@ -190,7 +200,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
190
200
  await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.roleAllAuthorization)(role1));
191
201
  });
192
202
  await _8_9_1.test.step('Clear cookies and reset session', async () => {
193
- await (0, resetSession_1.resetSession)(browser, page);
203
+ await page.context().clearCookies();
204
+ await page.evaluate(() => {
205
+ localStorage.clear();
206
+ sessionStorage.clear();
207
+ });
208
+ await page.goto('/');
194
209
  });
195
210
  await _8_9_1.test.step('Login as Test User', async () => {
196
211
  await loginPage.loginWithTestUser(testUser);
@@ -225,14 +240,22 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
225
240
  await (0, sleep_1.sleep)(20000);
226
241
  });
227
242
  await _8_9_1.test.step('Login as Test User', async () => {
228
- await (0, resetSession_1.resetSession)(browser, page);
243
+ await page.context().clearCookies();
244
+ await page.evaluate(() => {
245
+ localStorage.clear();
246
+ sessionStorage.clear();
247
+ });
248
+ await page.goto('/');
229
249
  await loginPage.loginWithTestUser(testUser);
230
250
  });
231
251
  await _8_9_1.test.step('Navigate to Tasklist and Both Processes Are Accessible', async () => {
232
252
  await appsPage.clickCamundaApps();
233
253
  await appsPage.clickTasklist(clusterName);
234
- await (0, test_1.expect)(taskPanelPage.taskListPageBanner).toBeVisible({
235
- timeout: 30000,
254
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, taskPanelPage.taskListPageBanner, {
255
+ visibilityTimeout: 20000,
256
+ postAction: async () => {
257
+ await page.reload();
258
+ },
236
259
  });
237
260
  await taskPanelPage.clickProcessesTab();
238
261
  await taskProcessesPage.clickpopupContinueButton();
@@ -334,18 +357,17 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
334
357
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process1);
335
358
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2);
336
359
  });
337
- await _8_9_1.test.step('Assert Processes Can Be Started From Tasklist', async () => {
338
- await taskPanelPage.clickTasksTab();
339
- const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
340
- const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
360
+ await _8_9_1.test.step('Assert First Process Can Be Started From Tasklist', async () => {
341
361
  await taskPanelPage.clickProcessesTab();
342
362
  await taskProcessesPage.startProcess(process1);
343
- const updatedFirstProcessTaskCount = await taskPanelPage.taskCount(process1);
344
- (0, test_1.expect)(updatedFirstProcessTaskCount).toBe(firstProcessTaskCount + 1);
363
+ const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
364
+ (0, test_1.expect)(firstProcessTaskCount).toBe(2);
365
+ });
366
+ await _8_9_1.test.step('Assert Second Process Can Be Started From Tasklist', async () => {
345
367
  await taskPanelPage.clickProcessesTab();
346
368
  await taskProcessesPage.startProcess(process2);
347
- const updatedSecondProcessTaskCount = await taskPanelPage.taskCount(process2);
348
- (0, test_1.expect)(updatedSecondProcessTaskCount).toBe(secondProcessTaskCount + 1);
369
+ const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
370
+ (0, test_1.expect)(secondProcessTaskCount).toBe(2);
349
371
  });
350
372
  await _8_9_1.test.step('Navigate to Operate and Assert Both Processes Are Accessible', async () => {
351
373
  await appsPage.clickCamundaApps();
@@ -358,7 +380,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
358
380
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2);
359
381
  });
360
382
  });
361
- (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, browser, loginPage, }, testInfo) => {
383
+ (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) => {
362
384
  _8_9_1.test.slow();
363
385
  const clusterName = clusterNames[testInfo.title];
364
386
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
@@ -398,7 +420,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
398
420
  await (0, sleep_1.sleep)(15000);
399
421
  });
400
422
  await _8_9_1.test.step('Clear cookies and reset session', async () => {
401
- await (0, resetSession_1.resetSession)(browser, page);
423
+ await page.context().clearCookies();
424
+ await page.evaluate(() => {
425
+ localStorage.clear();
426
+ sessionStorage.clear();
427
+ });
428
+ await page.goto('/');
402
429
  await loginPage.loginWithTestUser(testUser);
403
430
  });
404
431
  await _8_9_1.test.step('Navigate to Web Modeler', async () => {
@@ -5,7 +5,6 @@ const _8_9_1 = require("../../fixtures/8.9");
5
5
  const _setup_1 = require("../../test-setup.js");
6
6
  const UtilitiesPage_1 = require("../../pages/8.9/UtilitiesPage");
7
7
  const sleep_1 = require("../../utils/sleep");
8
- const resetSession_1 = require("../../utils/resetSession");
9
8
  const roleAuthorizations_1 = require("../../utils/roleAuthorizations");
10
9
  const expectTextWithRetry_1 = require("../../utils/assertionHelpers/expectTextWithRetry");
11
10
  const expectTextWithPagination_1 = require("../../utils/assertionHelpers/expectTextWithPagination");
@@ -31,7 +30,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
31
30
  await (0, _setup_1.captureScreenshot)(page, testInfo);
32
31
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
33
32
  });
34
- (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, browser, loginPage, settingsPage, }, testInfo) => {
33
+ (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) => {
35
34
  _8_9_1.test.slow();
36
35
  const clusterName = clusterNames[testInfo.title];
37
36
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
@@ -69,7 +68,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
69
68
  await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.authorizationAllPermissions)(role));
70
69
  });
71
70
  await _8_9_1.test.step('Clear cookies and reset session', async () => {
72
- await (0, resetSession_1.resetSession)(browser, page);
71
+ await page.context().clearCookies();
72
+ await page.evaluate(() => {
73
+ localStorage.clear();
74
+ sessionStorage.clear();
75
+ });
76
+ await page.goto('/');
73
77
  await loginPage.loginWithTestUser(testUser);
74
78
  });
75
79
  await _8_9_1.test.step('Navigate to Web Modeler', async () => {
@@ -102,7 +106,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
102
106
  await (0, sleep_1.sleep)(20000);
103
107
  });
104
108
  await _8_9_1.test.step('Login as Test User', async () => {
105
- await (0, resetSession_1.resetSession)(browser, page);
109
+ await page.context().clearCookies();
110
+ await page.evaluate(() => {
111
+ localStorage.clear();
112
+ sessionStorage.clear();
113
+ });
114
+ await page.goto('/');
106
115
  await loginPage.loginWithTestUser(testUser);
107
116
  });
108
117
  await _8_9_1.test.step('Navigate to Tasklist and Make Sure that the Two Deployed Processes Are Not Accessible', async () => {
@@ -127,7 +136,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
127
136
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2, { shouldBeVisible: false });
128
137
  });
129
138
  });
130
- (0, _8_9_1.test)('RBA On User Flow - Permission for One Process', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, browser, loginPage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, settingsPage, }, testInfo) => {
139
+ (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) => {
131
140
  _8_9_1.test.slow();
132
141
  const clusterName = clusterNames[testInfo.title];
133
142
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
@@ -172,7 +181,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
172
181
  await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.roleAllAuthorization)(role1));
173
182
  });
174
183
  await _8_9_1.test.step('Clear cookies and reset session', async () => {
175
- await (0, resetSession_1.resetSession)(browser, page);
184
+ await page.context().clearCookies();
185
+ await page.evaluate(() => {
186
+ localStorage.clear();
187
+ sessionStorage.clear();
188
+ });
189
+ await page.goto('/');
176
190
  });
177
191
  await _8_9_1.test.step('Login as Test User', async () => {
178
192
  await loginPage.loginWithTestUser(testUser);
@@ -207,7 +221,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
207
221
  await (0, sleep_1.sleep)(20000);
208
222
  });
209
223
  await _8_9_1.test.step('Login as Test User', async () => {
210
- await (0, resetSession_1.resetSession)(browser, page);
224
+ await page.context().clearCookies();
225
+ await page.evaluate(() => {
226
+ localStorage.clear();
227
+ sessionStorage.clear();
228
+ });
229
+ await page.goto('/');
211
230
  await loginPage.loginWithTestUser(testUser);
212
231
  });
213
232
  await _8_9_1.test.step('Navigate to Tasklist and Only First Process Is Accessible', async () => {
@@ -319,20 +338,16 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
319
338
  await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process2);
320
339
  });
321
340
  await _8_9_1.test.step('Assert First Process Can Be Started From Tasklist', async () => {
322
- await taskPanelPage.clickTasksTab();
323
- const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
324
341
  await taskPanelPage.clickProcessesTab();
325
342
  await taskProcessesPage.startProcess(process1);
326
- const updatedFirstProcessTaskCount = await taskPanelPage.taskCount(process1);
327
- (0, test_1.expect)(updatedFirstProcessTaskCount).toBe(firstProcessTaskCount + 1);
343
+ const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
344
+ (0, test_1.expect)(firstProcessTaskCount).toBe(2);
328
345
  });
329
346
  await _8_9_1.test.step('Assert Second Process Can Be Started From Tasklist', async () => {
330
- await taskPanelPage.clickTasksTab();
331
- const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
332
347
  await taskPanelPage.clickProcessesTab();
333
348
  await taskProcessesPage.startProcess(process2);
334
- const updatedSecondProcessTaskCount = await taskPanelPage.taskCount(process2);
335
- (0, test_1.expect)(updatedSecondProcessTaskCount).toBe(secondProcessTaskCount + 1);
349
+ const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
350
+ (0, test_1.expect)(secondProcessTaskCount).toBe(2);
336
351
  });
337
352
  await _8_9_1.test.step('Navigate to Operate and Assert Both Processes Are Accessible', async () => {
338
353
  await appsPage.clickCamundaApps();
@@ -345,7 +360,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
345
360
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2);
346
361
  });
347
362
  });
348
- (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, browser, loginPage, }, testInfo) => {
363
+ (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) => {
349
364
  _8_9_1.test.slow();
350
365
  const clusterName = clusterNames[testInfo.title];
351
366
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
@@ -385,7 +400,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
385
400
  await (0, sleep_1.sleep)(20000);
386
401
  });
387
402
  await _8_9_1.test.step('Clear cookies and reset session', async () => {
388
- await (0, resetSession_1.resetSession)(browser, page);
403
+ await page.context().clearCookies();
404
+ await page.evaluate(() => {
405
+ localStorage.clear();
406
+ sessionStorage.clear();
407
+ });
408
+ await page.goto('/');
389
409
  await loginPage.loginWithTestUser(testUser);
390
410
  });
391
411
  await _8_9_1.test.step('Navigate to Web Modeler', async () => {
@@ -417,20 +437,16 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
417
437
  await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process2);
418
438
  });
419
439
  await _8_9_1.test.step('Assert First Process Can Be Started From Tasklist', async () => {
420
- await taskPanelPage.clickTasksTab();
421
- const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
422
440
  await taskPanelPage.clickProcessesTab();
423
441
  await taskProcessesPage.startProcess(process1);
424
- const updatedFirstProcessTaskCount = await taskPanelPage.taskCount(process1);
425
- (0, test_1.expect)(updatedFirstProcessTaskCount).toBe(firstProcessTaskCount + 1);
442
+ const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
443
+ (0, test_1.expect)(firstProcessTaskCount).toBe(2);
426
444
  });
427
445
  await _8_9_1.test.step('Assert Second Process Can Be Started From Tasklist', async () => {
428
- await taskPanelPage.clickTasksTab();
429
- const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
430
446
  await taskPanelPage.clickProcessesTab();
431
447
  await taskProcessesPage.startProcess(process2);
432
- const updatedSecondProcessTaskCount = await taskPanelPage.taskCount(process2);
433
- (0, test_1.expect)(updatedSecondProcessTaskCount).toBe(secondProcessTaskCount + 1);
448
+ const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
449
+ (0, test_1.expect)(secondProcessTaskCount).toBe(2);
434
450
  });
435
451
  await _8_9_1.test.step('Navigate to Operate and Assert Both Processes Are Accessible', async () => {
436
452
  await appsPage.clickCamundaApps();