@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.
@@ -17,11 +17,19 @@ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLoc
17
17
  const users_1 = require("../../utils/users");
18
18
  const sleep_1 = require("../../utils/sleep");
19
19
  const testUser = (0, users_1.getTestUser)('thirteenthUser');
20
+ const CLUSTER_NAME = 'Test Cluster';
21
+ const TIMEOUT = {
22
+ short: 15000,
23
+ medium: 30000,
24
+ navigation: 60000,
25
+ processActive: 300000,
26
+ processComplete: 120000,
27
+ optimizeImport: 120000,
28
+ };
29
+ // Use fixed names for upgrade testing validation, random names for regular testing
30
+ const useFixedNames = process.env.UPGRADE_BASELINE === 'true';
20
31
  _8_9_1.test.describe.configure({ mode: 'parallel' });
21
32
  _8_9_1.test.describe('Smoke Tests', () => {
22
- const clusterName = 'Test Cluster';
23
- // Use fixed names for upgrade testing validation, random names for regular testing
24
- const useFixedNames = process.env.UPGRADE_BASELINE === 'true';
25
33
  _8_9_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
26
34
  await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
27
35
  });
@@ -30,6 +38,7 @@ _8_9_1.test.describe('Smoke Tests', () => {
30
38
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
31
39
  });
