@camunda/e2e-test-suite 0.0.1721 → 0.0.1723

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.
@@ -6,6 +6,7 @@ const sleep_1 = require("../../utils/sleep");
6
6
  const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
7
7
  const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
8
8
  const ClientCredentialsDetailsPage_1 = require("./ClientCredentialsDetailsPage");
9
+ const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
9
10
  const sessionRecovery_1 = require("../../utils/sessionRecovery");
10
11
  // Hub's own /login and /login-callback routes, which render only a spinner
11
12
  // while the Auth0 hand-off of a full page load is in flight.
@@ -772,8 +773,10 @@ class ClusterDetailsPage {
772
773
  for (const component of components) {
773
774
  await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.page.getByText(`${component}Healthy`, { exact: true }), {
774
775
  visibilityTimeout: 60000,
775
- totalTimeout: 300000,
776
- maxRetries: 5,
776
+ // Raised from 300s: attempts may now wait out the rate limiter
777
+ // (waitForRateLimitToClear) before reloading.
778
+ totalTimeout: 600000,
779
+ maxRetries: 7,
777
780
  preAction: async () => {
778
781
  // Hub logs the tab out when its backend fails the session call
779
782
  // (/api/internal/self 5xx), and from then on a reload only
@@ -789,6 +792,13 @@ class ClusterDetailsPage {
789
792
  .catch(() => { });
790
793
  return;
791
794
  }
795
+ // A reload is a full Hub load plus Auth0 round-trip. Fired into an
796
+ // exhausted Envoy rate limit it just re-renders "fetch error", so
797
+ // the badge never appears and the whole retry budget is spent
798
+ // reloading into a drained bucket (the HTTP 429 burst this run hit
799
+ // on GET /clusters). Let the limiter admit a cheap request again
800
+ // first, mirroring pages/8.10/ClusterDetailsPage.ts.
801
+ await (0, consoleApiHelpers_1.waitForRateLimitToClear)(this.page);
792
802
  await this.page.reload();
793
803
  },
794
804
  });
@@ -83,6 +83,7 @@ declare class ModelerHomePage {
83
83
  clickDiagramTypeDropdown(): Promise<void>;
84
84
  clickBpmnTemplateOption(): Promise<void>;
85
85
  clickFormOption(): Promise<void>;
86
+ private confirmResourceCreationDialog;
86
87
  enterFormName(name: string): Promise<void>;
87
88
  private renameViaMoreActions;
88
89
  private waitForEntityCrumb;
@@ -759,9 +759,36 @@ class ModelerHomePage {
759
759
  async clickBpmnTemplateOption() {
760
760
  await (0, test_1.expect)(this.bpmnTemplateOption).toBeVisible({ timeout: 60000 });
761
761
  await this.bpmnTemplateOption.click({ timeout: 60000 });
762
+ await this.confirmResourceCreationDialog();
762
763
  }
763
764
  async clickFormOption() {
764
765
  await this.formTemplateOption.click();
766
+ await this.confirmResourceCreationDialog();
767
+ }
768
+ // The camunda-hub "name on create file" change inserts a naming dialog
769
+ // ("Create BPMN diagram" / "Create form") between picking the resource type
770
+ // and opening the editor: it pre-fills a default name and only creates the
771
+ // file on its "Create" button. Builds without that change -- including the
772
+ // product the SM nightly runs this same spec against -- create the file
773
+ // immediately with no dialog, so submit it only when it actually appears,
774
+ // keeping the default name (the test renames the resource afterwards via
775
+ // enterDiagramName / enterFormName).
776
+ async confirmResourceCreationDialog() {
777
+ const createDialog = this.page.getByRole('dialog').filter({
778
+ has: this.page.getByRole('button', { name: 'Create', exact: true }),
779
+ });
780
+ const appeared = await createDialog
781
+ .first()
782
+ .waitFor({ state: 'visible', timeout: 5000 })
783
+ .then(() => true)
784
+ .catch(() => false);
785
+ if (!appeared) {
786
+ return;
787
+ }
788
+ await createDialog
789
+ .getByRole('button', { name: 'Create', exact: true })
790
+ .first()
791
+ .click({ timeout: 30000 });
765
792
  }
766
793
  // Same shell split as enterNewProjectName: the Design System form editor has
767
794
  // no inline editable input and renames through the breadcrumb's "More
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1721",
3
+ "version": "0.0.1723",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",