@camunda/e2e-test-suite 0.0.722 → 0.0.723

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.
@@ -91,7 +91,7 @@ class ModelerHomePage {
91
91
  await this.createNewProjectButton.click();
92
92
  }
93
93
  async enterNewProjectName(name) {
94
- await (0, sleep_1.sleep)(1000);
94
+ await (0, test_1.expect)(this.projectNameInput).toBeVisible({ timeout: 10000 });
95
95
  await this.projectNameInput.click({ timeout: 60000 });
96
96
  await this.projectNameInput.fill(name);
97
97
  await this.projectNameInput.press('Enter');
@@ -173,7 +173,7 @@ class ModelerHomePage {
173
173
  if (attempts < maxAttempts) {
174
174
  console.log(`Attempt ${attempts} failed. Reloading page and retrying...`);
175
175
  await this.page.reload();
176
- await (0, sleep_1.sleep)(10000);
176
+ await this.page.waitForLoadState('networkidle');
177
177
  }
178
178
  else {
179
179
  throw new Error('Failed to click crossComponentProjectFolder after 3 attempts.');
@@ -213,7 +213,7 @@ class ModelerHomePage {
213
213
  await this.formTemplateOption.click();
214
214
  }
215
215
  async enterFormName(name) {
216
- await (0, sleep_1.sleep)(1000);
216
+ await (0, test_1.expect)(this.formNameInput).toBeVisible({ timeout: 10000 });
217
217
  await this.formNameInput.click({ timeout: 60000 });
218
218
  await this.formNameInput.fill(name);
219
219
  await this.formNameInput.press('Enter');
@@ -94,7 +94,7 @@ class OperateProcessInstancePage {
94
94
  retryCount++;
95
95
  console.log(`Attempt ${retryCount} failed. Retrying...`);
96
96
  await this.page.reload();
97
- await (0, sleep_1.sleep)(10000);
97
+ await this.page.waitForLoadState('domcontentloaded');
98
98
  }
99
99
  }
100
100
  throw new Error(`Active icon not visible after ${maxRetries} attempts.`);
@@ -114,7 +114,7 @@ class OperateProcessInstancePage {
114
114
  retryCount++;
115
115
  console.log(`Attempt ${retryCount} failed. Retrying...`);
116
116
  await this.page.reload();
117
- await (0, sleep_1.sleep)(10000);
117
+ await this.page.waitForLoadState('domcontentloaded');
118
118
  }
119
119
  }
120
120
  throw new Error(`Active icon not visible after ${maxRetries} attempts.`);
@@ -134,7 +134,7 @@ class OperateProcessInstancePage {
134
134
  retryCount++;
135
135
  console.log(`Attempt ${retryCount} failed. Retrying...`);
136
136
  await this.page.reload();
137
- await (0, sleep_1.sleep)(10000);
137
+ await this.page.waitForLoadState('domcontentloaded');
138
138
  }
139
139
  }
140
140
  throw new Error(`Active icon not visible after ${maxRetries} attempts.`);
@@ -154,7 +154,7 @@ class OperateProcessInstancePage {
154
154
  retryCount++;
155
155
  console.log(`Attempt ${retryCount} failed. Retrying...`);
156
156
  await this.page.reload();
157
- await (0, sleep_1.sleep)(10000);
157
+ await this.page.waitForLoadState('domcontentloaded');
158
158
  }
159
159
  }
160
160
  throw new Error(`Active icon visible after ${maxRetries} attempts.`);
