@camunda/e2e-test-suite 0.0.1484 → 0.0.1486

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.
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ClusterSecretsPage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
5
  const sleep_1 = require("../../utils/sleep");
6
- const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
7
6
  class ClusterSecretsPage {
8
7
  page;
9
8
  createNewSecretButton;
@@ -352,16 +351,24 @@ class ClusterSecretsPage {
352
351
  const mapped = secrets
353
352
  .map((secret) => `${secret.name}=${secret.value}`)
354
353
  .join('\n');
355
- await this.clickImportButton();
356
- if (!(await this.dialog.isVisible())) {
357
- await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.fromFileButton, {
358
- postAction: async () => {
359
- await this.clickImportButton();
360
- },
361
- });
362
- await this.fromFileButton.click();
363
- }
364
- await (0, test_1.expect)(this.dialog).toBeVisible();
354
+ // Hub's Import button opens a Radix dropdown whose "from File" item can
355
+ // detach before the click lands: the previous set's search-box fill
356
+ // re-filters the table right as the menu opens, which closes it (nightly
357
+ // run 39540410553: the item resolved, then "element was detached from the
358
+ // DOM" and never came back). Reopen the menu and retry the pair as one
359
+ // unit until the dialog is actually up.
360
+ await (0, test_1.expect)(async () => {
361
+ if (await this.dialog.isVisible()) {
362
+ return;
363
+ }
364
+ if (!(await this.fromFileButton.isVisible())) {
365
+ await this.clickImportButton();
366
+ }
367
+ if (!(await this.dialog.isVisible())) {
368
+ await this.fromFileButton.click({ timeout: 5000 });
369
+ }
370
+ await (0, test_1.expect)(this.dialog).toBeVisible({ timeout: 5000 });
371
+ }).toPass({ timeout: 60000 });
365
372
  await this.bulkImportTextArea.click();
366
373
  await this.bulkImportTextArea.fill(mapped);
367
374
  await this.dialogImportButton.click();
@@ -375,17 +382,16 @@ class ClusterSecretsPage {
375
382
  // independently verifies every requested secret is present and creates
376
383
  // any that are genuinely missing, so this doesn't mask a real failure,
377
384
  // it just defers the correctness check to the step that already owns it.
378
- try {
379
- await (0, test_1.expect)(this.dialog).not.toBeVisible({ timeout: 60000 });
380
- }
381
- catch (error) {
382
- if (await this.bulkImportErrorBanner.isVisible().catch(() => false)) {
383
- await this.bulkImportCancelButton.click();
384
- await (0, test_1.expect)(this.dialog).not.toBeVisible({ timeout: 10000 });
385
- }
386
- else {
387
- throw error;
388
- }
385
+ // Stop waiting as soon as that banner renders rather than burning the
386
+ // full 60s on every set that already exists. The filter's inner locator
387
+ // is resolved inside the dialog, so it must not be dialog-scoped itself.
388
+ const partialImportBanner = this.page
389
+ .getByText(/Imported \d+ of \d+ secrets?\./)
390
+ .or(this.page.getByText(/Imported \d+ secrets?, \d+ failed/));
391
+ await (0, test_1.expect)(this.dialog.filter({ hasNot: partialImportBanner })).not.toBeVisible({ timeout: 60000 });
392
+ if (await this.bulkImportErrorBanner.isVisible().catch(() => false)) {
393
+ await this.bulkImportCancelButton.click();
394
+ await (0, test_1.expect)(this.dialog).not.toBeVisible({ timeout: 10000 });
389
395
  }
390
396
  await (0, test_1.expect)(this.createNewSecretButton).toBeVisible({
391
397
  timeout: 60000,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1484",
3
+ "version": "0.0.1486",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",