@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.
@@ -42,5 +42,6 @@ declare class ModelerHomePage {
42
42
  clickManageButton(): Promise<void>;
43
43
  clickUploadFilesButton(): Promise<void>;
44
44
  clickMessageBanner(): Promise<void>;
45
+ private overlayBecameVisible;
45
46
  }
46
47
  export { ModelerHomePage };
@@ -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
- try {
262
- const banner = this.messageBanner
263
- .or(this.closeButton)
264
- .or(this.modalCloseButton);
265
- await banner.waitFor({ state: 'visible', timeout: 5000 });
266
- await banner.click();
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
- catch {
269
- console.log('No banner or close button found to click');
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
- try {
252
- const banner = this.messageBanner
253
- .or(this.closeButton)
254
- .or(this.modalCloseButton);
255
- await banner.waitFor({ state: 'visible', timeout: 5000 });
256
- await banner.click();
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
- catch {
259
- console.log('No banner or close button found to click');
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
  }
@@ -42,5 +42,6 @@ declare class ModelerHomePage {
42
42
  clickManageButton(): Promise<void>;
43
43
  clickUploadFilesButton(): Promise<void>;
44
44
  clickMessageBanner(): Promise<void>;
45
+ private overlayBecameVisible;
45
46
  }
46
47
  export { ModelerHomePage };
@@ -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
- try {
245
- const banner = this.messageBanner
246
- .or(this.closeButton)
247
- .or(this.modalCloseButton);
248
- await banner.waitFor({ state: 'visible', timeout: 5000 });
249
- await banner.click();
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
- catch {
252
- console.log('No banner or close button found to click');
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.935",
3
+ "version": "0.0.936",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",