@camunda/e2e-test-suite 0.0.935 → 0.0.936
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.
- package/dist/pages/SM-8.10/ModelerHomePage.d.ts +1 -0
- package/dist/pages/SM-8.10/ModelerHomePage.js +28 -8
- package/dist/pages/SM-8.8/ModelerHomePage.d.ts +1 -0
- package/dist/pages/SM-8.8/ModelerHomePage.js +28 -8
- package/dist/pages/SM-8.9/ModelerHomePage.d.ts +1 -0
- package/dist/pages/SM-8.9/ModelerHomePage.js +28 -8
- package/package.json +1 -1
|
@@ -257,17 +257,37 @@ class ModelerHomePage {
|
|
|
257
257
|
async clickUploadFilesButton() {
|
|
258
258
|
await this.uploadFilesButton.click({ timeout: 60000 });
|
|
259
259
|
}
|
|
260
|
+
// Dismisses both Modeler overlays that can sit over the project list.
|
|
260
261
|
async clickMessageBanner() {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
.
|
|
265
|
-
|
|
266
|
-
|
|
262
|
+
// Maintenance/downtime banner
|
|
263
|
+
if (await this.overlayBecameVisible(this.messageBanner)) {
|
|
264
|
+
try {
|
|
265
|
+
await this.messageBanner.click();
|
|
266
|
+
}
|
|
267
|
+
catch {
|
|
268
|
+
// Banner dismissed itself between the probe and the click
|
|
269
|
+
}
|
|
267
270
|
}
|
|
268
|
-
|
|
269
|
-
|
|
271
|
+
// "New features" modal, dismissed after the banner rather than through an
|
|
272
|
+
// .or() chain: that chain stopped at whichever overlay matched first,
|
|
273
|
+
// leaving the other one on top to intercept the caller's next click.
|
|
274
|
+
if (await this.overlayBecameVisible(this.closeButton)) {
|
|
275
|
+
try {
|
|
276
|
+
await this.closeButton.click();
|
|
277
|
+
}
|
|
278
|
+
catch {
|
|
279
|
+
// Modal dismissed itself between the probe and the click
|
|
280
|
+
}
|
|
270
281
|
}
|
|
271
282
|
}
|
|
283
|
+
// Probe with waitFor, not isVisible: the "New features" modal renders lazily
|
|
284
|
+
// after page load, and isVisible resolves immediately — Playwright ignores
|
|
285
|
+
// its timeout option — so it misses an overlay that has yet to paint.
|
|
286
|
+
async overlayBecameVisible(overlay) {
|
|
287
|
+
return overlay
|
|
288
|
+
.waitFor({ state: 'visible', timeout: 2000 })
|
|
289
|
+
.then(() => true)
|
|
290
|
+
.catch(() => false);
|
|
291
|
+
}
|
|
272
292
|
}
|
|
273
293
|
exports.ModelerHomePage = ModelerHomePage;
|
|
@@ -46,6 +46,7 @@ declare class ModelerHomePage {
|
|
|
46
46
|
clickManageButton(): Promise<void>;
|
|
47
47
|
clickUploadFilesButton(): Promise<void>;
|
|
48
48
|
clickMessageBanner(): Promise<void>;
|
|
49
|
+
private overlayBecameVisible;
|
|
49
50
|
clickIdpApplicationTemplateOption(): Promise<void>;
|
|
50
51
|
enterIdpApplicationName(name: string): Promise<void>;
|
|
51
52
|
selectCluster(clusterName: string): Promise<void>;
|
|
@@ -247,18 +247,38 @@ class ModelerHomePage {
|
|
|
247
247
|
async clickUploadFilesButton() {
|
|
248
248
|
await this.uploadFilesButton.click({ timeout: 60000 });
|
|
249
249
|
}
|
|
250
|
+
// Dismisses both Modeler overlays that can sit over the project list.
|
|
250
251
|
async clickMessageBanner() {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
.
|
|
255
|
-
|
|
256
|
-
|
|
252
|
+
// Maintenance/downtime banner
|
|
253
|
+
if (await this.overlayBecameVisible(this.messageBanner)) {
|
|
254
|
+
try {
|
|
255
|
+
await this.messageBanner.click();
|
|
256
|
+
}
|
|
257
|
+
catch {
|
|
258
|
+
// Banner dismissed itself between the probe and the click
|
|
259
|
+
}
|
|
257
260
|
}
|
|
258
|
-
|
|
259
|
-
|
|
261
|
+
// "New features" modal, dismissed after the banner rather than through an
|
|
262
|
+
// .or() chain: that chain stopped at whichever overlay matched first,
|
|
263
|
+
// leaving the other one on top to intercept the caller's next click.
|
|
264
|
+
if (await this.overlayBecameVisible(this.closeButton)) {
|
|
265
|
+
try {
|
|
266
|
+
await this.closeButton.click();
|
|
267
|
+
}
|
|
268
|
+
catch {
|
|
269
|
+
// Modal dismissed itself between the probe and the click
|
|
270
|
+
}
|
|
260
271
|
}
|
|
261
272
|
}
|
|
273
|
+
// Probe with waitFor, not isVisible: the "New features" modal renders lazily
|
|
274
|
+
// after page load, and isVisible resolves immediately — Playwright ignores
|
|
275
|
+
// its timeout option — so it misses an overlay that has yet to paint.
|
|
276
|
+
async overlayBecameVisible(overlay) {
|
|
277
|
+
return overlay
|
|
278
|
+
.waitFor({ state: 'visible', timeout: 2000 })
|
|
279
|
+
.then(() => true)
|
|
280
|
+
.catch(() => false);
|
|
281
|
+
}
|
|
262
282
|
async clickIdpApplicationTemplateOption() {
|
|
263
283
|
await this.idpTemplateOption.click({ timeout: 120000 });
|
|
264
284
|
}
|
|
@@ -240,17 +240,37 @@ class ModelerHomePage {
|
|
|
240
240
|
async clickUploadFilesButton() {
|
|
241
241
|
await this.uploadFilesButton.click({ timeout: 60000 });
|
|
242
242
|
}
|
|
243
|
+
// Dismisses both Modeler overlays that can sit over the project list.
|
|
243
244
|
async clickMessageBanner() {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
.
|
|
248
|
-
|
|
249
|
-
|
|
245
|
+
// Maintenance/downtime banner
|
|
246
|
+
if (await this.overlayBecameVisible(this.messageBanner)) {
|
|
247
|
+
try {
|
|
248
|
+
await this.messageBanner.click();
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
// Banner dismissed itself between the probe and the click
|
|
252
|
+
}
|
|
250
253
|
}
|
|
251
|
-
|
|
252
|
-
|
|
254
|
+
// "New features" modal, dismissed after the banner rather than through an
|
|
255
|
+
// .or() chain: that chain stopped at whichever overlay matched first,
|
|
256
|
+
// leaving the other one on top to intercept the caller's next click.
|
|
257
|
+
if (await this.overlayBecameVisible(this.closeButton)) {
|
|
258
|
+
try {
|
|
259
|
+
await this.closeButton.click();
|
|
260
|
+
}
|
|
261
|
+
catch {
|
|
262
|
+
// Modal dismissed itself between the probe and the click
|
|
263
|
+
}
|
|
253
264
|
}
|
|
254
265
|
}
|
|
266
|
+
// Probe with waitFor, not isVisible: the "New features" modal renders lazily
|
|
267
|
+
// after page load, and isVisible resolves immediately — Playwright ignores
|
|
268
|
+
// its timeout option — so it misses an overlay that has yet to paint.
|
|
269
|
+
async overlayBecameVisible(overlay) {
|
|
270
|
+
return overlay
|
|
271
|
+
.waitFor({ state: 'visible', timeout: 2000 })
|
|
272
|
+
.then(() => true)
|
|
273
|
+
.catch(() => false);
|
|
274
|
+
}
|
|
255
275
|
}
|
|
256
276
|
exports.ModelerHomePage = ModelerHomePage;
|