32
40
  (0, _8_9_1.test)('Most Common Flow User Flow With All Apps', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, formJsPage, }) => {
41
+ _8_9_1.test.slow();
33
42
  const randomString = useFixedNames
34
43
  ? 'UpgradeTest'
35
44
  : await (0, _setup_1.generateRandomStringAsync)(3);
@@ -39,36 +48,39 @@ _8_9_1.test.describe('Smoke Tests', () => {
39
48
  const reportName = useFixedNames
40
49
  ? 'UpgradeTestReport'
41
50
  : await (0, _setup_1.generateRandomStringAsync)(5);
51
+ let appTab;
42
52
  await _8_9_1.test.step('Navigate to Web Modeler', async () => {
43
53
  await (0, test_1.expect)(homePage.camundaComponentsButton).toBeVisible({
44
- timeout: 30000,
54
+ timeout: TIMEOUT.medium,
45
55
  });
46
56
  await appsPage.clickCamundaApps();
47
57
  await appsPage.clickModeler();
48
58
  await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
49
- timeout: 60000,
59
+ timeout: TIMEOUT.navigation,
50
60
  });
51
61
  });
52
- await _8_9_1.test.step('Create Form To Be Linked For Zeebe User Task', async () => {
62
+ await _8_9_1.test.step('Create form to be linked for Zeebe user task', async () => {
53
63
  await modelerHomePage.clickCrossComponentProjectFolder();
54
64
  await modelerHomePage.clickDiagramTypeDropdown();
55
65
  await modelerHomePage.clickFormOption();
56
66
  await modelerHomePage.enterFormName(formName);
57
67
  await modelerHomePage.assertFormBreadcrumbVisible(formName);
58
- await formJsPage.deployForm(clusterName);
68
+ await formJsPage.deployForm(CLUSTER_NAME);
69
+ // Wait for the form to propagate to the cluster before it can be embedded
59
70
  await (0, sleep_1.sleep)(5000);
60
71
  });
61
- await _8_9_1.test.step('Add A BPMN Template To The Project', async () => {
72
+ await _8_9_1.test.step('Add a BPMN template to the project', async () => {
62
73
  await modelerHomePage.clickProjectBreadcrumb();
63
74
  await modelerHomePage.clickDiagramTypeDropdown();
64
75
  await modelerHomePage.clickBpmnTemplateOption();
65
76
  });
66
- await _8_9_1.test.step('Create BPMN Diagram with Two Zeebe User Tasks and Start Process Instance', async () => {
77
+ await _8_9_1.test.step('Create BPMN diagram with two Zeebe user tasks', async () => {
67
78
  await (0, test_1.expect)(modelerCreatePage.generalPanel).toBeVisible({
68
- timeout: 60000,
79
+ timeout: TIMEOUT.navigation,
69
80
  });
70
81
  await modelerCreatePage.enterDiagramName(processName);
71
82
  await modelerCreatePage.assertDiagramNameSet(processName);
83
+ // Wait for the diagram name change to auto-save before interacting with the canvas
72
84
  await (0, sleep_1.sleep)(10000);
73
85
  await modelerCreatePage.clickCanvas();
74
86
  await modelerCreatePage.clickGeneralPropertiesPanel();
@@ -85,76 +97,89 @@ _8_9_1.test.describe('Smoke Tests', () => {
85
97
  await modelerCreatePage.clickForm(formName);
86
98
  await modelerCreatePage.clickEmbedButton();
87
99
  await modelerCreatePage.assertFormEmbedded();
88
- await modelerCreatePage.runProcessInstance(clusterName);
89
100
  });
90
- await _8_9_1.test.step('View Process Instance in Operate, complete User Task in Tasklist & assert process complete in Operate and Assert Process has been successfully imported in Optimize', async () => {
101
+ await _8_9_1.test.step('Deploy, start process instance and verify it is active in Operate', async () => {
102
+ await modelerCreatePage.runProcessInstance(CLUSTER_NAME);
91
103
  await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible({
92
- timeout: 60000,
104
+ timeout: TIMEOUT.navigation,
93
105
  });
94
106
  await modelerCreatePage.clickViewProcessInstanceLink();
95
- const operateTab = await page.waitForEvent('popup', { timeout: 30000 });
96
- const operateTabHomePage = new OperateHomePage_1.OperateHomePage(operateTab);
97
- const operateTabProcessesPage = new OperateProcessesPage_1.OperateProcessesPage(operateTab);
98
- const operateTabProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(operateTab);
99
- const operateTabAppsPage = new AppsPage_1.AppsPage(operateTab);
100
- const operateTabTaskPanelPage = new TaskPanelPage_1.TaskPanelPage(operateTab);
101
- const operateTabTaskDetailsPage = new TaskDetailsPage_1.TaskDetailsPage(operateTab);
102
- await (0, test_1.expect)(operateTabProcessInstancePage.activeIcon).toBeVisible({
103
- timeout: 300000,
107
+ appTab = await page.waitForEvent('popup', { timeout: TIMEOUT.navigation });
108
+ const appTabProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(appTab);
109
+ await (0, test_1.expect)(appTabProcessInstancePage.activeIcon).toBeVisible({
110
+ timeout: TIMEOUT.processActive,
104
111
  });
105
- await operateTabProcessInstancePage.closePopOverIfVisible();
106
- await operateTabAppsPage.clickCamundaApps();
107
- await operateTabAppsPage.clickTasklist(clusterName);
108
- await (0, UtilitiesPage_1.completeTaskWithRetry)(operateTabTaskPanelPage, operateTabTaskDetailsPage, `${userTaskName}1`, 'Medium');
109
- await (0, UtilitiesPage_1.completeTaskWithRetry)(operateTabTaskPanelPage, operateTabTaskDetailsPage, `${userTaskName}2`, 'Medium');
110
- await operateTabTaskPanelPage.filterBy('Completed');
111
- await operateTabTaskPanelPage.openTask(`${userTaskName}1`);
112
- await (0, test_1.expect)(operateTabTaskDetailsPage.detailsInfo.getByText(`${userTaskName}1`)).toBeVisible({ timeout: 30000 });
113
- await operateTabTaskPanelPage.openTask(`${userTaskName}2`);
114
- await (0, test_1.expect)(operateTabTaskDetailsPage.detailsInfo.getByText(`${userTaskName}2`)).toBeVisible({ timeout: 30000 });
115
- await operateTabAppsPage.clickCamundaApps();
116
- await operateTabAppsPage.clickOperate(clusterName);
117
- await operateTabHomePage.clickProcessesTab();
118
- await (0, test_1.expect)(operateTabProcessesPage.processCompletedCheckbox).toBeVisible({ timeout: 15000 });
119
- await operateTabProcessesPage.clickProcessCompletedCheckbox();
120
- await operateTabProcessesPage.clickProcessInstanceLink(processName);
121
- await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateTabProcessInstancePage, operateTabProcessInstancePage.completedIcon, 'completed icon in Operate', 60000);
122
- await operateTabAppsPage.clickCamundaApps();
123
- await operateTabAppsPage.clickOptimize(clusterName);
124
- const optimizeTabOptimizeCollectionsPage = new OptimizeCollectionsPage_1.OptimizeCollectionsPage(operateTab);
125
- const optimizeTabOptimizeReportPage = new OptimizeReportPage_1.OptimizeReportPage(operateTab);
126
- const optimizeTabOptimizeHomePage = new OptimizeHomePage_1.OptimizeHomePage(operateTab);
127
- await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateTab, operateTab.getByRole('link', { name: processName }), `process ${processName} in Optimize`, 60000);
128
- await optimizeTabOptimizeHomePage.clickCollectionsLink();
129
- await optimizeTabOptimizeCollectionsPage.clickCreateNewButtonWithRetry();
130
- await optimizeTabOptimizeCollectionsPage.clickReportOption();
131
- await optimizeTabOptimizeReportPage.clickProcessSelectionButton();
132
- await optimizeTabOptimizeReportPage.clickUserTaskProcess(processName);
133
- await (0, test_1.expect)(optimizeTabOptimizeReportPage.versionSelection).toBeVisible({
134
- timeout: 15000,
112
+ await appTabProcessInstancePage.closePopOverIfVisible();
113
+ });
114
+ await _8_9_1.test.step('Navigate to Tasklist and complete both user tasks', async () => {
115
+ const appTabAppsPage = new AppsPage_1.AppsPage(appTab);
116
+ const appTabTaskPanelPage = new TaskPanelPage_1.TaskPanelPage(appTab);
117
+ const appTabTaskDetailsPage = new TaskDetailsPage_1.TaskDetailsPage(appTab);
118
+ await appTabAppsPage.clickCamundaApps();
119
+ await appTabAppsPage.clickTasklist(CLUSTER_NAME);
120
+ await (0, UtilitiesPage_1.completeTaskWithRetry)(appTabTaskPanelPage, appTabTaskDetailsPage, `${userTaskName}1`, 'Medium');
121
+ await (0, UtilitiesPage_1.completeTaskWithRetry)(appTabTaskPanelPage, appTabTaskDetailsPage, `${userTaskName}2`, 'Medium');
122
+ await appTabTaskPanelPage.filterBy('Completed');
123
+ await appTabTaskPanelPage.openTask(`${userTaskName}1`);
124
+ await (0, test_1.expect)(appTabTaskDetailsPage.detailsInfo.getByText(`${userTaskName}1`)).toBeVisible({ timeout: TIMEOUT.medium });
125
+ await appTabTaskPanelPage.openTask(`${userTaskName}2`);
126
+ await (0, test_1.expect)(appTabTaskDetailsPage.detailsInfo.getByText(`${userTaskName}2`)).toBeVisible({ timeout: TIMEOUT.medium });
127
+ });
128
+ await _8_9_1.test.step('Assert process completion in Operate', async () => {
129
+ const appTabAppsPage = new AppsPage_1.AppsPage(appTab);
130
+ const appTabHomePage = new OperateHomePage_1.OperateHomePage(appTab);
131
+ const appTabProcessesPage = new OperateProcessesPage_1.OperateProcessesPage(appTab);
132
+ const appTabProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(appTab);
133
+ await appTabAppsPage.clickCamundaApps();
134
+ await appTabAppsPage.clickOperate(CLUSTER_NAME);
135
+ await appTabHomePage.clickProcessesTab();
136
+ await (0, test_1.expect)(appTabProcessesPage.processCompletedCheckbox).toBeVisible({
137
+ timeout: TIMEOUT.short,
135
138
  });
136
- await optimizeTabOptimizeReportPage.clickVersionSelection();
137
- await optimizeTabOptimizeReportPage.clickAlwaysDisplayLatestSelection();
138
- await optimizeTabOptimizeReportPage.clickBlankReportButton();
139
- await optimizeTabOptimizeReportPage.clickCreateReportLink();
140
- await optimizeTabOptimizeReportPage.clickSelectDropdown();
141
- await optimizeTabOptimizeReportPage.clickUserTaskOption();
142
- await optimizeTabOptimizeReportPage.clickHeatMapButton();
143
- await (0, test_1.expect)(optimizeTabOptimizeReportPage.tableOption).toBeVisible({
144
- timeout: 15000,
139
+ await appTabProcessesPage.clickProcessCompletedCheckbox();
140
+ await appTabProcessesPage.clickProcessInstanceLink(processName);
141
+ await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(appTabProcessInstancePage, appTabProcessInstancePage.completedIcon, 'completed icon in Operate', TIMEOUT.processComplete);
142
+ });
143
+ await _8_9_1.test.step('Assert process imported in Optimize and create user task report', async () => {
144
+ const appTabAppsPage = new AppsPage_1.AppsPage(appTab);
145
+ const optimizeHomePage = new OptimizeHomePage_1.OptimizeHomePage(appTab);
146
+ const optimizeCollectionsPage = new OptimizeCollectionsPage_1.OptimizeCollectionsPage(appTab);
147
+ const optimizeReportPage = new OptimizeReportPage_1.OptimizeReportPage(appTab);
148
+ await appTabAppsPage.clickCamundaApps();
149
+ await appTabAppsPage.clickOptimize(CLUSTER_NAME);
150
+ await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(appTab, appTab.getByRole('link', { name: processName }), `process ${processName} in Optimize`, TIMEOUT.optimizeImport);
151
+ await optimizeHomePage.clickCollectionsLink();
152
+ await optimizeCollectionsPage.clickCreateNewButtonWithRetry();
153
+ await optimizeCollectionsPage.clickReportOption();
154
+ await optimizeReportPage.clickProcessSelectionButton();
155
+ await optimizeReportPage.clickUserTaskProcess(processName);
156
+ await (0, test_1.expect)(optimizeReportPage.versionSelection).toBeVisible({
157
+ timeout: TIMEOUT.short,
145
158
  });
146
- await optimizeTabOptimizeReportPage.clickTableOption();
147
- await optimizeTabOptimizeReportPage.clickReportName();
148
- await optimizeTabOptimizeReportPage.clearReportName();
149
- await optimizeTabOptimizeReportPage.fillReportName(reportName);
150
- await optimizeTabOptimizeReportPage.clickSaveButton();
151
- await optimizeTabOptimizeHomePage.clickCollectionsLink();
152
- await (0, test_1.expect)(operateTab.getByText(reportName)).toBeVisible({
153
- timeout: 30000,
159
+ await optimizeReportPage.clickVersionSelection();
160
+ await optimizeReportPage.clickAlwaysDisplayLatestSelection();
161
+ await optimizeReportPage.clickBlankReportButton();
162
+ await optimizeReportPage.clickCreateReportLink();
163
+ await optimizeReportPage.clickSelectDropdown();
164
+ await optimizeReportPage.clickUserTaskOption();
165
+ await optimizeReportPage.clickHeatMapButton();
166
+ await (0, test_1.expect)(optimizeReportPage.tableOption).toBeVisible({
167
+ timeout: TIMEOUT.short,
168
+ });
169
+ await optimizeReportPage.clickTableOption();
170
+ await optimizeReportPage.clickReportName();
171
+ await optimizeReportPage.clearReportName();
172
+ await optimizeReportPage.fillReportName(reportName);
173
+ await optimizeReportPage.clickSaveButton();
174
+ await optimizeHomePage.clickCollectionsLink();
175
+ await (0, test_1.expect)(appTab.getByText(reportName)).toBeVisible({
176
+ timeout: TIMEOUT.medium,
177
+ });
178
+ await optimizeCollectionsPage.clickMostRecentProcessReport(reportName);
179
+ await optimizeReportPage.waitUntilLocatorIsVisible(optimizeReportPage.oneUserTaskInstance.first(), appTab);
180
+ await (0, test_1.expect)(optimizeReportPage.oneUserTaskInstance).toHaveCount(2, {
181
+ timeout: TIMEOUT.navigation,
154
182
  });
155
- await optimizeTabOptimizeCollectionsPage.clickMostRecentProcessReport(reportName);
156
- await optimizeTabOptimizeReportPage.waitUntilLocatorIsVisible(optimizeTabOptimizeReportPage.oneUserTaskInstance.first(), operateTab);
157
- await (0, test_1.expect)(optimizeTabOptimizeReportPage.oneUserTaskInstance).toHaveCount(2, { timeout: 60000 });
158
183
  });
159
184
  });
160
185
  (0, _8_9_1.test)('Most Common REST Connector User Flow', async ({ page, modelerHomePage, appsPage, modelerCreatePage, connectorSettingsPage, }) => {
@@ -167,40 +192,38 @@ _8_9_1.test.describe('Smoke Tests', () => {
167
192
  await appsPage.clickCamundaApps();
168
193
  await appsPage.clickModeler();
169
194
  await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
170
- timeout: 60000,
195
+ timeout: TIMEOUT.navigation,
171
196
  });
172
197
  });
173
- await _8_9_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
198
+ await _8_9_1.test.step('Open Cross Component Test Project and create a BPMN diagram template', async () => {
174
199
  await modelerHomePage.clickCrossComponentProjectFolder();
175
200
  await modelerHomePage.clickDiagramTypeDropdown();
176
201
  await modelerHomePage.clickBpmnTemplateOption();
177
202
  });
178
- await _8_9_1.test.step('Create BPMN Diagram with REST Connector with Basic Auth and Start Process Instance', async () => {
203
+ await _8_9_1.test.step('Create BPMN diagram with REST Connector using Basic Auth and start process', async () => {
179
204
  await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/basic-auth-test', 'basic', '{message:response.body.message}', 'result', { username: 'username', password: 'password' });
180
- await modelerCreatePage.runProcessInstance(clusterName);
205
+ await modelerCreatePage.runProcessInstance(CLUSTER_NAME);
181
206
  });
182
- await _8_9_1.test.step('View Process Instance in Operate, assert it completes and assert result expression', async () => {
207
+ await _8_9_1.test.step('Assert process completes in Operate and verify connector result', async () => {
183
208
  await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible({
184
- timeout: 60000,
209
+ timeout: TIMEOUT.navigation,
185
210
  });
186
211
  await modelerCreatePage.clickViewProcessInstanceLink();
187
- const operateTab = await page.waitForEvent('popup', { timeout: 30000 });
188
- const operateTabHomePage = new OperateHomePage_1.OperateHomePage(operateTab);
189
- const operateTabProcessesPage = new OperateProcessesPage_1.OperateProcessesPage(operateTab);
190
- const operateTabProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(operateTab);
191
- await operateTabHomePage.clickProcessesTab();
192
- await operateTabProcessesPage.clickProcessCompletedCheckbox();
193
- await operateTabProcessesPage.clickProcessInstanceLink(processName);
194
- await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateTabProcessInstancePage.completedIcon, { totalTimeout: 60000, maxRetries: 5 });
195
- await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateTabProcessInstancePage.variablesList, { totalTimeout: 60000, maxRetries: 5 });
196
- await (0, test_1.expect)(operateTabProcessInstancePage.connectorResultVariableName('message')).toBeVisible({
197
- timeout: 15000,
212
+ const operateTab = await page.waitForEvent('popup', {
213
+ timeout: TIMEOUT.navigation,
198
214
  });
199
- await (0, test_1.expect)(operateTabProcessInstancePage
215
+ const operateHomePage = new OperateHomePage_1.OperateHomePage(operateTab);
216
+ const operateProcessesPage = new OperateProcessesPage_1.OperateProcessesPage(operateTab);
217
+ const operateProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(operateTab);
218
+ await operateHomePage.clickProcessesTab();
219
+ await operateProcessesPage.clickProcessCompletedCheckbox();
220
+ await operateProcessesPage.clickProcessInstanceLink(processName);
221
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateProcessInstancePage.completedIcon, { totalTimeout: TIMEOUT.processComplete, maxRetries: 5 });
222
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateProcessInstancePage.variablesList, { totalTimeout: TIMEOUT.navigation, maxRetries: 5 });
223
+ await (0, test_1.expect)(operateProcessInstancePage.connectorResultVariableName('message')).toBeVisible({ timeout: TIMEOUT.short });
224
+ await (0, test_1.expect)(operateProcessInstancePage
200
225
  .connectorResultVariableName('message')
201
- .getByText('"Message from Mock!"')).toBeVisible({
202
- timeout: 15000,
203
- });
226
+ .getByText('"Message from Mock!"')).toBeVisible({ timeout: TIMEOUT.short });
204
227
  });
205
228
  });
206
229
  });
@@ -5,8 +5,8 @@ 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 expectTextWithRetry_1 = require("../../utils/assertionHelpers/expectTextWithRetry");
9
+ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
10
10
  const LoginPage_1 = require("../../pages/8.9/LoginPage");
11
11
  const users_1 = require("../../utils/users");
12
12
  const mainUser = (0, users_1.getTestUser)('twelfthUser');
@@ -19,7 +19,7 @@ _8_9_1.test.describe.parallel('UTR Enabled User Flows Test @tasklistV1', () => {
19
19
  await (0, _setup_1.captureScreenshot)(page, testInfo);
20
20
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
21
21
  });
22
- (0, _8_9_1.test)('User Task Restrictions Enabled Flow - Candidate User', async ({ page, modelerHomePage, appsPage, modelerCreatePage, browser, taskPanelPage, }) => {
22
+ (0, _8_9_1.test)('User Task Restrictions Enabled Flow - Candidate User', async ({ page, modelerHomePage, appsPage, modelerCreatePage, taskPanelPage, }) => {
23
23
  _8_9_1.test.slow();
24
24
  const randomName = await (0, _setup_1.generateRandomStringAsync)(3);
25
25
  const processName = 'User_Task_Process_Candidate_User' + randomName;
@@ -63,11 +63,22 @@ _8_9_1.test.describe.parallel('UTR Enabled User Flows Test @tasklistV1', () => {
63
63
  timeout: 60000,
64
64
  });
65
65
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName1);
66
- await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName2);
66
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, page.getByText(taskName2).first().or(page.getByText(taskName2).last()), {
67
+ totalTimeout: 120000,
68
+ maxRetries: 5,
69
+ postAction: async () => {
70
+ await page.reload();
71
+ },
72
+ });
67
73
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName3, { shouldBeVisible: false });
68
74
  });
69
75
  await _8_9_1.test.step('Clear cookies and reset session', async () => {
70
- await (0, resetSession_1.resetSession)(browser, page);
76
+ await page.context().clearCookies();
77
+ await page.evaluate(() => {
78
+ localStorage.clear();
79
+ sessionStorage.clear();
80
+ });
81
+ await page.goto('/');
71
82
  });
72
83
  await _8_9_1.test.step('Login with Test User and Check Tasks in Tasklist ', async () => {
73
84
  const loginPage = new LoginPage_1.LoginPage(page);
@@ -82,7 +93,7 @@ _8_9_1.test.describe.parallel('UTR Enabled User Flows Test @tasklistV1', () => {
82
93
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName3);
83
94
  });
84
95
  });
85
- (0, _8_9_1.test)('User Task Restrictions Enabled Flow - Candidate Group', async ({ page, modelerHomePage, appsPage, modelerCreatePage, browser, taskPanelPage, ocIdentityGroupsPage, ocIdentityHomePage, }) => {
96
+ (0, _8_9_1.test)('User Task Restrictions Enabled Flow - Candidate Group', async ({ page, modelerHomePage, appsPage, modelerCreatePage, taskPanelPage, ocIdentityGroupsPage, ocIdentityHomePage, }) => {
86
97
  _8_9_1.test.slow();
87
98
  const randomName = await (0, _setup_1.generateRandomStringAsync)(3);
88
99
  const processName = 'User_Task_Process_Candidate_Group' + randomName;
@@ -144,14 +155,22 @@ _8_9_1.test.describe.parallel('UTR Enabled User Flows Test @tasklistV1', () => {
144
155
  await _8_9_1.test.step('View User Tasks in Tasklist', async () => {
145
156
  await appsPage.clickCamundaApps();
146
157
  await appsPage.clickTasklist(clusterName);
147
- await (0, test_1.expect)(taskPanelPage.taskListPageBanner).toBeVisible({
148
- timeout: 60000,
158
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, taskPanelPage.taskListPageBanner, {
159
+ visibilityTimeout: 20000,
160
+ postAction: async () => {
161
+ await page.reload();
162
+ },
149
163
  });
150
164
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName1);
151
165
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName2, { shouldBeVisible: false });
152
166
  });
153
167
  await _8_9_1.test.step('Clear cookies and reset session', async () => {
154
- await (0, resetSession_1.resetSession)(browser, page);
168
+ await page.context().clearCookies();
169
+ await page.evaluate(() => {
170
+ localStorage.clear();
171
+ sessionStorage.clear();
172
+ });
173
+ await page.goto('/');
155
174
  });
156
175
  await _8_9_1.test.step('Login with Test User and Check Tasks in Tasklist ', async () => {
157
176
  const loginPage = new LoginPage_1.LoginPage(page);
@@ -162,10 +181,21 @@ _8_9_1.test.describe.parallel('UTR Enabled User Flows Test @tasklistV1', () => {
162
181
  timeout: 120000,
163
182
  });
164
183
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName1);
165
- await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName2);
184
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, page.getByText(taskName2).first().or(page.getByText(taskName2).last()), {
185
+ totalTimeout: 120000,
186
+ maxRetries: 5,
187
+ postAction: async () => {
188
+ await page.reload();
189
+ },
190
+ });
166
191
  });
167
192
  await _8_9_1.test.step('Clear cookies and reset session', async () => {
168
- await (0, resetSession_1.resetSession)(browser, page);
193
+ await page.context().clearCookies();
194
+ await page.evaluate(() => {
195
+ localStorage.clear();
196
+ sessionStorage.clear();
197
+ });
198
+ await page.goto('/');
169
199
  });
170
200
  await _8_9_1.test.step('Login with Second Test User and Check Tasks in Tasklist ', async () => {
171
201
  const loginPage = new LoginPage_1.LoginPage(page);
@@ -176,7 +206,13 @@ _8_9_1.test.describe.parallel('UTR Enabled User Flows Test @tasklistV1', () => {
176
206
  timeout: 120000,
177
207
  });
178
208
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName1, { shouldBeVisible: false });
179
- await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName2);
209
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, page.getByText(taskName2).first().or(page.getByText(taskName2).last()), {
210
+ totalTimeout: 120000,
211
+ maxRetries: 5,
212
+ postAction: async () => {
213
+ await page.reload();
214
+ },
215
+ });
180
216
  });
181
217
  });
182
218
  });