@camunda/e2e-test-suite 0.0.476 → 0.0.478

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.
@@ -90,7 +90,7 @@ class AppsPage {
90
90
  throw new Error(`Failed to click the modeler link after ${maxRetries} attempts.`);
91
91
  }
92
92
  async clickTasklist(clusterName) {
93
- const maxRetries = 3;
93
+ const maxRetries = 5;
94
94
  for (let retries = 0; retries < maxRetries; retries++) {
95
95
  try {
96
96
  if (retries === 0) {
@@ -105,6 +105,7 @@ class AppsPage {
105
105
  }
106
106
  else {
107
107
  await this.clickCamundaApps();
108
+ await (0, UtilitiesPage_1.waitForLoadingToFinish)(this.page);
108
109
  if (await this.tasklistLink.isVisible({ timeout: 5000 })) {
109
110
  await this.tasklistLink.click({ timeout: 10000 });
110
111
  }
@@ -352,11 +352,19 @@ class ClusterDetailsPage {
352
352
  const deleteButton = deletes[0];
353
353
  if (await deleteButton.isVisible()) {
354
354
  await deleteButton.click({ timeout: 60000 });
355
- await (0, test_1.expect)(dialog).toBeVisible({ timeout: 40000 });
356
- await this.deleteSubButton.click();
357
- await (0, test_1.expect)(this.page.getByText('Deleting...')).not.toBeVisible({
358
- timeout: 60000,
359
- });
355
+ // Handle confirmation dialog if it appears; some UI states delete without one
356
+ const dialogVisible = await dialog
357
+ .isVisible({ timeout: 5000 })
358
+ .catch(() => false);
359
+ if (dialogVisible) {
360
+ await this.deleteSubButton.click();
361
+ await (0, test_1.expect)(this.page.getByText('Deleting...')).not.toBeVisible({
362
+ timeout: 60000,
363
+ });
364
+ }
365
+ else {
366
+ await (0, sleep_1.sleep)(2000);
367
+ }
360
368
  }
361
369
  await (0, sleep_1.sleep)(3000);
362
370
  deletes = await this.deleteButton.all();
@@ -210,12 +210,21 @@ class ClusterSecretsPage {
210
210
  await this.bulkImportTextArea.click();
211
211
  await this.bulkImportTextArea.fill(mapped);
212
212
  await this.dialogImportButton.click();
213
- await (0, test_1.expect)(this.dialog).not.toBeVisible({
214
- timeout: 120000,
215
- });
213
+ try {
214
+ await (0, test_1.expect)(this.dialog).not.toBeVisible({
215
+ timeout: 60000,
216
+ });
217
+ }
218
+ catch {
219
+ // Import dialog didn't close - press Escape and let assertSecretsOrCreate handle creation
220
+ await this.page.keyboard.press('Escape');
221
+ await (0, test_1.expect)(this.dialog).not.toBeVisible({ timeout: 10000 });
222
+ }
216
223
  await (0, test_1.expect)(this.createNewSecretButton).toBeVisible({
217
224
  timeout: 60000,
218
225
  });
226
+ await this.page.reload();
227
+ await (0, sleep_1.sleep)(5000);
219
228
  }
220
229
  }
221
230
  exports.ClusterSecretsPage = ClusterSecretsPage;
@@ -20,6 +20,7 @@ class TaskProcessesPage {
20
20
  this.waitingForTasksText = this.page.getByText('Waiting for tasks...');
21
21
  }
22
22
  async clickpopupContinueButton() {
23
+ await this.page.waitForTimeout(3000);
23
24
  if ((await this.popupContinueButton.count()) > 0) {
24
25
  await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.popupContinueButton);
25
26
  }
@@ -257,7 +257,9 @@ class OCTenantPage {
257
257
  }
258
258
  async fillRoleIdSearchBox(roleId, roleIdentifier) {
259
259
  await this.roleIdSearchBox.fill(roleId);
260
- await this.page.getByText(roleIdentifier).click({ force: true });
260
+ const result = this.page.getByText(roleIdentifier).first();
261
+ await (0, test_1.expect)(result).toBeVisible({ timeout: 15000 });
262
+ await result.click();
261
263
  }
262
264
  async clickAssignRoleSubButton() {
263
265
  await this.assignRoleSubButton.click();
@@ -273,6 +275,10 @@ class OCTenantPage {
273
275
  await this.clickRoleIdSearchBox();
274
276
  await this.fillRoleIdSearchBox(roleId, roleIdentifier);
275
277
  await this.clickAssignRoleSubButton();
278
+ await (0, test_1.expect)(this.page.getByLabel('Assign role')).not.toBeVisible({
279
+ timeout: 15000,
280
+ });
281
+ await (0, test_1.expect)(this.row(roleId)).toBeVisible({ timeout: 15000 });
276
282
  }
277
283
  }
278
284
  exports.OCTenantPage = OCTenantPage;
@@ -23,5 +23,6 @@ declare class OperateProcessInstancePage {
23
23
  assertProcessVariableContainsText(variableName: string, text: string): Promise<void>;
24
24
  assertResultVariableVisibleWithRetry(variableName: string): Promise<void>;
25
25
  assertActiveTokenIsPresent(): Promise<void>;
26
+ assertVariablesListVisible(timeout?: number): Promise<void>;
26
27
  }
27
28
  export { OperateProcessInstancePage };
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OperateProcessInstancePage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
5
  const sleep_1 = require("../../utils/sleep");
6
+ const constants_1 = require("../../utils/constants");
6
7
  class OperateProcessInstancePage {
7
8
  page;
8
9
  diagram;
@@ -190,5 +191,24 @@ class OperateProcessInstancePage {
190
191
  async assertActiveTokenIsPresent() {
191
192
  await (0, test_1.expect)(this.activeIcon).toBeVisible({ timeout: 60000 });
192
193
  }
194
+ async assertVariablesListVisible(timeout = 30000) {
195
+ const startTime = Date.now();
196
+ while (Date.now() - startTime < timeout) {
197
+ try {
198
+ await (0, test_1.expect)(this.variablesList).toBeVisible({
199
+ timeout: constants_1._1_SECOND_IN_MS * 10,
200
+ });
201
+ return;
202
+ }
203
+ catch {
204
+ console.log(`Variables list not visible, reloading... (${Math.round((Date.now() - startTime) / 1000)}s elapsed)`);
205
+ await this.page
206
+ .reload({ timeout: 10000 })
207
+ .catch(() => console.log('Page reload timed out, continuing...'));
208
+ await (0, sleep_1.sleep)(2000);
209
+ }
210
+ }
211
+ throw new Error(`Variables list not visible after ${Math.round(timeout / 1000)}s`);
212
+ }
193
213
  }
194
214
  exports.OperateProcessInstancePage = OperateProcessInstancePage;
@@ -309,9 +309,7 @@ if (process.env.IS_MT === 'true') {
309
309
  await operateHomePage.clickProcessesTab();
310
310
  await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
311
311
  await operateProcessInstancePage.completedIconAssertion();
312
- await (0, test_1.expect)(page.getByTestId('variables-list')).toBeVisible({
313
- timeout: 30000,
314
- });
312
+ await operateProcessInstancePage.assertVariablesListVisible();
315
313
  await (0, test_1.expect)(page.getByText('"Awesome!"')).toBeVisible({
316
314
  timeout: 60000,
317
315
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.476",
3
+ "version": "0.0.478",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",