@camunda/e2e-test-suite 0.0.549 → 0.0.550
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.
|
@@ -73,12 +73,16 @@ class ModelerHomePage {
|
|
|
73
73
|
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.createNewProjectButton, {
|
|
74
74
|
totalTimeout: 30000,
|
|
75
75
|
});
|
|
76
|
-
//
|
|
77
|
-
//
|
|
76
|
+
// Modals (WhatsNew, "BPMN conditional events", etc.) render lazily after
|
|
77
|
+
// page load and intercept clicks on the button underneath. Dismiss them.
|
|
78
78
|
await this.closeButton
|
|
79
79
|
.waitFor({ state: 'visible', timeout: 5000 })
|
|
80
80
|
.then(() => this.closeButton.click())
|
|
81
81
|
.catch(() => { });
|
|
82
|
+
await this.modalCloseButton
|
|
83
|
+
.waitFor({ state: 'visible', timeout: 2000 })
|
|
84
|
+
.then(() => this.modalCloseButton.click())
|
|
85
|
+
.catch(() => { });
|
|
82
86
|
await this.createNewProjectButton.click();
|
|
83
87
|
}
|
|
84
88
|
async enterNewProjectName(name) {
|
|
@@ -23,6 +23,7 @@ declare class ModelerHomePage {
|
|
|
23
23
|
readonly uploadFilesButton: Locator;
|
|
24
24
|
readonly messageBanner: Locator;
|
|
25
25
|
readonly closeButton: Locator;
|
|
26
|
+
readonly modalCloseButton: Locator;
|
|
26
27
|
readonly idpTemplateOption: Locator;
|
|
27
28
|
readonly idpApplicationNameInput: Locator;
|
|
28
29
|
readonly dialog: Locator;
|
|
@@ -28,6 +28,7 @@ class ModelerHomePage {
|
|
|
28
28
|
uploadFilesButton;
|
|
29
29
|
messageBanner;
|
|
30
30
|
closeButton;
|
|
31
|
+
modalCloseButton;
|
|
31
32
|
idpTemplateOption;
|
|
32
33
|
idpApplicationNameInput;
|
|
33
34
|
dialog;
|
|
@@ -71,6 +72,7 @@ class ModelerHomePage {
|
|
|
71
72
|
this.uploadFilesButton = page.getByRole('menuitem', { name: 'Upload files' });
|
|
72
73
|
this.messageBanner = page.locator('[data-test="close-top-banner"]');
|
|
73
74
|
this.closeButton = page.getByRole('button', { name: 'Got it - Dismiss' });
|
|
75
|
+
this.modalCloseButton = page.locator('.cds--modal.is-visible .cds--modal-close');
|
|
74
76
|
this.idpTemplateOption = page
|
|
75
77
|
.locator('[data-test="create-idp-application"]')
|
|
76
78
|
.getByText('IDP Application');
|
|
@@ -85,6 +87,16 @@ class ModelerHomePage {
|
|
|
85
87
|
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.createNewProjectButton, {
|
|
86
88
|
totalTimeout: 30000,
|
|
87
89
|
});
|
|
90
|
+
// Modals (WhatsNew, "BPMN conditional events", etc.) render lazily after
|
|
91
|
+
// page load and intercept clicks on the button underneath. Dismiss them.
|
|
92
|
+
await this.closeButton
|
|
93
|
+
.waitFor({ state: 'visible', timeout: 5000 })
|
|
94
|
+
.then(() => this.closeButton.click())
|
|
95
|
+
.catch(() => { });
|
|
96
|
+
await this.modalCloseButton
|
|
97
|
+
.waitFor({ state: 'visible', timeout: 2000 })
|
|
98
|
+
.then(() => this.modalCloseButton.click())
|
|
99
|
+
.catch(() => { });
|
|
88
100
|
await this.createNewProjectButton.click();
|
|
89
101
|
}
|
|
90
102
|
async enterNewProjectName(name) {
|
|
@@ -177,10 +189,15 @@ class ModelerHomePage {
|
|
|
177
189
|
}
|
|
178
190
|
async clickMessageBanner() {
|
|
179
191
|
try {
|
|
180
|
-
|
|
181
|
-
this.
|
|
182
|
-
this.
|
|
183
|
-
|
|
192
|
+
const banner = this.messageBanner
|
|
193
|
+
.or(this.closeButton)
|
|
194
|
+
.or(this.modalCloseButton);
|
|
195
|
+
if (await banner.isVisible({ timeout: 2000 })) {
|
|
196
|
+
await banner.click();
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
console.log('No banner or close button found to click');
|
|
200
|
+
}
|
|
184
201
|
}
|
|
185
202
|
catch {
|
|
186
203
|
console.log('No banner or close button found to click');
|
|
@@ -23,6 +23,7 @@ declare class ModelerHomePage {
|
|
|
23
23
|
readonly uploadFilesButton: Locator;
|
|
24
24
|
readonly messageBanner: Locator;
|
|
25
25
|
readonly closeButton: Locator;
|
|
26
|
+
readonly modalCloseButton: Locator;
|
|
26
27
|
constructor(page: Page);
|
|
27
28
|
clickCreateNewProjectButton(): Promise<void>;
|
|
28
29
|
enterNewProjectName(name: string): Promise<void>;
|
|
@@ -28,6 +28,7 @@ class ModelerHomePage {
|
|
|
28
28
|
uploadFilesButton;
|
|
29
29
|
messageBanner;
|
|
30
30
|
closeButton;
|
|
31
|
+
modalCloseButton;
|
|
31
32
|
constructor(page) {
|
|
32
33
|
this.page = page;
|
|
33
34
|
this.modelerPageBanner = page
|
|
@@ -71,11 +72,22 @@ class ModelerHomePage {
|
|
|
71
72
|
this.uploadFilesButton = page.getByRole('menuitem', { name: 'Upload files' });
|
|
72
73
|
this.messageBanner = page.locator('[data-test="close-top-banner"]');
|
|
73
74
|
this.closeButton = page.getByRole('button', { name: 'Got it - Dismiss' });
|
|
75
|
+
this.modalCloseButton = page.locator('.cds--modal.is-visible .cds--modal-close');
|
|
74
76
|
}
|
|
75
77
|
async clickCreateNewProjectButton() {
|
|
76
78
|
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.createNewProjectButton, {
|
|
77
79
|
totalTimeout: 60000,
|
|
78
80
|
});
|
|
81
|
+
// Modals (WhatsNew, "BPMN conditional events", etc.) render lazily after
|
|
82
|
+
// page load and intercept clicks on the button underneath. Dismiss them.
|
|
83
|
+
await this.closeButton
|
|
84
|
+
.waitFor({ state: 'visible', timeout: 5000 })
|
|
85
|
+
.then(() => this.closeButton.click())
|
|
86
|
+
.catch(() => { });
|
|
87
|
+
await this.modalCloseButton
|
|
88
|
+
.waitFor({ state: 'visible', timeout: 2000 })
|
|
89
|
+
.then(() => this.modalCloseButton.click())
|
|
90
|
+
.catch(() => { });
|
|
79
91
|
await this.createNewProjectButton.click();
|
|
80
92
|
}
|
|
81
93
|
async enterNewProjectName(name) {
|
|
@@ -189,10 +201,15 @@ class ModelerHomePage {
|
|
|
189
201
|
}
|
|
190
202
|
async clickMessageBanner() {
|
|
191
203
|
try {
|
|
192
|
-
|
|
193
|
-
this.
|
|
194
|
-
this.
|
|
195
|
-
|
|
204
|
+
const banner = this.messageBanner
|
|
205
|
+
.or(this.closeButton)
|
|
206
|
+
.or(this.modalCloseButton);
|
|
207
|
+
if (await banner.isVisible({ timeout: 2000 })) {
|
|
208
|
+
await banner.click();
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
console.log('No banner or close button found to click');
|
|
212
|
+
}
|
|
196
213
|
}
|
|
197
214
|
catch {
|
|
198
215
|
console.log('No banner or close button found to click');
|