@camunda/e2e-test-suite 0.0.989 → 0.0.990
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.
|
@@ -33,6 +33,7 @@ declare class IdpCreatePage {
|
|
|
33
33
|
readonly selectStructuredDataExtraction: Locator;
|
|
34
34
|
readonly selectStructuredDataExtractionLabel: Locator;
|
|
35
35
|
readonly extractionInProgressNotification: Locator;
|
|
36
|
+
readonly structured_ExtractionInProgress: Locator;
|
|
36
37
|
readonly structured_FieldsTab: Locator;
|
|
37
38
|
readonly structured_TablesTab: Locator;
|
|
38
39
|
readonly structured_CheckboxSelectAllFields: Locator;
|
|
@@ -86,6 +87,7 @@ declare class IdpCreatePage {
|
|
|
86
87
|
clickCloseToastNotification(): Promise<void>;
|
|
87
88
|
selectStructuredDataExtractionMethod(): Promise<void>;
|
|
88
89
|
clickStructuredUploadFilesButton(): Promise<void>;
|
|
90
|
+
private waitForStructuredExtractionToFinish;
|
|
89
91
|
selectAllExtractionFields(): Promise<void>;
|
|
90
92
|
clickTablesTab(): Promise<void>;
|
|
91
93
|
selectAllExtractedTables(): Promise<void>;
|
|
@@ -37,6 +37,7 @@ class IdpCreatePage {
|
|
|
37
37
|
selectStructuredDataExtraction;
|
|
38
38
|
selectStructuredDataExtractionLabel;
|
|
39
39
|
extractionInProgressNotification;
|
|
40
|
+
structured_ExtractionInProgress;
|
|
40
41
|
structured_FieldsTab;
|
|
41
42
|
structured_TablesTab;
|
|
42
43
|
structured_CheckboxSelectAllFields;
|
|
@@ -125,6 +126,13 @@ class IdpCreatePage {
|
|
|
125
126
|
this.selectStructuredDataExtraction = page.locator('#idp-project-extraction-method-structured');
|
|
126
127
|
this.selectStructuredDataExtractionLabel = page.locator('label[for="idp-project-extraction-method-structured"]');
|
|
127
128
|
this.extractionInProgressNotification = page.getByText('Extracting document...');
|
|
129
|
+
// Structured extraction cycles through several progress messages before it
|
|
130
|
+
// finishes: "Extracting document..." (single file, Configure template),
|
|
131
|
+
// "Extracting documents..." (multiple files, Test template) and finally
|
|
132
|
+
// "Just a little bit more...". Matching only the first one made the
|
|
133
|
+
// progress gate a no-op, so the flow raced ahead to a fixed-length wait on
|
|
134
|
+
// the end-state element.
|
|
135
|
+
this.structured_ExtractionInProgress = page.getByText(/Extracting documents?\.\.\.|Just a little bit more\.\.\./);
|
|
128
136
|
this.structured_uploadFilesButton = page
|
|
129
137
|
.getByRole('button', {
|
|
130
138
|
name: /Drag and drop.*PDF.*upload/i,
|
|
@@ -362,10 +370,21 @@ class IdpCreatePage {
|
|
|
362
370
|
await this.structured_uploadFilesButton.click({ timeout: 60000 });
|
|
363
371
|
await (0, sleep_1.sleep)(6000);
|
|
364
372
|
}
|
|
373
|
+
// Blocks until the structured extraction really finished, instead of until
|
|
374
|
+
// one particular progress message went away. The LLM-backed extraction takes
|
|
375
|
+
// several minutes and its duration varies per provider and per run, so a
|
|
376
|
+
// fixed-length wait on the end-state element is not enough on a slow night.
|
|
377
|
+
async waitForStructuredExtractionToFinish(timeout = 420000) {
|
|
378
|
+
const inProgress = this.structured_ExtractionInProgress.first();
|
|
379
|
+
// The progress message can lag the upload/click by a moment; if extraction
|
|
380
|
+
// was already done by the time we look, carry on to the not-visible check.
|
|
381
|
+
await inProgress
|
|
382
|
+
.waitFor({ state: 'visible', timeout: 15000 })
|
|
383
|
+
.catch(() => undefined);
|
|
384
|
+
await (0, test_1.expect)(inProgress).not.toBeVisible({ timeout });
|
|
385
|
+
}
|
|
365
386
|
async selectAllExtractionFields() {
|
|
366
|
-
await
|
|
367
|
-
timeout: 120000,
|
|
368
|
-
});
|
|
387
|
+
await this.waitForStructuredExtractionToFinish();
|
|
369
388
|
// Fields tab is a readiness indicator; not all providers render it — proceed if absent
|
|
370
389
|
await this.structured_FieldsTab
|
|
371
390
|
.waitFor({ state: 'visible', timeout: 180000 })
|
|
@@ -405,14 +424,11 @@ class IdpCreatePage {
|
|
|
405
424
|
timeout: 60000,
|
|
406
425
|
});
|
|
407
426
|
await this.structured_TestExtractionTemplateButton.click({ timeout: 60000 });
|
|
408
|
-
await
|
|
409
|
-
timeout: 120000,
|
|
410
|
-
});
|
|
427
|
+
await this.waitForStructuredExtractionToFinish();
|
|
411
428
|
}
|
|
412
429
|
async extractionResultsAreVisible() {
|
|
413
|
-
//
|
|
414
|
-
//
|
|
415
|
-
// failures. Align with the 8.8 page object, which already uses 180s.
|
|
430
|
+
// The extraction itself is awaited in clickTestExtractionTemplateButton, so
|
|
431
|
+
// this only covers the render of the Summary/Details sections afterwards.
|
|
416
432
|
await (0, test_1.expect)(this.structured_TestSummaryResult).toBeVisible({
|
|
417
433
|
timeout: 180000,
|
|
418
434
|
});
|
|
@@ -379,12 +379,22 @@ _8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
379
379
|
timeout: 120000,
|
|
380
380
|
});
|
|
381
381
|
const url = await modelerCreatePage.copyWebhookUrlToClipboardButton.innerText();
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
382
|
+
// The modeler's "webhook is active" banner can lead the gateway actually
|
|
383
|
+
// serving the endpoint, so the first POST can land on a not-yet-registered
|
|
384
|
+
// webhook and come back 5xx.
|
|
385
|
+
//
|
|
386
|
+
// Retry ONLY on 5xx. A 5xx means the request was not processed, so
|
|
387
|
+
// re-posting cannot double-trigger the process; a 2xx or 4xx is a real
|
|
388
|
+
// answer about a live endpoint and must be asserted as-is rather than
|
|
389
|
+
// retried until it changes.
|
|
390
|
+
let response = await request.post(url, { data: { test: 'test' } });
|
|
391
|
+
for (let attempt = 0; attempt < 5 && response.status() >= 500; attempt++) {
|
|
392
|
+
await (0, sleep_1.sleep)(5000);
|
|
393
|
+
response = await request.post(url, { data: { test: 'test' } });
|
|
394
|
+
}
|
|
395
|
+
// Not awaited: expect() on a plain value is synchronous, so the previous
|
|
396
|
+
// `await` here read as a retrying assertion while doing nothing.
|
|
397
|
+
(0, test_1.expect)(response.status()).toBe(200);
|
|
388
398
|
});
|
|
389
399
|
await _8_9_1.test.step('Assert Diagram Has Successfully Completed in Operate', async () => {
|
|
390
400
|
await (0, sleep_1.sleep)(90000);
|