@camunda/e2e-test-suite 0.0.708 → 0.0.710

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.
@@ -27,6 +27,7 @@ declare class ModelerHomePage {
27
27
  constructor(page: Page);
28
28
  clickCreateNewProjectButton(): Promise<void>;
29
29
  enterNewProjectName(name: string): Promise<void>;
30
+ waitForModelerReady(timeoutMs?: number): Promise<void>;
30
31
  createCrossComponentProjectFolder(): Promise<void>;
31
32
  clickCrossComponentProjectFolder(): Promise<void>;
32
33
  clickProcessDiagram(name: string): Promise<void>;
@@ -96,6 +96,26 @@ class ModelerHomePage {
96
96
  await this.projectNameInput.fill(name);
97
97
  await this.projectNameInput.press('Enter');
98
98
  }
99
+ async waitForModelerReady(timeoutMs = 120000) {
100
+ const startTime = Date.now();
101
+ while (Date.now() - startTime < timeoutMs) {
102
+ if (await this.modelerPageBanner.isVisible().catch(() => false)) {
103
+ return;
104
+ }
105
+ // The Modeler upstream can return a transient 503 (nginx) while its
106
+ // pod restarts. Reload the error page until the app shell renders.
107
+ try {
108
+ await this.page.reload({ waitUntil: 'domcontentloaded' });
109
+ }
110
+ catch {
111
+ // reload can throw (e.g. connection refused) while the upstream is
112
+ // coming back; the next loop iteration retries the readiness check.
113
+ }
114
+ await this.modelerPageBanner
115
+ .waitFor({ state: 'visible', timeout: 15000 })
116
+ .catch(() => { });
117
+ }
118
+ }
99
119
  async createCrossComponentProjectFolder() {
100
120
  const maxAttempts = 3;
101
121
  const initialWaitMs = 10000;
@@ -103,6 +123,7 @@ class ModelerHomePage {
103
123
  for (let attempt = 0; attempt < maxAttempts; attempt++) {
104
124
  try {
105
125
  await (0, sleep_1.sleep)(attempt === 0 ? initialWaitMs : retryWaitMs);
126
+ await this.waitForModelerReady();
106
127
  await this.clickMessageBanner();
107
128
  if (await this.crossComponentProjectFolder.isVisible()) {
108
129
  console.log('Cross Component Project folder already exists. Clicking into it');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.708",
3
+ "version": "0.0.710",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",