@camunda/e2e-test-suite 0.0.1021 → 0.0.1022

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.
@@ -16,6 +16,7 @@ declare class ClusterSecretsPage {
16
16
  readonly confirmDeleteInput: Locator;
17
17
  constructor(page: Page);
18
18
  deleteConnectorSecretsIfExist(): Promise<void>;
19
+ private dismissOpenModal;
19
20
  clickCreateNewSecretButton(clusterName: string): Promise<void>;
20
21
  clickClusterBanner(): Promise<void>;
21
22
  clickCluster(name: string): Promise<void>;
@@ -38,14 +38,25 @@ class ClusterSecretsPage {
38
38
  name: 'Delete',
39
39
  exact: true,
40
40
  });
41
- this.deleteConnectorSecretSubButton = page.getByRole('button', {
42
- name: 'danger Delete',
43
- });
41
+ // The confirmation modal's destructive action is a plain "Delete" button
42
+ // (Console renders Carbon's ModalFooter danger button, whose accessible
43
+ // name is just its label). The old 'danger Delete' name came from a Carbon
44
+ // version that prefixed danger buttons with a visually-hidden kind label;
45
+ // it matches nothing today, so the click timed out and left the modal open
46
+ // on top of the page. Scoped to the dialog so it cannot collide with the
47
+ // row-level Delete control behind it.
48
+ this.deleteConnectorSecretSubButton = page
49
+ .getByRole('dialog')
50
+ .getByRole('button', { name: 'Delete', exact: true });
44
51
  this.dialog = page.getByRole('dialog');
45
52
  this.clusterBanner = this.page
46
53
  .getByRole('banner')
47
54
  .getByRole('link', { name: 'Clusters' });
48
- this.clusterLink = (name) => page.getByRole('link', { name: name });
55
+ // exact: true because console-user-flows.spec.ts creates a second cluster
56
+ // called "UI Test Cluster" in the same org -- a substring match on
57
+ // "Test Cluster" then resolves to both links and fails on strict mode.
58
+ // ClusterPage's own cluster locators already match exactly.
59
+ this.clusterLink = (name) => page.getByRole('link', { name: name, exact: true });
49
60
  this.clusterSecretTab = this.page.getByRole('tab', {
50
61
  name: 'Connector Secrets',
51
62
  });
@@ -95,13 +106,39 @@ class ClusterSecretsPage {
95
106
  break;
96
107
  }
97
108
  }
98
- await (0, test_1.expect)(this.optionsButton).not.toBeVisible({
99
- timeout: 30000,
100
- });
109
+ // Console auto-provisions CAMUNDA_PROVIDED_LLM_* secrets whose Delete
110
+ // menu item is disabled, so the table is never empty once the sweep is
111
+ // done. A page-wide not.toBeVisible() therefore matched three Options
112
+ // buttons at once (strict mode violation) while asserting something that
113
+ // is no longer true. The post-condition this helper actually owns is
114
+ // that nothing *deletable* is left behind.
115
+ const deletableSecretRows = this.page
116
+ .getByRole('row')
117
+ .filter({ has: this.page.getByRole('cell', { name: 'Options' }) })
118
+ .filter({ hasNotText: 'CAMUNDA_PROVIDED_' });
119
+ await (0, test_1.expect)(deletableSecretRows).toHaveCount(0, { timeout: 30000 });
101
120
  }
102
121
  catch (error) {
103
122
  console.error('Error during Connector Secrets deletion: ', error);
123
+ // A half-completed delete leaves Carbon's confirmation modal on screen,
124
+ // where its overlay swallows pointer events for every later click -- the
125
+ // next "Create new secret" click then burns its whole timeout against
126
+ // the overlay instead of the button. Cleanup must never hand the page
127
+ // back with a modal still open.
128
+ await this.dismissOpenModal();
129
+ }
130
+ }
131
+ // Closes whichever Carbon modal is currently on screen, and waits for it to
132
+ // actually leave the DOM rather than assuming a fixed delay.
133
+ async dismissOpenModal() {
134
+ const openModal = this.page.locator('.cds--modal.is-visible');
135
+ if ((await openModal.count().catch(() => 0)) === 0) {
136
+ return;
104
137
  }
138
+ await this.page.keyboard.press('Escape').catch(() => { });
139
+ await (0, test_1.expect)(openModal)
140
+ .toHaveCount(0, { timeout: 10000 })
141
+ .catch(() => { });
105
142
  }
106
143
  async clickCreateNewSecretButton(clusterName) {
107
144
  try {
@@ -118,16 +155,7 @@ class ClusterSecretsPage {
118
155
  }
119
156
  }
120
157
  async clickClusterBanner() {
121
- try {
122
- const blockingModal = this.page.locator('.cds--modal.is-visible');
123
- if ((await blockingModal.count()) > 0) {
124
- await this.page.keyboard.press('Escape');
125
- await (0, sleep_1.sleep)(1000);
126
- }
127
- }
128
- catch (_e) {
129
- // no blocking modal to dismiss
130
- }
158
+ await this.dismissOpenModal();
131
159
  await (0, test_1.expect)(this.clusterBanner).toBeVisible({ timeout: 30000 });
132
160
  await this.clusterBanner.click({ timeout: 60000 });
133
161
  }
@@ -89,8 +89,14 @@ async function modelRestConnector(modelerCreatePage, connectorSettingsPage, proc
89
89
  username: '',
90
90
  password: '',
91
91
  }) {
92
+ // 120s to match every other properties-panel wait in the 8.7 suite
93
+ // (modelJobWorkerDiagram, clickDiagramBreadcrumb and the specs' own waits all
94
+ // allow 90-200s). 30s was the lone outlier here and the bpmn-js properties
95
+ // panel regularly needs longer than that to mount on a freshly created
96
+ // diagram, which failed the REST connector flows before a single element was
97
+ // modelled.
92
98
  await (0, test_1.expect)(modelerCreatePage.generalPanel).toBeVisible({
93
- timeout: 30000,
99
+ timeout: 120000,
94
100
  });
95
101
  await modelerCreatePage.enterDiagramName(processName);
96
102
  await (0, sleep_1.sleep)(10000);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1021",
3
+ "version": "0.0.1022",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",