@camunda/e2e-test-suite 0.0.567 → 0.0.569

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.
@@ -26,6 +26,7 @@ declare class ModelerHomePage {
26
26
  readonly closeButton: Locator;
27
27
  readonly formNameBreadcrumb: (formName: string) => Locator;
28
28
  constructor(page: Page);
29
+ dismissOverlays(): Promise<void>;
29
30
  clickCreateNewProjectButton(): Promise<void>;
30
31
  enterNewProjectName(name: string): Promise<void>;
31
32
  enterIdpApplicationName(name: string): Promise<void>;
@@ -77,20 +77,27 @@ class ModelerHomePage {
77
77
  hasText: formName,
78
78
  });
79
79
  }
80
- async clickCreateNewProjectButton() {
81
- // Wait for any top-bar survey/banner overlay to clear before clicking
82
- await this.page
83
- .locator('[data-test="top-bar"]')
84
- .waitFor({ state: 'hidden', timeout: 10000 })
85
- .catch(() => { });
86
- try {
87
- await this.createNewProjectButton.click({ timeout: 30000 });
88
- }
89
- catch {
90
- // Overlay still present — force the click through
91
- await this.createNewProjectButton.click({ force: true, timeout: 30000 });
80
+ async dismissOverlays() {
81
+ for (const locator of [
82
+ this.closeButton,
83
+ this.page.getByRole('button', { name: 'Close' }).first(),
84
+ this.messageBanner,
85
+ ]) {
86
+ await locator
87
+ .waitFor({ state: 'visible', timeout: 3000 })
88
+ .then(() => locator.click())
89
+ .catch(() => { });
92
90
  }
93
91
  }
92
+ async clickCreateNewProjectButton() {
93
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.createNewProjectButton, {
94
+ preAction: async () => {
95
+ await this.dismissOverlays();
96
+ },
97
+ totalTimeout: 120000,
98
+ visibilityTimeout: 10000,
99
+ });
100
+ }
94
101
  async enterNewProjectName(name) {
95
102
  await this.projectNameInput.click({ timeout: 60000 });
96
103
  await this.projectNameInput.fill(name);
@@ -211,7 +218,7 @@ class ModelerHomePage {
211
218
  }
212
219
  async createCrossComponentProjectFolder() {
213
220
  await (0, sleep_1.sleep)(15000);
214
- await this.clickMessageBanner();
221
+ await this.dismissOverlays();
215
222
  if (await this.crossComponentProjectFolder.isVisible()) {
216
223
  console.log('Cross Component Project folder already exists. Clicking into it');
217
224
  await this.clickCrossComponentProjectFolder();
@@ -28,6 +28,7 @@ declare class ModelerHomePage {
28
28
  readonly formNameBreadcrumb: (formName: string) => Locator;
29
29
  readonly buttonSkipCustomization: Locator;
30
30
  constructor(page: Page);
31
+ dismissOverlays(): Promise<void>;
31
32
  clickCreateNewProjectButton(): Promise<void>;
32
33
  enterNewProjectName(name: string): Promise<void>;
33
34
  enterIdpApplicationName(name: string): Promise<void>;
@@ -81,15 +81,27 @@ class ModelerHomePage {
81
81
  name: 'Skip customization',
82
82
  });
83
83
  }
84
- async clickCreateNewProjectButton() {
85
- try {
86
- await this.createNewProjectButton.click({ timeout: 60000 });
87
- }
88
- catch (error) {
89
- await this.buttonSkipCustomization.click();
90
- await this.createNewProjectButton.click({ timeout: 60000 });
84
+ async dismissOverlays() {
85
+ for (const locator of [
86
+ this.closeButton,
87
+ this.page.getByRole('button', { name: 'Close' }).first(),
88
+ this.messageBanner,
89
+ ]) {
90
+ await locator
91
+ .waitFor({ state: 'visible', timeout: 3000 })
92
+ .then(() => locator.click())
93
+ .catch(() => { });
91
94
  }
92
95
  }
96
+ async clickCreateNewProjectButton() {
97
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.createNewProjectButton, {
98
+ preAction: async () => {
99
+ await this.dismissOverlays();
100
+ },
101
+ totalTimeout: 120000,
102
+ visibilityTimeout: 10000,
103
+ });
104
+ }
93
105
  async enterNewProjectName(name) {
94
106
  await this.projectNameInput.click({ timeout: 60000 });
95
107
  await this.projectNameInput.fill(name);
@@ -177,7 +189,7 @@ class ModelerHomePage {
177
189
  });
178
190
  }
179
191
  async createCrossComponentProjectFolder() {
180
- await this.clickMessageBanner();
192
+ await this.dismissOverlays();
181
193
  if (await this.crossComponentProjectFolder.isVisible({ timeout: 10000 })) {
182
194
  console.log('Cross Component Project folder already exists. Clicking into it');
183
195
  await this.clickCrossComponentProjectFolder();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.567",
3
+ "version": "0.0.569",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",