@camunda/e2e-test-suite 0.0.692 → 0.0.693

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.
@@ -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
- await (0, test_1.expect)(this.structured_TestSummaryResult).toBeVisible({
315
- timeout: 60000,
316
- });
317
- await (0, test_1.expect)(this.structured_DetailsResult).toBeVisible({
318
- timeout: 60000,
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({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.692",
3
+ "version": "0.0.693",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",