@camunda/e2e-test-suite 0.0.985 → 0.0.987

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.
@@ -48,6 +48,7 @@ declare class ModelerHomePage {
48
48
  createCrossComponentProjectFolder(): Promise<void>;
49
49
  clickManageButton(retries?: number): Promise<void>;
50
50
  clickUploadFilesButton(): Promise<void>;
51
+ dismissBlockingDialog(): Promise<void>;
51
52
  clickMessageBanner(): Promise<void>;
52
53
  selectCluster(clusterName: string): Promise<void>;
53
54
  clickIdpApplicationTemplateOption(): Promise<void>;
@@ -244,24 +244,17 @@ class ModelerHomePage {
244
244
  async clickCrossComponentProjectFolder() {
245
245
  await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.crossComponentProjectFolder, {
246
246
  visibilityTimeout: 60000,
247
- totalTimeout: 180000,
247
+ // Widened from 180s: dismissing the announcement dialog costs up to ~25s
248
+ // of settle-and-probe per attempt, which at 180s left room for barely one
249
+ // retry after an intercepted click had already burnt its 60s.
250
+ totalTimeout: 240000,
248
251
  maxRetries: 5,
249
252
  preAction: async () => {
250
- // A Carbon modal (`.cds--modal.is-visible`) sometimes covers the
251
- // project folder and intercepts pointer events; clickMessageBanner
252
- // only handles a single banner/close button so it doesn't dismiss
253
- // the modal. Escape it explicitly first — same pattern 8.7 already
254
- // uses for the same symptom.
255
- try {
256
- const blockingModal = this.page.locator('.cds--modal.is-visible');
257
- if ((await blockingModal.count()) > 0) {
258
- await this.page.keyboard.press('Escape');
259
- await (0, sleep_1.sleep)(1000);
260
- }
261
- }
262
- catch {
263
- // No blocking modal to dismiss
264
- }
253
+ // Dismiss the dialog BEFORE the banner: the Modeler home page can
254
+ // stack both at once, and clickMessageBanner resolves an
255
+ // `.or(...).first()` union in DOM order — the top banner comes first,
256
+ // so on its own it closes the banner and leaves the dialog open.
257
+ await this.dismissBlockingDialog();
265
258
  await this.clickMessageBanner();
266
259
  },
267
260
  postAction: async () => {
@@ -315,6 +308,39 @@ class ModelerHomePage {
315
308
  async clickUploadFilesButton() {
316
309
  await this.uploadFilesButton.click({ timeout: 60000 });
317
310
  }
311
+ // The release-announcement dialog ("New features" / "Check out our new
312
+ // release") renders over the projects list and swallows every click on it:
313
+ // Playwright reports the project link as visible, enabled and stable, then
314
+ // times out with the modal overlay "intercepts pointer events". Pressing
315
+ // Escape blindly does not help — Carbon only closes the dialog when focus is
316
+ // inside it, and focus sits on the body after a page load — so close it via
317
+ // its own controls and confirm it is gone before moving on.
318
+ // Anchored on the dismiss button rather than on the dialog: the Modeler home
319
+ // page keeps half a dozen `role="dialog"` containers mounted and hidden, so a
320
+ // dialog-first lookup resolves to a hidden one and reports "nothing to
321
+ // dismiss" while the announcement is still covering the projects list.
322
+ //
323
+ // The dialog is also mounted a beat after the projects list, so let the page
324
+ // settle before looking for it: probing the instant a load finishes lost that
325
+ // race on about half the attempts, and the dialog that appeared right after
326
+ // then swallowed the click.
327
+ async dismissBlockingDialog() {
328
+ await this.page
329
+ .waitForLoadState('networkidle', { timeout: 15000 })
330
+ .catch(() => false);
331
+ for (let attempt = 0; attempt < 3; attempt++) {
332
+ const isOpen = await this.closeButton
333
+ .waitFor({ state: 'visible', timeout: 10000 })
334
+ .then(() => true)
335
+ .catch(() => false);
336
+ if (!isOpen)
337
+ return;
338
+ await this.closeButton.click({ timeout: 5000 }).catch(() => { });
339
+ await this.closeButton
340
+ .waitFor({ state: 'hidden', timeout: 5000 })
341
+ .catch(() => false);
342
+ }
343
+ }
318
344
  async clickMessageBanner() {
319
345
  try {
320
346
  const button = this.messageBanner.or(this.closeButton).first();
@@ -18,7 +18,25 @@
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.createInstances = exports.deploy = void 0;
20
20
  const zeebe_node_1 = require("zeebe-node");
21
- const zbc = new zeebe_node_1.ZBClient(); // localhost:26500 || ZEEBE_GATEWAY_ADDRESS
21
+ // zeebe-node defaults to `maxRetries: -1`, which its retryOnFailure() turns
22
+ // into `forever: true` with at most 5s between attempts. So an unreachable
23
+ // gateway is retried indefinitely and nothing ever throws: run 32136136238
24
+ // spent 3h18m emitting 75,236 "[deployWorkflow]: Attempt N (max: -1)" lines,
25
+ // reached attempt 719, and still reported the job as successful.
26
+ //
27
+ // Bound it so an unreachable broker surfaces as a fast, visible test failure
28
+ // instead of silently consuming the job budget. Roughly 15 attempts against
29
+ // the 5s ceiling is about a minute of grace -- enough to ride out a gateway
30
+ // restart, short enough to fail honestly.
31
+ //
32
+ // Must be > 0: ZBClient resolves this as `options.maxRetries || DEFAULT`, so a
33
+ // 0 would fall through to the -1 default and restore the infinite loop.
34
+ const parsedMaxRetries = Number(process.env.ZEEBE_CLIENT_MAX_RETRIES);
35
+ const maxRetries = Number.isFinite(parsedMaxRetries) && parsedMaxRetries > 0
36
+ ? parsedMaxRetries
37
+ : 15;
38
+ // localhost:26500 || ZEEBE_GATEWAY_ADDRESS
39
+ const zbc = new zeebe_node_1.ZBClient({ maxRetries });
22
40
  const deploy = (processNames) => {
23
41
  return zbc.deployProcess(processNames);
24
42
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.985",
3
+ "version": "0.0.987",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",