@camunda/e2e-test-suite 0.0.1385 → 0.0.1387

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.
@@ -18,6 +18,7 @@ declare class FormJsPage {
18
18
  readonly deploySubButton: Locator;
19
19
  readonly dialog: Locator;
20
20
  readonly deploySuccessNotification: Locator;
21
+ readonly clusterRequiredNotice: Locator;
21
22
  constructor(page: Page);
22
23
  generateAIForm(request?: string): Promise<void>;
23
24
  clickAIFormGeneratorButton(): Promise<void>;
@@ -25,6 +25,7 @@ class FormJsPage {
25
25
  deploySubButton;
26
26
  dialog;
27
27
  deploySuccessNotification;
28
+ clusterRequiredNotice;
28
29
  constructor(page) {
29
30
  this.page = page;
30
31
  this.processApplicationPage = new ProcessApplicationPage_1.ProcessApplicationPage(page);
@@ -73,6 +74,14 @@ class FormJsPage {
73
74
  .locator('.cds--toast-notification--success')
74
75
  .filter({ hasText: 'Form deployed!' }))
75
76
  .first();
77
+ // Hub's "Cluster required" notice (NoClusterNoticeModal), shown when the
78
+ // deploy gate reads zero clusters -- the org's cluster list has not loaded
79
+ // yet. It shares the dialog role with the deploy modal, so it is matched by
80
+ // its own title and its unique copy rather than by role alone.
81
+ this.clusterRequiredNotice = page
82
+ .getByRole('dialog', { name: 'Cluster required' })
83
+ .or(page.getByText('any clusters yet'))
84
+ .first();
76
85
  }
77
86
  async generateAIForm(
78
87
  // "date only, no time": asked for a plain date the generator sometimes
@@ -248,28 +257,41 @@ class FormJsPage {
248
257
  }
249
258
  async deployForm(clusterName) {
250
259
  await this.processApplicationPage.ensureStageCluster(clusterName);
251
- await this.clickDeployButton();
252
- await (0, test_1.expect)(this.dialog).toBeVisible({
253
- timeout: 30000,
254
- });
255
- // selectCluster clears the stage binding when the dialog does not offer the
256
- // cluster, so ensureStageCluster rebinds here and reports that it
257
- // navigated. Any other failure leaves the binding in place, it returns
258
- // false, and the original error stands. This path has no surrounding retry
259
- // loop, hence the one explicit second attempt.
260
- try {
261
- await this.selectCluster(clusterName);
262
- }
263
- catch (error) {
264
- const rebound = await this.processApplicationPage.ensureStageCluster(clusterName);
265
- if (!rebound) {
266
- throw error;
267
- }
260
+ // ensureStageCluster navigates back to the editor through Hub's /login
261
+ // round-trip, so the org's cluster list is still loading when Deploy is
262
+ // first clicked. Until it lands, Hub's deploy gate (checkIfNoClusterPresent)
263
+ // reads zero clusters and shows the non-recovering "Cluster required" notice
264
+ // instead of the deploy dialog -- the same transient runProcessInstance
265
+ // absorbs with its reload-and-retry loop. Reopen until the dialog offers the
266
+ // cluster: reload (not re-navigate) for the still-loading notice so it does
267
+ // not re-trigger the race, and rebind via ensureStageCluster for the
268
+ // distinct "binding did not take" case selectCluster clears.
269
+ const maxAttempts = 4;
270
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
268
271
  await this.clickDeployButton();
269
- await (0, test_1.expect)(this.dialog).toBeVisible({
270
- timeout: 30000,
271
- });
272
- await this.selectCluster(clusterName);
272
+ await (0, test_1.expect)(this.dialog).toBeVisible({ timeout: 30000 });
273
+ if (await this.clusterRequiredNotice.isVisible().catch(() => false)) {
274
+ if (attempt === maxAttempts) {
275
+ throw new Error(`Hub showed "Cluster required" for "${clusterName}" on every ` +
276
+ "attempt: the org's cluster list never loaded after navigation.");
277
+ }
278
+ await this.page.reload({ waitUntil: 'domcontentloaded' });
279
+ await (0, test_1.expect)(this.deployButton).toBeVisible({ timeout: 60000 });
280
+ continue;
281
+ }
282
+ try {
283
+ await this.selectCluster(clusterName);
284
+ break;
285
+ }
286
+ catch (error) {
287
+ if (attempt === maxAttempts) {
288
+ throw error;
289
+ }
290
+ const rebound = await this.processApplicationPage.ensureStageCluster(clusterName);
291
+ if (!rebound) {
292
+ throw error;
293
+ }
294
+ }
273
295
  }
274
296
  await this.selectOnlyThisResource();
275
297
  await this.clickDeploySubButton();
@@ -18,7 +18,16 @@ class TaskPanelPage {
18
18
  processesInfoText;
19
19
  constructor(page) {
20
20
  this.page = page;
21
- this.availableTasks = page.getByTitle('Available tasks');
21
+ // The task-list wrapper's `title="Available tasks"` was removed on
22
+ // camunda/camunda `main` (8.11-SNAPSHOT) by #65074 ("truncate long task
23
+ // card labels instead of overflowing the panel"), so
24
+ // `getByTitle('Available tasks')` matches nothing on the redesigned shell
25
+ // 8.11 serves and every openTask/completeTask scoped through it times out.
26
+ // The `<section aria-label="Tasks side panel">` that wraps the panel is
27
+ // present on both shells -- it is what the product's own
28
+ // qa/c8-orchestration-cluster-e2e-test-suite TaskPanelPage now anchors on
29
+ // (pages/SM-8.10 was migrated for the same reason).
30
+ this.availableTasks = page.getByRole('region', { name: 'Tasks side panel' });
22
31
  // 8.10 still serves Tasklist on the Carbon shell, so filtering lives in
23
32
  // the collapsible filter panel: the collapsed rail carries the expand
24
33
  // control (aria-controls="task-nav-bar") and the expanded nav lists each
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1385",
3
+ "version": "0.0.1387",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",