@camunda/e2e-test-suite 0.0.1575 → 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
|
-
|
|
208
|
-
|
|
209
|
-
|
|
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
|
|
219
|
-
await
|
|
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:
|
|
222
|
-
}).toPass({ timeout:
|
|
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();
|