@camunda/e2e-test-suite 0.0.1542 → 0.0.1543
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.
|
@@ -85,8 +85,8 @@ class IdpCreatePage {
|
|
|
85
85
|
name: 'Create template',
|
|
86
86
|
exact: true,
|
|
87
87
|
});
|
|
88
|
-
this.unstructured_UploadFilesButton = page.getByRole('
|
|
89
|
-
name:
|
|
88
|
+
this.unstructured_UploadFilesButton = page.getByRole('region', {
|
|
89
|
+
name: /Drag and drop.*PDF.*upload/i,
|
|
90
90
|
});
|
|
91
91
|
this.extractButton = page.getByRole('button', {
|
|
92
92
|
name: 'Extract',
|
|
@@ -95,7 +95,7 @@ class IdpCreatePage {
|
|
|
95
95
|
this.unstructured_extractFieldName = page.locator('#new-extraction-field-name');
|
|
96
96
|
this.unstructured_extractFieldPrompt = page.locator('#new-extraction-field-prompt');
|
|
97
97
|
this.unstructured_addExtractionFieldButton = page.getByRole('button', {
|
|
98
|
-
name: 'Add',
|
|
98
|
+
name: 'Add field',
|
|
99
99
|
exact: true,
|
|
100
100
|
});
|
|
101
101
|
this.unstructured_extractionModelDropdown =
|
|
@@ -109,8 +109,13 @@ class IdpCreatePage {
|
|
|
109
109
|
this.unstructured_validateExtractionTab = page.getByRole('tab', {
|
|
110
110
|
name: 'Validate extraction',
|
|
111
111
|
});
|
|
112
|
-
this.unstructured_testCaseSavedNotification = page.getByText('
|
|
113
|
-
this.unstructured_expandAllRowsButton = page
|
|
112
|
+
this.unstructured_testCaseSavedNotification = page.getByText('Test case successfully saved');
|
|
113
|
+
this.unstructured_expandAllRowsButton = page
|
|
114
|
+
.getByRole('row')
|
|
115
|
+
.filter({ hasText: 'bank_account_number' })
|
|
116
|
+
.getByRole('button')
|
|
117
|
+
.first()
|
|
118
|
+
.or(page.getByLabel('Expand all rows'));
|
|
114
119
|
this.unstructured_passTestCaseResultsRows = page.locator('[data-test="pass-test-case-results"]');
|
|
115
120
|
this.unstructured_publishButton = page.getByRole('button', {
|
|
116
121
|
name: 'Publish',
|
|
@@ -125,18 +130,29 @@ class IdpCreatePage {
|
|
|
125
130
|
this.unstructured_publishButtonModal = page
|
|
126
131
|
.getByLabel('Publish Extraction Project')
|
|
127
132
|
.getByRole('button', { name: 'Publish' });
|
|
128
|
-
this.unstructured_idpSuccessfullPublishNotification = page.getByText('
|
|
129
|
-
this.unstructured_toastNotificationCloseButton =
|
|
130
|
-
|
|
133
|
+
this.unstructured_idpSuccessfullPublishNotification = page.getByText('IDP project published successfully.');
|
|
134
|
+
this.unstructured_toastNotificationCloseButton = page
|
|
135
|
+
.locator('[data-sonner-toast]')
|
|
136
|
+
.getByRole('button', { name: 'Dismiss' })
|
|
137
|
+
.or(page.getByLabel('Close notification'))
|
|
138
|
+
.first();
|
|
131
139
|
this.selectUnstructuredDataExtraction = page.locator('#idp-project-extraction-method-unstructured');
|
|
132
|
-
|
|
133
|
-
|
|
140
|
+
// The design-system radio tile exposes a `radio` named after its title and
|
|
141
|
+
// description and renders no `label[for]`, so match on the role and keep the
|
|
142
|
+
// id/label lookups for the Carbon variant.
|
|
143
|
+
this.selectStructuredDataExtraction = page
|
|
144
|
+
.getByRole('radio', { name: /^Structured form extraction/ })
|
|
145
|
+
.or(page.locator('#idp-project-extraction-method-structured'))
|
|
146
|
+
.first();
|
|
147
|
+
this.selectStructuredDataExtractionLabel = page
|
|
148
|
+
.getByRole('radiogroup')
|
|
149
|
+
.getByText('Structured form extraction')
|
|
150
|
+
.or(page.locator('label[for="idp-project-extraction-method-structured"]'))
|
|
151
|
+
.first();
|
|
134
152
|
this.extractionInProgressNotification = page.getByText('Extracting document...');
|
|
135
153
|
this.extractionInProgressNotificationForMultipleFiles = page.getByText('Extracting documents...');
|
|
136
154
|
this.structured_uploadFilesButton = page
|
|
137
|
-
.getByRole('
|
|
138
|
-
name: /Drag and drop.*PDF.*upload/i,
|
|
139
|
-
})
|
|
155
|
+
.getByRole('region', { name: /Drag and drop.*PDF.*upload/i })
|
|
140
156
|
.first();
|
|
141
157
|
this.structured_FieldsTab = page.getByRole('tab', {
|
|
142
158
|
name: 'Fields',
|
|
@@ -147,12 +163,19 @@ class IdpCreatePage {
|
|
|
147
163
|
this.structured_TestTemplateTab = page.getByRole('tab', {
|
|
148
164
|
name: 'Test template',
|
|
149
165
|
});
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
166
|
+
// The design-system table puts `aria-label="Activate all rows"` on the
|
|
167
|
+
// header checkbox itself, so the column header no longer carries that name.
|
|
168
|
+
this.structured_CheckboxSelectAllFields = page
|
|
169
|
+
.getByRole('checkbox', { name: 'Activate all rows' })
|
|
170
|
+
.or(page
|
|
171
|
+
.getByRole('table', { name: 'Extracted fields' })
|
|
172
|
+
.getByRole('columnheader')
|
|
173
|
+
.getByRole('checkbox'))
|
|
174
|
+
.first();
|
|
175
|
+
this.structured_CheckboxSelectAllTables = page
|
|
176
|
+
.getByText('Select all tables')
|
|
177
|
+
.first();
|
|
178
|
+
this.structured_SelectedFieldsTablesMessage = page.getByText(/^\s*\d+\s+fields?\s*(?:&\s*\d+\s+tables?\s*)?selected$/);
|
|
156
179
|
this.structured_TestExtractionTemplateButton = page.getByRole('button', {
|
|
157
180
|
name: 'Test extraction template',
|
|
158
181
|
});
|
|
@@ -213,11 +236,22 @@ class IdpCreatePage {
|
|
|
213
236
|
.locator('span:has-text("Accuracy") + span');
|
|
214
237
|
}
|
|
215
238
|
async clickCreateIdpTemplateButton() {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
239
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
240
|
+
if (!(await this.createExtractionTemplateOption.isVisible())) {
|
|
241
|
+
await this.createNewDropdownButton.click({ timeout: 60000 });
|
|
242
|
+
}
|
|
243
|
+
try {
|
|
244
|
+
await (0, test_1.expect)(this.createExtractionTemplateOption).toBeVisible({
|
|
245
|
+
timeout: 10000,
|
|
246
|
+
});
|
|
247
|
+
await this.createExtractionTemplateOption.click({ timeout: 10000 });
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
// menu did not open, or item detached before the click; retry
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
throw new Error('Failed to click create extraction template option after 3 attempts');
|
|
221
255
|
}
|
|
222
256
|
async fillIdpExtractionTemplateName(name) {
|
|
223
257
|
await this.idpExtractionTemplateName.fill(name);
|
|
@@ -249,8 +283,9 @@ class IdpCreatePage {
|
|
|
249
283
|
});
|
|
250
284
|
}
|
|
251
285
|
async clickUnstructuredUploadFilesButton() {
|
|
252
|
-
await this.unstructured_UploadFilesButton.
|
|
253
|
-
|
|
286
|
+
await (0, test_1.expect)(this.unstructured_UploadFilesButton).toBeVisible({
|
|
287
|
+
timeout: 60000,
|
|
288
|
+
});
|
|
254
289
|
}
|
|
255
290
|
async clickExtractButton() {
|
|
256
291
|
await (0, test_1.expect)(this.extractButton).toBeEnabled({
|
|
@@ -270,15 +305,21 @@ class IdpCreatePage {
|
|
|
270
305
|
}
|
|
271
306
|
async selectExtractionModelOption(option) {
|
|
272
307
|
const comboboxOption = this.page.getByRole('option', { name: option });
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
308
|
+
for (let attempt = 0; attempt < 4; attempt++) {
|
|
309
|
+
if (!(await comboboxOption.isVisible())) {
|
|
310
|
+
await this.unstructured_extractionModelDropdown.click({
|
|
311
|
+
timeout: 60000,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
try {
|
|
315
|
+
await comboboxOption.click({ timeout: 10000 });
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
catch {
|
|
319
|
+
// list re-rendered and detached the option mid-click; reopen and retry
|
|
320
|
+
}
|
|
281
321
|
}
|
|
322
|
+
throw new Error(`Failed to select extraction model ${option} after 4 attempts`);
|
|
282
323
|
}
|
|
283
324
|
async clickExtractDocumentButton() {
|
|
284
325
|
await (0, test_1.expect)(this.unstructured_extractDocumentButton).toBeVisible({
|
|
@@ -374,8 +415,6 @@ class IdpCreatePage {
|
|
|
374
415
|
await (0, test_1.expect)(this.structured_uploadFilesButton).toBeVisible({
|
|
375
416
|
timeout: 60000,
|
|
376
417
|
});
|
|
377
|
-
await this.structured_uploadFilesButton.click({ timeout: 60000 });
|
|
378
|
-
await (0, sleep_1.sleep)(6000);
|
|
379
418
|
}
|
|
380
419
|
async selectAllExtractionFields() {
|
|
381
420
|
await (0, test_1.expect)(this.extractionInProgressNotification).not.toBeVisible({
|
|
@@ -14,7 +14,7 @@ let idpDocumentExtractionTemplateName;
|
|
|
14
14
|
const unstructuredTestCases = [
|
|
15
15
|
{
|
|
16
16
|
provider: 'AWS',
|
|
17
|
-
model: 'Claude Sonnet
|
|
17
|
+
model: 'Claude Sonnet 5.5',
|
|
18
18
|
uploadFiles: ['idp/idp_sample_bank_statement.pdf'],
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -39,16 +39,17 @@ const structuredTestCases = [
|
|
|
39
39
|
'idp/structured_invoice_3.pdf',
|
|
40
40
|
],
|
|
41
41
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
// Skipped due to bug #9956: https://github.com/camunda/connectors/issues/9956
|
|
43
|
+
// {
|
|
44
|
+
// provider: 'GCP',
|
|
45
|
+
// model: '',
|
|
46
|
+
// uploadFiles: ['idp/structured_invoice_test.pdf'],
|
|
47
|
+
// extractionFiles: [
|
|
48
|
+
// 'idp/structured_invoice_1.pdf',
|
|
49
|
+
// 'idp/structured_invoice_2.pdf',
|
|
50
|
+
// 'idp/structured_invoice_3.pdf',
|
|
51
|
+
// ],
|
|
52
|
+
// },
|
|
52
53
|
]; /* For structured documents, the model is empty since is not necessary */
|
|
53
54
|
const classificationTestCases = [
|
|
54
55
|
{
|
|
@@ -69,13 +70,7 @@ _8_11_1.test.describe('IDP User Flow Tests', () => {
|
|
|
69
70
|
});
|
|
70
71
|
_8_11_1.test.describe('Unstructured Extraction', () => {
|
|
71
72
|
for (const params of unstructuredTestCases) {
|
|
72
|
-
|
|
73
|
-
// about outbound REST connectors + {{secrets.*}} masking, unrelated to
|
|
74
|
-
// this symptom: "Save as test case" never becomes enabled after
|
|
75
|
-
// extraction is triggered (120s timeout, both attempt and retry, same
|
|
76
|
-
// for AWS and GCP -- see PR #3348 run 34109991740). Mis-attributed to
|
|
77
|
-
// #8500 originally; needs its own bug filed before unskipping again.
|
|
78
|
-
_8_11_1.test.skip(`${params.provider} unstructured (${params.model}) - User creates an idp application with a document extraction template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
|
|
73
|
+
(0, _8_11_1.test)(`${params.provider} unstructured (${params.model}) - User creates an idp application with a document extraction template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
|
|
79
74
|
_8_11_1.test.slow();
|
|
80
75
|
idpApplicationName = await (0, randomName_1.randomNameAgregator)(`${params.provider} unstructured` + ' - IDP_Application_Name');
|
|
81
76
|
idpDocumentExtractionTemplateName = await (0, randomName_1.randomNameAgregator)(`${params.provider} unstructured` + ' - IDP_Extraction_Template_Name');
|
|
@@ -150,9 +145,7 @@ _8_11_1.test.describe('IDP User Flow Tests', () => {
|
|
|
150
145
|
});
|
|
151
146
|
_8_11_1.test.describe('Structured Extraction', () => {
|
|
152
147
|
for (const params of structuredTestCases) {
|
|
153
|
-
|
|
154
|
-
// comment. Not bug #8500.
|
|
155
|
-
_8_11_1.test.skip(`${params.provider} structured - User creates an idp application with a document extraction template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
|
|
148
|
+
(0, _8_11_1.test)(`${params.provider} structured - User creates an idp application with a document extraction template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
|
|
156
149
|
_8_11_1.test.slow();
|
|
157
150
|
idpApplicationName = await (0, randomName_1.randomNameAgregator)(`${params.provider} structured` + ' - IDP_Application_Name');
|
|
158
151
|
idpDocumentExtractionTemplateName = await (0, randomName_1.randomNameAgregator)(`${params.provider} structured` + ' - IDP_Extraction_Template_Name');
|