@camunda/e2e-test-suite 0.0.691 → 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({
@@ -636,10 +636,7 @@ class ModelerCreatePage {
636
636
  await this.changeTypeButton.click({ force: true, timeout: 60000 });
637
637
  await this.clickMarketPlaceButton();
638
638
  const marketplace = new ConnectorMarketplacePage_1.ConnectorMarketplacePage(this.page);
639
- await marketplace.clickSearchForConnectorTextbox();
640
- await (0, sleep_1.sleep)(5000);
641
- await marketplace.fillSearchForConnectorTextbox('REST Connector');
642
- await marketplace.downloadConnectorToProject();
639
+ await marketplace.searchAndDownloadConnector('REST Connector');
643
640
  // Marketplace closes the change-type panel; reopen it so the
644
641
  // newly installed connector appears in the list.
645
642
  await this.changeTypeButton.click({ force: true, timeout: 60000 });
@@ -337,13 +337,7 @@ async function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage, modeler
337
337
  timeout: 120000,
338
338
  });
339
339
  await modelerCreatePage.clickMarketPlaceButton();
340
- await connectorMarketplacePage.clickSearchForConnectorTextbox();
341
- await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
342
- await (0, sleep_1.sleep)(10000);
343
- await (0, test_1.expect)(page.getByText('REST ConnectorBy CamundaConnect, interact, and synchronize processes')).toBeVisible({
344
- timeout: 60000,
345
- });
346
- await connectorMarketplacePage.downloadConnectorToProject();
340
+ await connectorMarketplacePage.searchAndDownloadConnector('REST Connector');
347
341
  await modelerHomePage.clickProjectBreadcrumb();
348
342
  await modelerHomePage.clickProcessDiagram('REST Outbound Connector');
349
343
  await connectorTemplatePage.publishConnector();
@@ -452,9 +446,7 @@ async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modele
452
446
  await modelerCreatePage.clickFirstPlaceRESTConnector();
453
447
  await modelerCreatePage.clickChangeTypeButton();
454
448
  await modelerCreatePage.clickMarketPlaceButton();
455
- await connectorMarketplacePage.clickSearchForConnectorTextbox();
456
- await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
457
- await connectorMarketplacePage.downloadConnectorToProject();
449
+ await connectorMarketplacePage.searchAndDownloadConnector('REST Connector');
458
450
  await page.reload();
459
451
  await page.waitForLoadState('networkidle');
460
452
  await modelerCreatePage.fillStartEventVariablesForDocHandling(zeebeUrl, zeebeClientId, zeebeClientSecret);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.691",
3
+ "version": "0.0.693",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",