@camunda/e2e-test-suite 0.0.814 → 0.0.816

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.
@@ -509,13 +509,19 @@ class ConsoleOrganizationPage {
509
509
  await this.organizationManagementLink.click();
510
510
  }
511
511
  async deleteAllGroups() {
512
- // Delete groups one at a time: each confirmed deletion re-renders and
513
- // re-indexes the list, so always operate on the first remaining row
514
- // instead of iterating by index over a mutating collection.
515
- while ((await this.deleteButton.count()) > 0) {
512
+ // Delete groups one at a time. After each confirmed deletion the Console
513
+ // groups table refetches and re-renders asynchronously, so the row count
514
+ // can still include the just-deleted row for a moment. Wait for the count
515
+ // to actually drop before targeting the next row: clicking a delete button
516
+ // while its row is being removed detaches the element from the DOM and the
517
+ // click never lands (retries against a continuously re-rendering table).
518
+ let remaining = await this.deleteButton.count();
519
+ while (remaining > 0) {
516
520
  await this.deleteButton.first().click({ timeout: 60000 });
517
521
  await this.deleteSubButton.click({ timeout: 60000 });
518
522
  await (0, test_1.expect)(this.deleteSubButton).not.toBeVisible({ timeout: 60000 });
523
+ remaining -= 1;
524
+ await (0, test_1.expect)(this.deleteButton).toHaveCount(remaining, { timeout: 60000 });
519
525
  }
520
526
  }
521
527
  }
@@ -8,6 +8,7 @@ declare class ConnectorMarketplacePage {
8
8
  readonly replaceResourceButton: Locator;
9
9
  readonly addToProjectButton: Locator;
10
10
  readonly saveAsCopyButton: Locator;
11
+ readonly importModal: Locator;
11
12
  constructor(page: Page);
12
13
  clickSearchForConnectorTextbox(): Promise<void>;
13
14
  fillSearchForConnectorTextbox(connectorName: string): Promise<void>;
@@ -10,6 +10,7 @@ class ConnectorMarketplacePage {
10
10
  replaceResourceButton;
11
11
  addToProjectButton;
12
12
  saveAsCopyButton;
13
+ importModal;
13
14
  constructor(page) {
14
15
  this.page = page;
15
16
  this.searchForConnectorTextbox = page.getByPlaceholder('Search for a connector');
@@ -25,6 +26,7 @@ class ConnectorMarketplacePage {
25
26
  name: 'Add to project',
26
27
  });
27
28
  this.saveAsCopyButton = page.getByRole('button', { name: 'Save as copy' });
29
+ this.importModal = page.locator('[data-test="import-modal"]');
28
30
  }
29
31
  async clickSearchForConnectorTextbox() {
30
32
  await this.searchForConnectorTextbox.click({ timeout: 60000 });
@@ -60,26 +62,47 @@ class ConnectorMarketplacePage {
60
62
  this.replaceResourceButton,
61
63
  ];
62
64
  let imported = false;
63
- // The first probe gets a long timeout to absorb the modal's slow (~20s)
65
+ // Wait for each candidate button with waitFor(), NOT isVisible():
66
+ // isVisible() checks the current state and returns immediately, so it fires
67
+ // before the ~20s-slow modal has rendered and reports every button absent —
68
+ // the import is never confirmed and the modal is left blocking the canvas.
69
+ // The first probe gets a long timeout to absorb the modal's slow
64
70
  // appearance; once the modal is up the remaining buttons resolve at once.
65
71
  let probeTimeout = 60000;
66
72
  for (const button of importConfirmButtons) {
67
- if (await button.isVisible({ timeout: probeTimeout }).catch(() => false)) {
73
+ const buttonVisible = await button
74
+ .waitFor({ state: 'visible', timeout: probeTimeout })
75
+ .then(() => true)
76
+ .catch(() => false);
77
+ if (buttonVisible) {
68
78
  await button.click({ timeout: 30000 });
69
79
  imported = true;
70
80
  break;
71
81
  }
72
82
  probeTimeout = 5000;
73
83
  }
74
- // After a successful import, wait for the snackbar (confirms the connector
75
- // template was received by the modeler) then close the marketplace panel so
76
- // the diagram canvas is unblocked before the caller tries to select the
77
- // newly installed connector.
84
+ // After a successful import, unblock the diagram canvas before the caller
85
+ // selects the newly installed connector.
78
86
  if (imported) {
79
- await this.snackbar
80
- .waitFor({ state: 'visible', timeout: 60000 })
87
+ // Wait for the "Import resource" modal to close after confirming — while
88
+ // it is still up its subtree intercepts pointer events on the canvas and
89
+ // any downstream change-element click retries fruitlessly against it.
90
+ await this.importModal
91
+ .waitFor({ state: 'hidden', timeout: 60000 })
81
92
  .catch(() => { });
82
- if (await this.closeButton.isVisible({ timeout: 5000 }).catch(() => false)) {
93
+ // The modeler closes the marketplace panel itself once the import
94
+ // finishes, so only close it if it is somehow still open — gated on the
95
+ // marketplace's own search box. A bare getByRole('button', {name:
96
+ // 'Close'}) would otherwise match the properties panel's "Close" (×)
97
+ // button and collapse it, hiding the connector's "Input" tab the caller
98
+ // needs next. (Do not idle-wait on the snackbar here either: it never
99
+ // matches the import toast, so it only stalls ~60s, during which the
100
+ // modeler auto-collapses the properties panel.)
101
+ const marketplaceStillOpen = await this.searchForConnectorTextbox
102
+ .isVisible()
103
+ .catch(() => false);
104
+ if (marketplaceStillOpen &&
105
+ (await this.closeButton.isVisible({ timeout: 5000 }).catch(() => false))) {
83
106
  await this.closeButton.click({ timeout: 10000 });
84
107
  }
85
108
  }
@@ -519,12 +519,13 @@ _8_7_1.test.describe('Web Modeler User Flow Tests', () => {
519
519
  password: password,
520
520
  });
521
521
  // navigateAfterInvitationLink lands the invited user in the SHARED org's
522
- // Modeler home (it logs in on the invitation flow rather than
523
- // re-authenticating into the personal org), so the shared project is
524
- // present. Assert its visibility directly no session-breaking reload.
525
- await (0, test_1.expect)(modelerHomePage.crossComponentProjectFolder).toBeVisible({
526
- timeout: 120000,
527
- });
522
+ // Modeler home. The project-collaborator grant propagates asynchronously,
523
+ // and the Modeler home fetches the project list only on load (it does not
524
+ // live-refresh), so the shared project can be absent from the first fetch
525
+ // (observed: the org's /projects returned an empty list right after the
526
+ // invited user logged in) and never appears without a reload. Reload and
527
+ // retry until the freshly granted project shows up.
528
+ await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(modelerHomePage, modelerHomePage.crossComponentProjectFolder, 'Cross Component Test Project', 90000, 8);
528
529
  });
529
530
  await _8_7_1.test.step('Log out from Second User', async () => {
530
531
  await settingsPage.clickOpenSettingsButton();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.814",
3
+ "version": "0.0.816",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",