@camunda/e2e-test-suite 0.0.1574 → 0.0.1576

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.
@@ -204,22 +204,40 @@ class ClusterSecretsPage {
204
204
  await this.fillKeyInput(key);
205
205
  await this.clickValueInput();
206
206
  await this.fillValueInput(value);
207
- await this.clickCreateButton();
208
- await (0, test_1.expect)(this.page.getByText('Creating...')).not.toBeVisible({
209
- timeout: 60000,
207
+ // Console's Radix dialog shows "Creating…" (a single ellipsis character),
208
+ // so the old getByText('Creating...') wait never matched and the dialog
209
+ // was given only 5s per attempt. When the connectorSecrets POST was slow
210
+ // or failed, the dialog stayed open with Create enabled again and nothing
211
+ // resubmitted it unless the unique-name error showed. Drive the submit off
212
+ // the actual POST response instead, and resubmit while the dialog is open.
213
+ const dialogCreateButton = this.dialog.getByRole('button', {
214
+ name: 'Create',
215
+ exact: true,
210
216
  });
211
- // Console can answer a create right after deleteConnectorSecretsIfExist()
212
- // with "Secret names must be unique". The dialog then stays open and its
213
- // overlay blocks every later click, so resubmit until the key is accepted
214
- // and the dialog closes. This cannot resolve a key that a concurrent run
215
- // of this flow on the same cluster really does hold.
216
217
  const uniqueNameError = this.dialog.getByText('Secret names must be unique');
218
+ let saved = false;
217
219
  await (0, test_1.expect)(async () => {
218
- if (await uniqueNameError.isVisible()) {
219
- await this.clickCreateButton();
220
+ if (await this.dialog.isVisible()) {
221
+ if (saved && (await uniqueNameError.isVisible())) {
222
+ // Our own earlier POST already stored this per-run key; the form is
223
+ // now validating against the refreshed list.
224
+ await this.dialog
225
+ .getByRole('button', { name: 'Cancel', exact: true })
226
+ .click({ timeout: 10000 });
227
+ }
228
+ else if (await dialogCreateButton.isEnabled()) {
229
+ const createResponse = this.page.waitForResponse((response) => response.request().method() === 'POST' &&
230
+ response.url().includes('/connectorSecrets'), { timeout: 60000 });
231
+ await dialogCreateButton.click({ timeout: 10000 });
232
+ saved = (await createResponse).ok() || saved;
233
+ }
220
234
  }
221
- await (0, test_1.expect)(this.dialog).toBeHidden({ timeout: 5000 });
222
- }).toPass({ timeout: 120000, intervals: [5000] });
235
+ await (0, test_1.expect)(this.dialog).toBeHidden({ timeout: 15000 });
236
+ }).toPass({ timeout: 240000, intervals: [5000] });
237
+ // The secrets table is paginated (leftover per-run keys fill several
238
+ // pages), so a row lookup is not reliable; the accepted POST is the proof
239
+ // that this key was stored.
240
+ (0, test_1.expect)(saved, `connectorSecrets POST for "${key}" succeeded`).toBe(true);
223
241
  }
224
242
  async clickKeyInput() {
225
243
  await this.keyInput.click();
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TaskDetailsPage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
+ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
5
6
  function cardinalToOrdinal(numberValue) {
6
7
  const realOrderIndex = numberValue.toString();
7
8
  if (['11', '12', '13'].includes(realOrderIndex.slice(-2))) {
@@ -109,8 +110,24 @@ class TaskDetailsPage {
109
110
  await (0, test_1.expect)(this.page.getByText('Assigning...')).not.toBeVisible({
110
111
  timeout: 180000,
111
112
  });
112
- await (0, test_1.expect)(this.assignedToMeText).toBeVisible({
113
- timeout: 60000,
113
+ // A Camunda user task's assignment goes through Zeebe and back through
114
+ // the Tasklist importer, and the details panel can keep showing the task
115
+ // as unassigned after "Assigning..." clears (the click is occasionally
116
+ // lost too). Reload the task and re-assign if it is still unassigned, as
117
+ // pages/SM-8.7/TaskDetailsPage.ts does; "Assigned to me" is still required.
118
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.assignedToMeText, {
119
+ totalTimeout: 600000,
120
+ visibilityTimeout: 60000,
121
+ postAction: async () => {
122
+ await this.page.reload();
123
+ await (0, test_1.expect)(this.assignToMeButton.or(this.assignedToMeText).first()).toBeVisible({ timeout: 60000 });
124
+ if (await this.assignToMeButton.isVisible()) {
125
+ await this.assignToMeButton.click({ timeout: 60000 });
126
+ await (0, test_1.expect)(this.page.getByText('Assigning...')).not.toBeVisible({
127
+ timeout: 180000,
128
+ });
129
+ }
130
+ },
114
131
  });
115
132
  }
116
133
  async clickUnassignButton() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1574",
3
+ "version": "0.0.1576",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",