@camunda/e2e-test-suite 0.0.1334 → 0.0.1336

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.
@@ -8,6 +8,7 @@ declare class ConnectorMarketplacePage {
8
8
  readonly addToProjectButton: Locator;
9
9
  readonly cancelButton: Locator;
10
10
  readonly tryAgainButton: Locator;
11
+ readonly checkFailedAlert: Locator;
11
12
  readonly closeButton: Locator;
12
13
  readonly browseAllMarketplaceDetailsButton: Locator;
13
14
  constructor(page: Page);
@@ -11,6 +11,7 @@ class ConnectorMarketplacePage {
11
11
  addToProjectButton;
12
12
  cancelButton;
13
13
  tryAgainButton;
14
+ checkFailedAlert;
14
15
  closeButton;
15
16
  browseAllMarketplaceDetailsButton;
16
17
  constructor(page) {
@@ -40,6 +41,9 @@ class ConnectorMarketplacePage {
40
41
  });
41
42
  this.cancelButton = page.getByRole('button', { name: 'Cancel' });
42
43
  this.tryAgainButton = page.getByRole('button', { name: 'Try again' });
44
+ this.checkFailedAlert = page
45
+ .getByText("Couldn't check this connector")
46
+ .first();
43
47
  this.closeButton = page.getByRole('button', { name: 'Close' });
44
48
  }
45
49
  async clickSearchForConnectorTextbox() {
@@ -81,24 +85,29 @@ class ConnectorMarketplacePage {
81
85
  // request still pending 30s in. When the check fails the footer offers
82
86
  // "Try again" (RETRY_INSPECTION) instead of "Add to project", so give the
83
87
  // check longer and re-run it on failure rather than timing out.
88
+ //
89
+ // Hub retries a transient (5xx) check once by itself before it shows
90
+ // "Try again" (use-marketplace-connector-inspection.ts), and the gateway
91
+ // only answers a hung metadata request with a 504 after ~60s -- so
92
+ // "Try again" first renders ~121s after the click. A 120s wait expired
93
+ // ~1s before that and never reached the retry below; allow both attempts.
94
+ // A "Try again" check keeps the button on screen (loading) and hides the
95
+ // "Couldn't check" alert until it fails again, so wait on that alert
96
+ // rather than the button to retry as soon as a check has failed.
84
97
  const outcome = this.addToProjectButton
85
98
  .or(this.replaceResourceButton)
86
99
  .or(this.cancelButton)
87
100
  .first();
88
- for (let attempt = 0; attempt < 3; attempt++) {
101
+ for (let attempt = 0; attempt < 4; attempt++) {
89
102
  await outcome
90
- .or(this.tryAgainButton)
103
+ .or(this.checkFailedAlert)
91
104
  .first()
92
- .waitFor({ state: 'visible', timeout: 120000 });
105
+ .waitFor({ state: 'visible', timeout: 180000 });
93
106
  if (await outcome.isVisible()) {
94
107
  break;
95
108
  }
96
- // The retrying check keeps "Try again" on screen (as a loading button),
97
- // so wait for its result here instead of re-polling the union above.
98
109
  await this.tryAgainButton.click({ timeout: 10000 });
99
- await outcome
100
- .waitFor({ state: 'visible', timeout: 120000 })
101
- .catch(() => { });
110
+ await this.checkFailedAlert.waitFor({ state: 'hidden', timeout: 10000 });
102
111
  }
103
112
  await outcome.waitFor({ state: 'visible', timeout: 10000 });
104
113
  let imported = false;
@@ -287,25 +287,41 @@ class ClusterSecretsPage {
287
287
  // leaves the dialog up forever. Close it and let assertSecretsOrCreate
288
288
  // below do the verification: it checks every secret individually and
289
289
  // creates the ones that are genuinely missing, so nothing is skipped.
290
+ // The dialog lists each 409 as "<KEY> - a secret with this key already
291
+ // exists", so stop waiting once that renders instead of burning the full
292
+ // 60s on every partially-imported set.
293
+ const alreadyExists = this.page.getByText(/a secret with this key already exists/i);
290
294
  try {
291
- await (0, test_1.expect)(this.dialog).not.toBeVisible({
295
+ await (0, test_1.expect)(this.dialog.filter({ hasNot: alreadyExists })).not.toBeVisible({
292
296
  timeout: 60000,
293
297
  });
294
298
  }
295
299
  catch (error) {
300
+ console.log(`Import dialog did not settle after importing: ${error}`);
301
+ }
302
+ if (await this.dialog.isVisible().catch(() => false)) {
296
303
  console.log('Import dialog still open after importing; some secrets already ' +
297
- `exist on this cluster. Closing it and verifying individually: ${error}`);
304
+ 'exist on this cluster. Closing it and verifying individually.');
298
305
  await this.closeImportDialog();
299
306
  }
300
- await (0, test_1.expect)(this.createNewSecretButton).toBeVisible({
301
- timeout: 60000,
302
- });
303
307
  await this.page.reload();
304
308
  // Hub keeps the selected cluster tab out of the URL, so the reload lands
305
309
  // on Overview, where assertSecretsOrCreate finds no search box and tries
306
310
  // to create every secret. Re-select the tab, as pages/8.8 does (45eae7b).
307
- await this.clusterSecretTab.first().click({ timeout: 60000 });
308
- await (0, test_1.expect)(this.createNewSecretButton).toBeVisible({ timeout: 60000 });
311
+ // Nightly traces show the panel then either staying on Overview (tab
312
+ // clicked before Hub hydrated) or rendering Hub's "Oops ... something
313
+ // went wrong. Please try reloading!" boundary, so createNewSecretButton
314
+ // never appears; both clear on another reload + tab re-select.
315
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.createNewSecretButton, {
316
+ preAction: async () => {
317
+ await this.clusterSecretTab.first().click({ timeout: 60000 });
318
+ },
319
+ postAction: async () => {
320
+ await this.page.reload({ waitUntil: 'domcontentloaded' });
321
+ },
322
+ totalTimeout: 300000,
323
+ visibilityTimeout: 60000,
324
+ });
309
325
  }
310
326
  }
311
327
  exports.ClusterSecretsPage = ClusterSecretsPage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1334",
3
+ "version": "0.0.1336",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",