@camunda/e2e-test-suite 0.0.1626 → 0.0.1628

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.
@@ -64,6 +64,7 @@ declare class ClusterDetailsPage {
64
64
  clickAPITab(): Promise<void>;
65
65
  dismissOopsIfPresent(): Promise<void>;
66
66
  clickCreateClientButton(): Promise<void>;
67
+ openCreateClientDialog(): Promise<void>;
67
68
  clickClientNameTextbox(): Promise<void>;
68
69
  fillClientNameTextbox(name: string): Promise<void>;
69
70
  clickTasklistCheckbox(): Promise<void>;
@@ -285,6 +285,27 @@ class ClusterDetailsPage {
285
285
  },
286
286
  });
287
287
  }
288
+ // Right after the API tab mounts, Console refetches the cluster, clients
289
+ // and alerts queries; that re-render unmounts a create dialog opened in the
290
+ // meantime about a second later. Reloading the page restarts the same
291
+ // race, so reopen the dialog in place until it survives the settle window.
292
+ async openCreateClientDialog() {
293
+ const maxOpens = 4;
294
+ for (let open = 1; open <= maxOpens; open++) {
295
+ await this.clickCreateClientButton();
296
+ await (0, test_1.expect)(this.createClientCredentialsDialog).toBeVisible({
297
+ timeout: 30000,
298
+ });
299
+ const closedOnItsOwn = await this.createClientCredentialsDialog
300
+ .waitFor({ state: 'hidden', timeout: 5000 })
301
+ .then(() => true, () => false);
302
+ if (!closedOnItsOwn) {
303
+ return;
304
+ }
305
+ console.warn(`openCreateClientDialog: dialog closed on its own (open ${open}/${maxOpens}); reopening`);
306
+ }
307
+ throw new Error(`Create client dialog closed on its own after ${maxOpens} opens`);
308
+ }
288
309
  async clickClientNameTextbox() {
289
310
  await this.clientNameTextbox.click({ timeout: 60000 });
290
311
  }
@@ -794,10 +815,7 @@ class ClusterDetailsPage {
794
815
  // have created the client before we could detect the credentials dialog.
795
816
  const attemptName = attempt === 0 ? name : `${name}-r${attempt}`;
796
817
  try {
797
- await this.clickCreateClientButton();
798
- await (0, test_1.expect)(this.createClientCredentialsDialog).toBeVisible({
799
- timeout: 30000,
800
- });
818
+ await this.openCreateClientDialog();
801
819
  await this.fillAPIClientName(attemptName);
802
820
  await this.checkOrchestrationClusterCheckbox();
803
821
  await this.checkOptimizeCheckbox();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1626",
3
+ "version": "0.0.1628",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",