@camunda/e2e-test-suite 0.0.1686 → 0.0.1688

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.
@@ -58,6 +58,7 @@ declare class ConsoleOrganizationPage {
58
58
  clickSettingsTab(): Promise<void>;
59
59
  clickOptInButton(): Promise<void>;
60
60
  enableAlphaFeature(name: string): Promise<void>;
61
+ acceptTerms(checkbox: Locator): Promise<void>;
61
62
  closeTermsDialog(): Promise<void>;
62
63
  scrollToOptInCheckbox(): Promise<void>;
63
64
  checkOptInCheckbox(): Promise<void>;
@@ -305,7 +305,7 @@ class ConsoleOrganizationPage {
305
305
  await alphaFeatureOptInButton.click({ timeout: 90000 });
306
306
  await (0, test_1.expect)(this.dialog.first()).toBeVisible({ timeout: 60000 });
307
307
  await this.scrollToOptInCheckbox();
308
- await this.optInAICheckbox.check({ timeout: 90000 });
308
+ await this.acceptTerms(this.optInAICheckbox);
309
309
  await this.closeTermsDialog();
310
310
  }
311
311
  }
@@ -326,14 +326,33 @@ class ConsoleOrganizationPage {
326
326
  await toggle.click();
327
327
  await (0, test_1.expect)(toggle).toBeChecked({ timeout: 60000 });
328
328
  }