@@ -189,7 +189,7 @@ class OperateProcessInstancePage {
189
189
  if (attempt < maxRetries - 1) {
190
190
  console.warn(`Process complete status attempt ${attempt + 1} failed. Retrying...`);
191
191
  await this.page.reload();
192
- await (0, sleep_1.sleep)(5000);
192
+ await this.page.waitForLoadState('domcontentloaded');
193
193
  }
194
194
  else {
195
195
  throw new Error(`Assertion failed after ${maxRetries} attempts`);
@@ -207,7 +207,7 @@ class OperateProcessInstancePage {
207
207
  catch (error) {
208
208
  console.log(`Failed to assert variable ${variableName}` + error);
209
209
  await this.page.reload();
210
- await (0, sleep_1.sleep)(10000);
210
+ await this.page.waitForLoadState('domcontentloaded');
211
211
  }
212
212
  }
213
213
  throw new Error(`Failed to assert variable ${variableName} after ${maxRetries} attempts.`);
@@ -254,10 +254,11 @@ async function assertLocatorVisibleWithPaginated(page, locator, text) {
254
254
  }
255
255
  }
256
256
  exports.assertLocatorVisibleWithPaginated = assertLocatorVisibleWithPaginated;
257
- async function assertLocatorVisibleWithRetry(page, locator, text, timeout = 120000, notVisible, maxRetries = 3, clickLocator) {
257
+ async function assertLocatorVisibleWithRetry(page, locator, text, timeout = 30000, notVisible, maxRetries = 3, clickLocator) {
258
258
  for (let attempt = 0; attempt < maxRetries; attempt++) {
259
259
  try {
260
260
  await page.reload();
261
+ await page.waitForLoadState('domcontentloaded');
261
262
  if (clickLocator) {
262
263
  await (0, test_1.expect)(clickLocator).toBeVisible({
263
264
  timeout: 30000,
@@ -265,7 +266,6 @@ async function assertLocatorVisibleWithRetry(page, locator, text, timeout = 1200
265
266
  await clickLocator.click();
266
267
  }
267
268
  if (notVisible == true) {
268
- await (0, sleep_1.sleep)(10000);
269
269
  await (0, test_1.expect)(locator.first()).not.toBeVisible({
270
270
  timeout: timeout,
271
271
  });
@@ -288,12 +288,12 @@ async function assertLocatorVisibleWithRetry(page, locator, text, timeout = 1200
288
288
  }
289
289
  }
290
290
  exports.assertLocatorVisibleWithRetry = assertLocatorVisibleWithRetry;
291
- async function assertPageTextWithRetry(page, text, notVisible, timeout = 120000, maxRetries = 3) {
291
+ async function assertPageTextWithRetry(page, text, notVisible, timeout = 30000, maxRetries = 3) {
292
292
  for (let attempt = 0; attempt < maxRetries; attempt++) {
293
293
  try {
294
294
  await page.reload();
295
+ await page.waitForLoadState('domcontentloaded');
295
296
  if (notVisible == true) {
296
- await (0, sleep_1.sleep)(10000);
297
297
  await (0, test_1.expect)(page.getByText(text, { exact: true }).first()).not.toBeVisible({
298
298
  timeout: timeout,
299
299
  });
@@ -51,7 +51,7 @@ if (process.env.IS_OPTIMIZE !== 'false') {
51
51
  await SM_8_9_1.test.step('Create BPMN Diagram with User Task and Start Process Instance', async () => {
52
52
  await modelerCreatePage.modelJobWorkerDiagram(processName);
53
53
  await modelerCreatePage.runProcessInstance();
54
- await (0, sleep_1.sleep)(60000);
54
+ await (0, sleep_1.sleep)(10000);
55
55
  });
56
56
  await SM_8_9_1.test.step('View Process Instance in Operate and Assert Process has been successfully imported in Optimize', async () => {
57
57
  await navigationPage.goToOperate();
@@ -60,7 +60,7 @@ if (process.env.IS_OPTIMIZE !== 'false') {
60
60
  await operateProcessInstancePage.activeIconAssertion();
61
61
  await navigationPage.goToOptimize();
62
62
  await optimizeHomePage.clickDashboardLink();
63
- await (0, sleep_1.sleep)(60000);
63
+ await (0, sleep_1.sleep)(10000);
64
64
  await page.reload();
65
65
  await optimizeDashboardPage.clickFilterTable();
66
66
  await optimizeDashboardPage.fillFilterTable(processName);
@@ -79,11 +79,11 @@ if (process.env.IS_OPTIMIZE !== 'false') {
79
79
  await SM_8_9_1.test.step('Create BPMN Diagram with User Task and Start Process Instance', async () => {
80
80
  await modelerCreatePage.modelJobWorkerDiagram(processName);
81
81
  await modelerCreatePage.runProcessInstance();
82
- await (0, sleep_1.sleep)(60000);
82
+ await (0, sleep_1.sleep)(10000);
83
83
  });
84
84
  await SM_8_9_1.test.step('View Process Instance in Operate, Create User Task Report in Optimize, Start Another Process Instance in Modeler & Assert the Report Updates', async () => {
85
85
  await navigationPage.goToOperate();
86
- await (0, sleep_1.sleep)(60000);
86
+ await (0, sleep_1.sleep)(10000);
87
87
  await page.reload();
88
88
  await operateHomePage.clickProcessesTab();
89
89
  await operateProcessesPage.clickProcessInstanceLink(processName);
@@ -123,13 +123,13 @@ if (process.env.IS_OPTIMIZE !== 'false') {
123
123
  await modelerCreatePage.runProcessInstance();
124
124
  await (0, sleep_1.sleep)(10000);
125
125
  await navigationPage.goToOperate();
126
- await (0, sleep_1.sleep)(20000);
126
+ await (0, sleep_1.sleep)(10000);
127
127
  await page.reload();
128
128
  await operateHomePage.clickProcessesTab();
129
129
  await operateProcessesPage.clickProcessInstanceLink(processName);
130
130
  await operateProcessInstancePage.activeIconAssertion();
131
131
  await navigationPage.goToOptimize();
132
- await (0, sleep_1.sleep)(60000);
132
+ await (0, sleep_1.sleep)(10000);
133
133
  await optimizeHomePage.clickCollectionsLink();
134
134
  await (0, UtilitiesPage_2.assertPageTextWithRetry)(page, reportName, false, 30000);
135
135
  await optimizeCollectionsPage.clickMostRecentProcessReport(reportName);
@@ -150,11 +150,11 @@ if (process.env.IS_OPTIMIZE !== 'false') {
150
150
  await SM_8_9_1.test.step('Create BPMN Diagram with User Task and Start Process Instance', async () => {
151
151
  await modelerCreatePage.modelJobWorkerDiagram(processName);
152
152
  await modelerCreatePage.deployProcessInstance();
153
- await (0, sleep_1.sleep)(60000);
153
+ await (0, sleep_1.sleep)(10000);
154
154
  });
155
155
  await SM_8_9_1.test.step('Create Process Instance Count Report in Optimize, Start A Process Instance in Modeler & Assert the Report Updates', async () => {
156
156
  await navigationPage.goToOptimize();
157
- await (0, sleep_1.sleep)(120000);
157
+ await (0, sleep_1.sleep)(40000);
158
158
  await page.reload();
159
159
  await optimizeHomePage.clickCollectionsLink();
160
160
  await optimizeCollectionsPage.clickCreateNewButton();
@@ -187,7 +187,7 @@ if (process.env.IS_OPTIMIZE !== 'false') {
187
187
  await modelerHomePage.clickCrossComponentProjectFolder();
188
188
  await modelerHomePage.clickProcessDiagram(processName);
189
189
  await modelerCreatePage.runProcessInstance();
190
- await (0, sleep_1.sleep)(20000);
190
+ await (0, sleep_1.sleep)(10000);
191
191
  await navigationPage.goToOperate();
192
192
  await operateHomePage.clickProcessesTab();
193
193
  await operateProcessesPage.clickProcessInstanceLink(processName);
@@ -195,7 +195,7 @@ if (process.env.IS_OPTIMIZE !== 'false') {
195
195
  timeout: 1200000,
196
196
  });
197
197
  await navigationPage.goToOptimize();
198
- await (0, sleep_1.sleep)(30000);
198
+ await (0, sleep_1.sleep)(15000);
199
199
  await page.reload();
200
200
  await optimizeHomePage.clickCollectionsLink();
201
201
  await (0, UtilitiesPage_2.assertPageTextWithRetry)(page, reportName, false, 30000);
@@ -230,7 +230,7 @@ if (process.env.IS_OPTIMIZE !== 'false') {
230
230
  await SM_8_9_1.test.step('Navigate to Optimize and verify Conditional Events process appears in Dashboards (CE-OPT-01)', async () => {
231
231
  await navigationPage.goToOptimize();
232
232
  await optimizeHomePage.clickDashboardLink();
233
- await (0, sleep_1.sleep)(60000);
233
+ await (0, sleep_1.sleep)(10000);
234
234
  await page.reload();
235
235
  await optimizeDashboardPage.clickFilterTable();
236
236
  await optimizeDashboardPage.fillFilterTable(processName);
@@ -271,7 +271,7 @@ if (process.env.IS_OPTIMIZE !== 'false') {
271
271
  });
272
272
  await SM_8_9_1.test.step('Navigate to Optimize and create a User Task Table report for Conditional Events process (CE-OPT-03)', async () => {
273
273
  await navigationPage.goToOptimize();
274
- await (0, sleep_1.sleep)(60000);
274
+ await (0, sleep_1.sleep)(10000);
275
275
  await page.reload();
276
276
  await optimizeHomePage.clickCollectionsLink();
277
277
  await optimizeCollectionsPage.clickCreateNewButton();
@@ -333,7 +333,7 @@ if (process.env.IS_OPTIMIZE !== 'false') {
333
333
  });
334
334
  await SM_8_9_1.test.step('Create a User Task Table report in Optimize and verify it shows count of 1', async () => {
335
335
  await navigationPage.goToOptimize();
336
- await (0, sleep_1.sleep)(60000);
336
+ await (0, sleep_1.sleep)(10000);
337
337
  await page.reload();
338
338
  await optimizeHomePage.clickCollectionsLink();
339
339
  await optimizeCollectionsPage.clickCreateNewButton();
@@ -373,7 +373,7 @@ if (process.env.IS_OPTIMIZE !== 'false') {
373
373
  });
374
374
  await SM_8_9_1.test.step('Verify second process instance is completed in Operate', async () => {
375
375
  await navigationPage.goToOperate();
376
- await (0, sleep_1.sleep)(20000);
376
+ await (0, sleep_1.sleep)(10000);
377
377
  await page.reload();
378
378
  await operateHomePage.clickProcessesTab();
379
379
  await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
@@ -381,7 +381,7 @@ if (process.env.IS_OPTIMIZE !== 'false') {
381
381
  });
382
382
  await SM_8_9_1.test.step('Verify the Optimize report now shows 2 instances and the single instance count is gone (CE-OPT-05)', async () => {
383
383
  await navigationPage.goToOptimize();
384
- await (0, sleep_1.sleep)(60000);
384
+ await (0, sleep_1.sleep)(10000);
385
385
  await optimizeHomePage.clickCollectionsLink();
386
386
  await (0, UtilitiesPage_2.assertPageTextWithRetry)(page, reportName, false, 30000);
387
387
  await optimizeCollectionsPage.clickMostRecentProcessReport(reportName);
@@ -405,11 +405,11 @@ if (process.env.IS_OPTIMIZE !== 'false') {
405
405
  });
406
406
  await SM_8_9_1.test.step('Deploy the process without starting any instance', async () => {
407
407
  await modelerCreatePage.deployProcessInstance();
408
- await (0, sleep_1.sleep)(60000);
408
+ await (0, sleep_1.sleep)(10000);
409
409
  });
410
410
  await SM_8_9_1.test.step('Create a User Task Table report in Optimize and verify it shows 0 instances (CE-OPT-08)', async () => {
411
411
  await navigationPage.goToOptimize();
412
- await (0, sleep_1.sleep)(120000);
412
+ await (0, sleep_1.sleep)(40000);
413
413
  await page.reload();
414
414
  await optimizeHomePage.clickCollectionsLink();
415
415
  await optimizeCollectionsPage.clickCreateNewButton();
@@ -445,7 +445,7 @@ if (process.env.IS_OPTIMIZE !== 'false') {
445
445
  await modelerHomePage.clickProcessDiagram(bpmnFileName.replace('.bpmn', ''));
446
446
  const variables = '{"myVar": 8}';
447
447
  await modelerCreatePage.runProcessInstance(variables);
448
- await (0, sleep_1.sleep)(20000);
448
+ await (0, sleep_1.sleep)(10000);
449
449
  await navigationPage.goToOperate();
450
450
  await operateHomePage.clickProcessesTab();
451
451
  await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
@@ -453,7 +453,7 @@ if (process.env.IS_OPTIMIZE !== 'false') {
453
453
  });
454
454
  await SM_8_9_1.test.step('Verify the Optimize report now shows data from 1 instance (CE-OPT-07 & CE-OPT-08)', async () => {
455
455
  await navigationPage.goToOptimize();
456
- await (0, sleep_1.sleep)(30000);
456
+ await (0, sleep_1.sleep)(15000);
457
457
  await page.reload();
458
458
  await optimizeHomePage.clickCollectionsLink();
459
459
  await (0, UtilitiesPage_2.assertPageTextWithRetry)(page, reportName, false, 30000);
@@ -101,7 +101,6 @@ if (node_process_1.default.env.IS_RBA === 'true') {
101
101
  });
102
102
  await SM_8_9_1.test.step('Clear cookies and reset session', async () => {
103
103
  await (0, resetSession_1.resetSession)(browser, page); //a workaround for https://github.com/camunda/camunda/issues/34513
104
- await (0, sleep_1.sleep)(10000);
105
104
  });
106
105
  await SM_8_9_1.test.step('Navigate to Web Modeler', async () => {
107
106
  await navigationPage.goToModeler(undefined, credentials);
@@ -239,7 +238,6 @@ if (node_process_1.default.env.IS_RBA === 'true') {
239
238
  });
240
239
  await SM_8_9_1.test.step('Clear cookies and reset session', async () => {
241
240
  await (0, resetSession_1.resetSession)(browser, page); //a workaround for https://github.com/camunda/camunda/issues/34513
242
- await (0, sleep_1.sleep)(10000);
243
241
  });
244
242
  await SM_8_9_1.test.step('Navigate to Web Modeler', async () => {
245
243
  await navigationPage.goToModeler(undefined, credentials);
@@ -385,7 +383,6 @@ if (node_process_1.default.env.IS_RBA === 'true') {
385
383
  });
386
384
  await SM_8_9_1.test.step('Clear cookies and reset session', async () => {
387
385
  await (0, resetSession_1.resetSession)(browser, page); //a workaround for https://github.com/camunda/camunda/issues/34513
388
- await (0, sleep_1.sleep)(10000);
389
386
  });
390
387
  await SM_8_9_1.test.step('Navigate to Web Modeler', async () => {
391
388
  await navigationPage.goToModeler(undefined, credentials);
@@ -424,7 +421,6 @@ if (node_process_1.default.env.IS_RBA === 'true') {
424
421
  });
425
422
  await SM_8_9_1.test.step('Clear cookies and reset session', async () => {
426
423
  await (0, resetSession_1.resetSession)(browser, page); //a workaround for https://github.com/camunda/camunda/issues/34513
427
- await (0, sleep_1.sleep)(10000);
428
424
  });
429
425
  await SM_8_9_1.test.step('Navigate to Operate and Check Processes Are Not Accessible', async () => {
430
426
  await navigationPage.goToOperate(undefined, credentials);
@@ -533,7 +529,6 @@ if (node_process_1.default.env.IS_RBA === 'true') {
533
529
  });
534
530
  await SM_8_9_1.test.step('Clear cookies and reset session', async () => {
535
531
  await (0, resetSession_1.resetSession)(browser, page); //a workaround for https://github.com/camunda/camunda/issues/34513
536
- await (0, sleep_1.sleep)(10000);
537
532
  });
538
533
  await SM_8_9_1.test.step('Navigate to Web Modeler', async () => {
539
534
  await navigationPage.goToModeler(undefined, credentials);
@@ -572,7 +567,6 @@ if (node_process_1.default.env.IS_RBA === 'true') {
572
567
  });
573
568
  await SM_8_9_1.test.step('Clear cookies and reset session', async () => {
574
569
  await (0, resetSession_1.resetSession)(browser, page); //a workaround for https://github.com/camunda/camunda/issues/34513
575
- await (0, sleep_1.sleep)(10000);
576
570
  });
577
571
  await SM_8_9_1.test.step('Navigate to Operate and Check Processes Are Not Accessible', async () => {
578
572
  await navigationPage.goToOperate(undefined, credentials);
@@ -659,7 +653,6 @@ if (node_process_1.default.env.IS_RBA === 'true') {
659
653
  });
660
654
  await SM_8_9_1.test.step('Clear cookies and reset session', async () => {
661
655
  await (0, resetSession_1.resetSession)(browser, page); //a workaround for https://github.com/camunda/camunda/issues/34513
662
- await (0, sleep_1.sleep)(10000);
663
656
  });
664
657
  await SM_8_9_1.test.step('Navigate to Web Modeler', async () => {
665
658
  await navigationPage.goToModeler(undefined, credentials);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.722",
3
+ "version": "0.0.723",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",