@camunda/e2e-test-suite 0.0.565 → 0.0.566

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 optionsButton: 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>;
@@ -75,10 +75,26 @@ class ModelerHomePage {
75
75
  hasText: formName,
76
76
  });
77
77
  }
78
+ async dismissOverlays() {
79
+ for (const locator of [
80
+ this.closeButton,
81
+ this.page.getByRole('button', { name: 'Close' }).first(),
82
+ this.messageBanner,
83
+ ]) {
84
+ await locator
85
+ .waitFor({ state: 'visible', timeout: 3000 })
86
+ .then(() => locator.click())
87
+ .catch(() => { });
88
+ }
89
+ }
78
90
  async clickCreateNewProjectButton() {
79
- await (0, test_1.expect)(this.createNewProjectButton).toBeVisible({ timeout: 60000 });
80
- await (0, test_1.expect)(this.createNewProjectButton).toBeEnabled({ timeout: 60000 });
81
- await this.createNewProjectButton.click({ timeout: 90000 });
91
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.createNewProjectButton, {
92
+ preAction: async () => {
93
+ await this.dismissOverlays();
94
+ },
95
+ totalTimeout: 120000,
96
+ visibilityTimeout: 10000,
97
+ });
82
98
  }
83
99
  async enterNewProjectName(name) {
84
100
  await this.projectNameInput.click({ timeout: 60000 });
@@ -164,7 +180,7 @@ class ModelerHomePage {
164
180
  }
165
181
  async createCrossComponentProjectFolder() {
166
182
  await (0, sleep_1.sleep)(15000);
167
- await this.clickMessageBanner();
183
+ await this.dismissOverlays();
168
184
  if (await this.crossComponentProjectFolder.isVisible()) {
169
185
  console.log('Cross Component Project folder already exists. Clicking into it');
170
186
  await this.clickCrossComponentProjectFolder();
@@ -26,6 +26,7 @@ declare class ModelerHomePage {
26
26
  readonly optionsButton: 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>;
@@ -75,10 +75,26 @@ class ModelerHomePage {
75
75
  hasText: formName,
76
76
  });
77
77
  }
78
+ async dismissOverlays() {
79
+ for (const locator of [
80
+ this.closeButton,
81
+ this.page.getByRole('button', { name: 'Close' }).first(),
82
+ this.messageBanner,
83
+ ]) {
84
+ await locator
85
+ .waitFor({ state: 'visible', timeout: 3000 })
86
+ .then(() => locator.click())
87
+ .catch(() => { });
88
+ }
89
+ }
78
90
  async clickCreateNewProjectButton() {
79
- await (0, test_1.expect)(this.createNewProjectButton).toBeVisible({ timeout: 60000 });
80
- await (0, test_1.expect)(this.createNewProjectButton).toBeEnabled({ timeout: 60000 });
81
- await this.createNewProjectButton.click({ timeout: 90000 });
91
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.createNewProjectButton, {
92
+ preAction: async () => {
93
+ await this.dismissOverlays();
94
+ },
95
+ totalTimeout: 120000,
96
+ visibilityTimeout: 10000,
97
+ });
82
98
  }
83
99
  async enterNewProjectName(name) {
84
100
  await this.projectNameInput.click({ timeout: 60000 });
@@ -164,7 +180,7 @@ class ModelerHomePage {
164
180
  }
165
181
  async createCrossComponentProjectFolder() {
166
182
  await (0, sleep_1.sleep)(15000);
167
- await this.clickMessageBanner();
183
+ await this.dismissOverlays();
168
184
  if (await this.crossComponentProjectFolder.isVisible()) {
169
185
  console.log('Cross Component Project folder already exists. Clicking into it');
170
186
  await this.clickCrossComponentProjectFolder();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.565",
3
+ "version": "0.0.566",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",