329
+ // Ticking the terms checkbox records the acceptance with PactSafe
330
+ // (POST pactsafe.io/send). Closing the dialog or reloading the page before
331
+ // that request completes aborts it, so the opt-in is silently lost and the
332
+ // Opt-in button never goes away. Wait for the acceptance to be recorded.
333
+ async acceptTerms(checkbox) {
334
+ await Promise.all([
335
+ this.page.waitForResponse((response) => response.url().includes('pactsafe.io/send') &&
336
+ response.request().method() === 'POST' &&
337
+ response.ok(), { timeout: 60000 }),
338
+ checkbox.check({ timeout: 90000 }),
339
+ ]);
340
+ }
329
341
  async closeTermsDialog() {
330
- const closeButton = this.dialog
331
- .first()
332
- .getByRole('button', { name: 'Close' });
333
- if (await closeButton.isVisible({ timeout: 10000 }).catch(() => false)) {
334
- await closeButton.click();
342
+ const dialog = this.dialog.first();
343
+ // Console closes the terms dialog itself once the acceptance is recorded;
344
+ // only fall back to the Close button if it stays open.
345
+ const closedByItself = await dialog
346
+ .waitFor({ state: 'hidden', timeout: 30000 })
347
+ .then(() => true)
348
+ .catch(() => false);
349
+ if (!closedByItself) {
350
+ const closeButton = dialog.getByRole('button', { name: 'Close' });
351
+ if (await closeButton.isVisible()) {
352
+ await closeButton.click();
353
+ }
335
354
  }
336
- await (0, test_1.expect)(this.dialog.first()).toBeHidden({ timeout: 60000 });
355
+ await (0, test_1.expect)(dialog).toBeHidden({ timeout: 60000 });
337
356
  }
338
357
  async scrollToOptInCheckbox() {
339
358
  const dialog = this.dialog.first();
@@ -395,14 +414,34 @@ class ConsoleOrganizationPage {
395
414
  if (!(await this.optInButton.isVisible({ timeout: 30000 }).catch(() => false))) {
396
415
  return;
397
416
  }
398
- await this.clickOptInButton();
399
- await (0, test_1.expect)(this.dialog.first()).toBeVisible({ timeout: 60000 });
417
+ // The Opt-in click can land before the button's handler is ready, in
418
+ // which case no terms dialog opens; retry the click until it does.
419
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.dialog.first(), {
420
+ visibilityTimeout: 30000,
421
+ totalTimeout: 180000,
422
+ maxRetries: 3,
423
+ preAction: async () => {
424
+ if (!(await this.dialog.first().isVisible())) {
425
+ await this.clickOptInButton();
426
+ }
427
+ },
428
+ postAction: async () => {
429
+ await this.page.reload();
430
+ await this.clickSettingsTab();
431
+ },
432
+ });
400
433
  await this.scrollToOptInCheckbox();
401
- await this.optInCheckbox.check({ timeout: 90000 });
434
+ await this.acceptTerms(this.optInCheckbox);
402
435
  await this.closeTermsDialog();
403
- await this.page.reload();
404
- await this.clickSettingsTab();
405
- await (0, test_1.expect)(this.optInButton).not.toBeVisible({ timeout: 60000 });
436
+ // Reload, settings-table readiness and button absence are retried
437
+ // together, so a Settings page that failed to load can never count as
438
+ // "Opt-in button gone".
439
+ await (0, test_1.expect)(async () => {
440
+ await this.page.reload();
441
+ await this.clickSettingsTab();
442
+ await (0, test_1.expect)(this.rows.first()).toBeVisible({ timeout: 60000 });
443
+ await (0, test_1.expect)(this.optInButton).toBeHidden({ timeout: 60000 });
444
+ }).toPass({ timeout: 180000 });
406
445
  }
407
446
  async clickGroupsTab() {
408
447
  await this.groupsTab.click({ timeout: 60000 });
@@ -57,6 +57,7 @@ declare class ConsoleOrganizationPage {
57
57
  clickSettingsTab(): Promise<void>;
58
58
  clickOptInButton(): Promise<void>;
59
59
  enableAlphaFeature(name: string): Promise<void>;
60
+ acceptTerms(checkbox: Locator): Promise<void>;
60
61
  closeTermsDialog(): Promise<void>;
61
62
  scrollToOptInCheckbox(): Promise<void>;
62
63
  checkOptInCheckbox(): Promise<void>;
@@ -313,7 +313,7 @@ class ConsoleOrganizationPage {
313
313
  // been scrolled to its end.
314
314
  await (0, test_1.expect)(this.dialog.first()).toBeVisible({ timeout: 60000 });
315
315
  await this.scrollToOptInCheckbox();
316
- await this.optInAICheckbox.check({ timeout: 90000 });
316
+ await this.acceptTerms(this.optInAICheckbox);
317
317
  await this.closeTermsDialog();
318
318
  }
319
319
  }
@@ -341,14 +341,33 @@ class ConsoleOrganizationPage {
341
341
  await toggle.click();
342
342
  await (0, test_1.expect)(toggle).toBeChecked({ timeout: 60000 });
343
343
  }
344
+ // Ticking the terms checkbox records the acceptance with PactSafe
345
+ // (POST pactsafe.io/send). Closing the dialog or reloading the page before
346
+ // that request completes aborts it, so the opt-in is silently lost and the
347
+ // Opt-in button never goes away. Wait for the acceptance to be recorded.
348
+ async acceptTerms(checkbox) {
349
+ await Promise.all([
350
+ this.page.waitForResponse((response) => response.url().includes('pactsafe.io/send') &&
351
+ response.request().method() === 'POST' &&
352
+ response.ok(), { timeout: 60000 }),
353
+ checkbox.check({ timeout: 90000 }),
354
+ ]);
355
+ }
344
356
  async closeTermsDialog() {
345
- const closeButton = this.dialog
346
- .first()
347
- .getByRole('button', { name: 'Close' });
348
- if (await closeButton.isVisible({ timeout: 10000 }).catch(() => false)) {
349
- await closeButton.click();
357
+ const dialog = this.dialog.first();
358
+ // Console closes the terms dialog itself once the acceptance is recorded;
359
+ // only fall back to the Close button if it stays open.
360
+ const closedByItself = await dialog
361
+ .waitFor({ state: 'hidden', timeout: 30000 })
362
+ .then(() => true)
363
+ .catch(() => false);
364
+ if (!closedByItself) {
365
+ const closeButton = dialog.getByRole('button', { name: 'Close' });
366
+ if (await closeButton.isVisible()) {
367
+ await closeButton.click();
368
+ }
350
369
  }
351
- await (0, test_1.expect)(this.dialog.first()).toBeHidden({ timeout: 60000 });
370
+ await (0, test_1.expect)(dialog).toBeHidden({ timeout: 60000 });
352
371
  }
353
372
  async scrollToOptInCheckbox() {
354
373
  await this.page
@@ -359,7 +378,7 @@ class ConsoleOrganizationPage {
359
378
  });
360
379
  }
361
380
  async checkOptInCheckbox() {
362
- await this.optInCheckbox.check({ timeout: 90000 });
381
+ await this.acceptTerms(this.optInCheckbox);
363
382
  }
364
383
  async clickMainUser() {
365
384
  await (0, test_1.expect)(this.mainUser).toBeVisible({ timeout: 60000 });
@@ -468,8 +468,15 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
468
468
  await _8_9_1.test.step('Navigate to Operate and Assert Both Processes Are Accessible', async () => {
469
469
  await appsPage.clickCamundaApps();
470
470
  await appsPage.clickOperate(clusterName);
471
- await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
472
- timeout: 30000,
471
+ // Operate can render "Something went wrong ... Failed to fetch
472
+ // dynamically imported module" when a lazy-loaded asset fails to load
473
+ // (nightly 2026-11-17). That boundary only clears on a reload.
474
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateHomePage.operateBanner, {
475
+ postAction: async () => {
476
+ await page.reload({ waitUntil: 'domcontentloaded' });
477
+ },
478
+ totalTimeout: 120000,
479
+ visibilityTimeout: 30000,
473
480
  });
474
481
  await operateHomePage.clickProcessesTab();
475
482
  await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1686",
3
+ "version": "0.0.1688",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",