@camunda/e2e-test-suite 0.0.692 → 0.0.694
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.
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OCIdentityGroupsPage = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
|
+
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
6
7
|
class OCIdentityGroupsPage {
|
|
7
8
|
page;
|
|
8
9
|
groupsList;
|
|
@@ -157,7 +158,16 @@ class OCIdentityGroupsPage {
|
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
160
|
async assignUserToGroup(userName) {
|
|
160
|
-
|
|
161
|
+
// The group detail page (and its members API) can be slow to render the
|
|
162
|
+
// "Assign user" button right after navigating into a freshly created
|
|
163
|
+
// group, so retry the click and reload between attempts instead of
|
|
164
|
+
// relying on a single default-timeout click.
|
|
165
|
+
await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.assignUserButton, {
|
|
166
|
+
postAction: async () => {
|
|
167
|
+
await this.page.reload();
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
await (0, test_1.expect)(this.searchBox).toBeVisible({ timeout: 10000 });
|
|
161
171
|
await this.searchBox.fill(userName);
|
|
162
172
|
await this.assignUserButtonModal.click();
|
|
163
173
|
await (0, sleep_1.sleep)(8000);
|
|
@@ -39,6 +39,7 @@ declare class IdpCreatePage {
|
|
|
39
39
|
readonly structured_ExtractDocumentsLoader: Locator;
|
|
40
40
|
readonly structured_TestSummaryResult: Locator;
|
|
41
41
|
readonly structured_DetailsResult: Locator;
|
|
42
|
+
readonly structured_ExtractionFailedToast: Locator;
|
|
42
43
|
readonly structured_PublishTemplateButton: Locator;
|
|
43
44
|
readonly structured_PublishTemplateToProjectButton: Locator;
|
|
44
45
|
readonly structured_SuccessfulPublishNotification: Locator;
|
|
@@ -43,6 +43,7 @@ class IdpCreatePage {
|
|
|
43
43
|
structured_ExtractDocumentsLoader;
|
|
44
44
|
structured_TestSummaryResult;
|
|
45
45
|
structured_DetailsResult;
|
|
46
|
+
structured_ExtractionFailedToast;
|
|
46
47
|
structured_PublishTemplateButton;
|
|
47
48
|
structured_PublishTemplateToProjectButton;
|
|
48
49
|
structured_SuccessfulPublishNotification;
|
|
@@ -131,6 +132,9 @@ class IdpCreatePage {
|
|
|
131
132
|
this.structured_DetailsResult = page.getByRole('heading', {
|
|
132
133
|
name: 'Detailed Results',
|
|
133
134
|
});
|
|
135
|
+
this.structured_ExtractionFailedToast = page
|
|
136
|
+
.getByText('Extraction failed')
|
|
137
|
+
.first();
|
|
134
138
|
this.structured_PublishTemplateButton = page.getByRole('button', {
|
|
135
139
|
name: 'Publish Template',
|
|
136
140
|
});
|
|
@@ -311,12 +315,39 @@ class IdpCreatePage {
|
|
|
311
315
|
await this.structured_TestExtractionTemplateButton.click({ timeout: 120000 });
|
|
312
316
|
}
|
|
313
317
|
async extractionResultsAreVisible() {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
318
|
+
// The structured-extraction backend has been observed to surface a
|
|
319
|
+
// transient "Extraction failed" toast (e.g. ParseException on a malformed
|
|
320
|
+
// upstream AWS Bedrock response header), which leaves the results page
|
|
321
|
+
// empty so the success heading never appears. When that happens, dismiss
|
|
322
|
+
// the toast and re-run the extraction; fall through to a clear error only
|
|
323
|
+
// after the retry budget is exhausted so a sustained backend failure still
|
|
324
|
+
// surfaces red.
|
|
325
|
+
const maxRetries = 3;
|
|
326
|
+
const successOrFailure = this.structured_TestSummaryResult
|
|
327
|
+
.or(this.structured_ExtractionFailedToast)
|
|
328
|
+
.first();
|
|
329
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
330
|
+
await (0, test_1.expect)(successOrFailure).toBeVisible({ timeout: 60000 });
|
|
331
|
+
const summary = this.structured_TestSummaryResult;
|
|
332
|
+
if (await summary.isVisible().catch(() => false)) {
|
|
333
|
+
await (0, test_1.expect)(this.structured_DetailsResult).toBeVisible({
|
|
334
|
+
timeout: 60000,
|
|
335
|
+
});
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
if (attempt < maxRetries - 1) {
|
|
339
|
+
await this.closeNotificationButton
|
|
340
|
+
.click({ timeout: 5000 })
|
|
341
|
+
.catch(() => { });
|
|
342
|
+
await (0, sleep_1.sleep)(2000);
|
|
343
|
+
await this.structured_TestExtractionTemplateButton.click({
|
|
344
|
+
timeout: 60000,
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
throw new Error(`Structured extraction failed after ${maxRetries} attempts ` +
|
|
349
|
+
`("Extraction failed" toast appeared every time). Check Camunda's ` +
|
|
350
|
+
`IDP backend / upstream AI provider response.`);
|
|
320
351
|
}
|
|
321
352
|
async clickPublishTemplateButton() {
|
|
322
353
|
await (0, test_1.expect)(this.structured_PublishTemplateButton).toBeVisible({
|