@camunda/e2e-test-suite 0.0.460 → 0.0.462

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.
@@ -8,7 +8,6 @@ declare class OperateHomePage {
8
8
  readonly variableValueInput: Locator;
9
9
  readonly saveVariableButton: Locator;
10
10
  readonly editVariableSpinner: Locator;
11
- readonly processPageHeading: Locator;
12
11
  constructor(page: Page);
13
12
  operateBannerIsVisible(): Promise<void>;
14
13
  clickProcessesTab(): Promise<void>;
@@ -2,8 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OperateHomePage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
- const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
6
- const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
7
5
  class OperateHomePage {
8
6
  page;
9
7
  operateBanner;
@@ -13,7 +11,6 @@ class OperateHomePage {
13
11
  variableValueInput;
14
12
  saveVariableButton;
15
13
  editVariableSpinner;
16
- processPageHeading;
17
14
  constructor(page) {
18
15
  this.page = page;
19
16
  this.operateBanner = page.getByRole('link', { name: 'Camunda logo Operate' });
@@ -28,25 +25,24 @@ class OperateHomePage {
28
25
  .getByTestId('variable-operation-spinner')
29
26
  .locator('circle')
30
27
  .nth(1);
31
- this.processPageHeading = page
32
- .getByTestId('expanded-panel')
33
- .getByRole('heading', { name: 'Process' });
34
28
  }
35
29
  async operateBannerIsVisible() {
36
- await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.operateBanner, {
37
- postAction: async () => {
38
- await this.page.reload();
39
- },
40
- });
30
+ await (0, test_1.expect)(this.operateBanner).toBeVisible({ timeout: 30000 });
41
31
  }
42
32
  async clickProcessesTab() {
43
- await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.processesTab);
44
- await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.processPageHeading, {
45
- preAction: async () => {
46
- await (0, test_1.expect)(this.processesTab).toBeVisible({ timeout: 10000 });
47
- await this.processesTab.click({ timeout: 10000 });
48
- },
49
- });
33
+ const maxRetries = 3;
34
+ for (let retries = 0; retries < maxRetries; retries++) {
35
+ try {
36
+ await (0, test_1.expect)(this.processesTab).toBeVisible({ timeout: 30000 });
37
+ await this.processesTab.click({ timeout: 30000 });
38
+ await (0, test_1.expect)(this.page.locator('label').filter({ hasText: 'Completed' }).first()).toBeVisible();
39
+ return;
40
+ }
41
+ catch (error) {
42
+ console.warn(`Click attempt ${retries + 1} failed: ${error}`);
43
+ }
44
+ }
45
+ throw new Error(`Failed to click the processes tab after ${maxRetries} attempts.`);
50
46
  }
51
47
  async clickEditVariableButton(variableName) {
52
48
  const editVariableButton = 'Edit variable ' + variableName;
@@ -4,7 +4,6 @@ declare class OperateLoginPage {
4
4
  readonly usernameInput: Locator;
5
5
  readonly passwordInput: Locator;
6
6
  readonly loginButton: Locator;
7
- readonly backupLogin: Locator;
8
7
  constructor(page: Page);
9
8
  fillUsername(username: string): Promise<void>;
10
9
  clickUsername(): Promise<void>;
@@ -7,13 +7,11 @@ class OperateLoginPage {
7
7
  usernameInput;
8
8
  passwordInput;
9
9
  loginButton;
10
- backupLogin;
11
10
  constructor(page) {
12
11
  this.page = page;
13
12
  this.usernameInput = page.getByLabel('Username');
14
13
  this.passwordInput = page.getByRole('textbox', { name: 'password' });
15
14
  this.loginButton = page.getByRole('button', { name: 'Login' });
16
- this.backupLogin = page.getByRole('button', { name: 'Log in' });
17
15
  }
18
16
  async fillUsername(username) {
19
17
  await this.usernameInput.fill(username);
@@ -25,22 +23,15 @@ class OperateLoginPage {
25
23
  await this.passwordInput.fill(password);
26
24
  }
27
25
  async clickLoginButton() {
28
- const login = this.loginButton.or(this.backupLogin).first();
29
- await (0, test_1.expect)(login).toBeVisible({ timeout: 60000 });
30
- await login.click({ timeout: 60000 });
26
+ await this.loginButton.click({ timeout: 60000 });
31
27
  }
32
28
  async login(username, password) {
33
- try {
34
- await (0, test_1.expect)(this.usernameInput).toBeVisible();
35
- await (0, test_1.expect)(this.passwordInput).toBeVisible();
36
- await this.clickUsername();
37
- await this.fillUsername(username);
38
- await this.fillPassword(password);
39
- await this.clickLoginButton();
40
- }
41
- catch (error) {
42
- await (0, test_1.expect)(this.page.getByRole('link', { name: 'Camunda logo Operate' })).toBeVisible();
43
- }
29
+ await (0, test_1.expect)(this.usernameInput).toBeVisible({ timeout: 180000 });
30
+ await this.clickUsername();
31
+ await this.fillUsername(username);
32
+ await this.fillPassword(password);
33
+ await (0, test_1.expect)(this.loginButton).toBeVisible({ timeout: 120000 });
34
+ await this.clickLoginButton();
44
35
  }
45
36
  }
46
37
  exports.OperateLoginPage = OperateLoginPage;
@@ -6,15 +6,16 @@ declare class OperateProcessesPage {
6
6
  readonly processCompletedCheckbox: Locator;
7
7
  readonly processRunningInstancesCheckbox: Locator;
8
8
  readonly processIncidentsCheckbox: Locator;
9
- readonly processPageHeading: Locator;
10
9
  readonly noMatchingInstancesMessage: Locator;
11
10
  readonly processFinishedInstancesCheckbox: Locator;
11
+ readonly processNameFilteringPlaceHolder: Locator;
12
12
  constructor(page: Page);
13
13
  clickProcessActiveCheckbox(): Promise<void>;
14
14
  clickProcessCompletedCheckbox(): Promise<void>;
15
15
  clickProcessIncidentsCheckbox(): Promise<void>;
16
16
  clickRunningProcessInstancesCheckbox(): Promise<void>;
17
17
  clickFinishedProcessInstancesCheckbox(): Promise<void>;
18
+ fillProcessNameFilter(processName: string): Promise<void>;
18
19
  clickProcessInstanceLink(processName: string): Promise<void>;
19
20
  }
20
21
  export { OperateProcessesPage };
@@ -10,9 +10,9 @@ class OperateProcessesPage {
10
10
  processCompletedCheckbox;
11
11
  processRunningInstancesCheckbox;
12
12
  processIncidentsCheckbox;
13
- processPageHeading;
14
13
  noMatchingInstancesMessage;
15
14
  processFinishedInstancesCheckbox;
15
+ processNameFilteringPlaceHolder;
16
16
  constructor(page) {
17
17
  this.page = page;
18
18
  this.processResultCount = page.getByTestId('result-count');
@@ -28,25 +28,20 @@ class OperateProcessesPage {
28
28
  this.processIncidentsCheckbox = page
29
29
  .locator('label')
30
30
  .filter({ hasText: 'Incidents' });
31
- this.processPageHeading = page
32
- .getByTestId('expanded-panel')
33
- .getByRole('heading', { name: 'Process' });
34
31
  this.noMatchingInstancesMessage = page.getByText('There are no Instances matching this filter set');
35
32
  this.processFinishedInstancesCheckbox = page
36
33
  .getByTestId('filter-finished-instances')
37
34
  .getByRole('checkbox');
35
+ this.processNameFilteringPlaceHolder = this.page.getByPlaceholder('Search by Process Name');
38
36
  }
39
37
  async clickProcessActiveCheckbox() {
40
38
  await this.processActiveCheckbox.click();
41
39
  }
42
40
  async clickProcessCompletedCheckbox() {
43
41
  await (0, sleep_1.sleep)(5000);
44
- await (0, test_1.expect)(this.processCompletedCheckbox).toBeVisible({
45
- timeout: 30000,
46
- });
47
42
  if (!(await this.processCompletedCheckbox.isChecked({ timeout: 60000 }))) {
48
43
  await this.processCompletedCheckbox.click({ timeout: 120000 });
49
- await (0, sleep_1.sleep)(2000);
44
+ await (0, sleep_1.sleep)(1000);
50
45
  }
51
46
  }
52
47
  async clickProcessIncidentsCheckbox() {
@@ -58,26 +53,33 @@ class OperateProcessesPage {
58
53
  async clickFinishedProcessInstancesCheckbox() {
59
54
  await this.processFinishedInstancesCheckbox.click({ timeout: 90000 });
60
55
  }
56
+ async fillProcessNameFilter(processName) {
57
+ await this.processNameFilteringPlaceHolder.click({ timeout: 30000 });
58
+ await this.processNameFilteringPlaceHolder.fill(processName);
59
+ await this.processNameFilteringPlaceHolder.press('Enter');
60
+ }
61
61
  async clickProcessInstanceLink(processName) {
62
62
  let retryCount = 0;
63
- const maxRetries = 3;
63
+ const maxRetries = 5;
64
64
  while (retryCount < maxRetries) {
65
65
  try {
66
- await this.page.reload();
67
- await this.page
66
+ const link = this.page
68
67
  .getByRole('row')
69
68
  .filter({ hasText: new RegExp(`^Select row${processName}\\d+.*$`) })
70
69
  .first()
71
- .getByRole('link')
72
- .click({ timeout: 30000 });
73
- return; // Exit the function if the click is successful
70
+ .getByRole('link');
71
+ await (0, test_1.expect)(link).toBeVisible({ timeout: 20000 });
72
+ await link.click({ timeout: 30000 });
73
+ return;
74
74
  }
75
75
  catch (error) {
76
- // If process isn't found, reload the page and try again
77
76
  retryCount++;
78
- console.log(`Attempt ${retryCount} failed. Retrying...`);
77
+ console.log(`Attempt ${retryCount} failed. Retrying...` + error);
79
78
  await this.page.reload();
80
79
  await (0, sleep_1.sleep)(10000);
80
+ if (retryCount >= 3) {
81
+ await this.fillProcessNameFilter(processName);
82
+ }
81
83
  }
82
84
  }
83
85
  throw new Error(`Failed to click on process instance link after ${maxRetries} attempts.`);
@@ -4,7 +4,6 @@ declare class TaskListLoginPage {
4
4
  readonly usernameInput: Locator;
5
5
  readonly passwordInput: Locator;
6
6
  readonly loginButton: Locator;
7
- readonly backupLogin: Locator;
8
7
  constructor(page: Page);
9
8
  fillUsername(username: string): Promise<void>;
10
9
  clickUsername(): Promise<void>;
@@ -7,13 +7,11 @@ class TaskListLoginPage {
7
7
  usernameInput;
8
8
  passwordInput;
9
9
  loginButton;
10
- backupLogin;
11
10
  constructor(page) {
12
11
  this.page = page;
13
12
  this.usernameInput = page.getByLabel('Username');
14
13
  this.passwordInput = page.getByRole('textbox', { name: 'password' });
15
14
  this.loginButton = page.getByRole('button', { name: 'Login' });
16
- this.backupLogin = page.getByRole('button', { name: 'Log in' });
17
15
  }
18
16
  async fillUsername(username) {
19
17
  await this.usernameInput.fill(username);
@@ -25,22 +23,15 @@ class TaskListLoginPage {
25
23
  await this.passwordInput.fill(password);
26
24
  }
27
25
  async clickLoginButton() {
28
- const login = this.loginButton.or(this.backupLogin).first();
29
- await (0, test_1.expect)(login).toBeVisible({ timeout: 60000 });
30
- await login.click({ timeout: 60000 });
26
+ await this.loginButton.click({ timeout: 60000 });
31
27
  }
32
28
  async login(username, password) {
33
- try {
34
- await (0, test_1.expect)(this.usernameInput).toBeVisible();
35
- await (0, test_1.expect)(this.passwordInput).toBeVisible();
36
- await this.clickUsername();
37
- await this.fillUsername(username);
38
- await this.fillPassword(password);
39
- await this.clickLoginButton();
40
- }
41
- catch (error) {
42
- await (0, test_1.expect)(this.page.getByRole('link', { name: 'Camunda logo Tasklist' })).toBeVisible();
43
- }
29
+ await (0, test_1.expect)(this.usernameInput).toBeVisible({ timeout: 180000 });
30
+ await this.clickUsername();
31
+ await this.fillUsername(username);
32
+ await this.fillPassword(password);
33
+ await (0, test_1.expect)(this.loginButton).toBeVisible({ timeout: 120000 });
34
+ await this.clickLoginButton();
44
35
  }
45
36
  }
46
37
  exports.TaskListLoginPage = TaskListLoginPage;
@@ -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 () => {