@camunda/e2e-test-suite 0.0.1540 → 0.0.1542
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,32 +109,48 @@ 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',
|
|
117
122
|
});
|
|
118
123
|
this.unstructured_publishToProjecOption = page.getByRole('menuitem', {
|
|
119
|
-
name:
|
|
124
|
+
name: /^Publish to (project|workspace)$/,
|
|
120
125
|
});
|
|
121
126
|
this.unstructured_versionFieldName = page.locator('#version-name');
|
|
122
127
|
this.unstructured_versionFieldDescription = page.locator('#version-description');
|
|
123
128
|
this.unstructured_publishButtonModal = page
|
|
124
129
|
.getByLabel('Publish Extraction Project')
|
|
125
130
|
.getByRole('button', { name: 'Publish' });
|
|
126
|
-
this.unstructured_idpSuccessfullPublishNotification = page.getByText('
|
|
127
|
-
this.unstructured_toastNotificationCloseButton =
|
|
128
|
-
|
|
131
|
+
this.unstructured_idpSuccessfullPublishNotification = page.getByText('IDP project published successfully.');
|
|
132
|
+
this.unstructured_toastNotificationCloseButton = page
|
|
133
|
+
.locator('[data-sonner-toast]')
|
|
134
|
+
.getByRole('button', { name: 'Dismiss' })
|
|
135
|
+
.or(page.getByLabel('Close notification'))
|
|
136
|
+
.first();
|
|
129
137
|
this.selectUnstructuredDataExtraction = page.locator('#idp-project-extraction-method-unstructured');
|
|
130
|
-
|
|
131
|
-
|
|
138
|
+
// The design-system radio tile exposes a `radio` named after its title and
|
|
139
|
+
// description and renders no `label[for]`, so match on the role and keep the
|
|
140
|
+
// id/label lookups for the Carbon variant.
|
|
141
|
+
this.selectStructuredDataExtraction = page
|
|
142
|
+
.getByRole('radio', { name: /^Structured form extraction/ })
|
|
143
|
+
.or(page.locator('#idp-project-extraction-method-structured'))
|
|
144
|
+
.first();
|
|
145
|
+
this.selectStructuredDataExtractionLabel = page
|
|
146
|
+
.getByRole('radiogroup')
|
|
147
|
+
.getByText('Structured form extraction')
|
|
148
|
+
.or(page.locator('label[for="idp-project-extraction-method-structured"]'))
|
|
149
|
+
.first();
|
|
132
150
|
this.extractionInProgressNotification = page.getByText('Extracting document...');
|
|
133
151
|
this.extractionInProgressNotificationForMultipleFiles = page.getByText('Extracting documents...');
|
|
134
152
|
this.structured_uploadFilesButton = page
|
|
135
|
-
.getByRole('
|
|
136
|
-
name: /Drag and drop.*PDF.*upload/i,
|
|
137
|
-
})
|
|
153
|
+
.getByRole('region', { name: /Drag and drop.*PDF.*upload/i })
|
|
138
154
|
.first();
|
|
139
155
|
this.structured_FieldsTab = page.getByRole('tab', {
|
|
140
156
|
name: 'Fields',
|
|
@@ -145,12 +161,19 @@ class IdpCreatePage {
|
|
|
145
161
|
this.structured_TestTemplateTab = page.getByRole('tab', {
|
|
146
162
|
name: 'Test template',
|
|
147
163
|
});
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
164
|
+
// The design-system table puts `aria-label="Activate all rows"` on the
|
|
165
|
+
// header checkbox itself, so the column header no longer carries that name.
|
|
166
|
+
this.structured_CheckboxSelectAllFields = page
|
|
167
|
+
.getByRole('checkbox', { name: 'Activate all rows' })
|
|
168
|
+
.or(page
|
|
169
|
+
.getByRole('table', { name: 'Extracted fields' })
|
|
170
|
+
.getByRole('columnheader')
|
|
171
|
+
.getByRole('checkbox'))
|
|
172
|
+
.first();
|
|
173
|
+
this.structured_CheckboxSelectAllTables = page
|
|
174
|
+
.getByText('Select all tables')
|
|
175
|
+
.first();
|
|
176
|
+
this.structured_SelectedFieldsTablesMessage = page.getByText(/^\s*\d+\s+fields?\s*(?:&\s*\d+\s+tables?\s*)?selected$/);
|
|
154
177
|
this.structured_TestExtractionTemplateButton = page.getByRole('button', {
|
|
155
178
|
name: 'Test extraction template',
|
|
156
179
|
});
|
|
@@ -218,11 +241,22 @@ class IdpCreatePage {
|
|
|
218
241
|
.locator('span:has-text("Accuracy") + span');
|
|
219
242
|
}
|
|
220
243
|
async clickCreateIdpTemplateButton() {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
244
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
245
|
+
if (!(await this.createExtractionTemplateOption.isVisible())) {
|
|
246
|
+
await this.createNewDropdownButton.click({ timeout: 60000 });
|
|
247
|
+
}
|
|
248
|
+
try {
|
|
249
|
+
await (0, test_1.expect)(this.createExtractionTemplateOption).toBeVisible({
|
|
250
|
+
timeout: 10000,
|
|
251
|
+
});
|
|
252
|
+
await this.createExtractionTemplateOption.click({ timeout: 10000 });
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
catch {
|
|
256
|
+
// menu did not open, or item detached before the click; retry
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
throw new Error('Failed to click create extraction template option after 3 attempts');
|
|
226
260
|
}
|
|
227
261
|
async fillIdpExtractionTemplateName(name) {
|
|
228
262
|
await this.idpExtractionTemplateName.fill(name);
|
|
@@ -255,8 +289,9 @@ class IdpCreatePage {
|
|
|
255
289
|
});
|
|
256
290
|
}
|
|
257
291
|
async clickUnstructuredUploadFilesButton() {
|
|
258
|
-
await this.unstructured_UploadFilesButton.
|
|
259
|
-
|
|
292
|
+
await (0, test_1.expect)(this.unstructured_UploadFilesButton).toBeVisible({
|
|
293
|
+
timeout: 60000,
|
|
294
|
+
});
|
|
260
295
|
}
|
|
261
296
|
async clickExtractButton() {
|
|
262
297
|
await (0, test_1.expect)(this.extractButton).toBeEnabled({
|
|
@@ -276,15 +311,21 @@ class IdpCreatePage {
|
|
|
276
311
|
}
|
|
277
312
|
async selectExtractionModelOption(option) {
|
|
278
313
|
const comboboxOption = this.page.getByRole('option', { name: option });
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
314
|
+
for (let attempt = 0; attempt < 4; attempt++) {
|
|
315
|
+
if (!(await comboboxOption.isVisible())) {
|
|
316
|
+
await this.unstructured_extractionModelDropdown.click({
|
|
317
|
+
timeout: 60000,
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
try {
|
|
321
|
+
await comboboxOption.click({ timeout: 10000 });
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
catch {
|
|
325
|
+
// list re-rendered and detached the option mid-click; reopen and retry
|
|
326
|
+
}
|
|
287
327
|
}
|
|
328
|
+
throw new Error(`Failed to select extraction model ${option} after 4 attempts`);
|
|
288
329
|
}
|
|
289
330
|
async clickExtractDocumentButton() {
|
|
290
331
|
await (0, test_1.expect)(this.unstructured_extractDocumentButton).toBeVisible({
|
|
@@ -380,8 +421,6 @@ class IdpCreatePage {
|
|
|
380
421
|
await (0, test_1.expect)(this.structured_uploadFilesButton).toBeVisible({
|
|
381
422
|
timeout: 60000,
|
|
382
423
|
});
|
|
383
|
-
await this.structured_uploadFilesButton.click({ timeout: 60000 });
|
|
384
|
-
await (0, sleep_1.sleep)(6000);
|
|
385
424
|
}
|
|
386
425
|
async selectAllExtractionFields() {
|
|
387
426
|
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_10_1.test.describe('IDP User Flow Tests', () => {
|
|
|
69
70
|
});
|
|
70
71
|
_8_10_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_10_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_10_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_10_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_10_1.test.describe('IDP User Flow Tests', () => {
|
|
|
150
145
|
});
|
|
151
146
|
_8_10_1.test.describe('Structured Extraction', () => {
|
|
152
147
|
for (const params of structuredTestCases) {
|
|
153
|
-
|
|
154
|
-
// comment. Not bug #8500.
|
|
155
|
-
_8_10_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_10_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_10_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');
|
|
@@ -85,7 +85,7 @@ const aiAgentSubProcessTestCases = [
|
|
|
85
85
|
];
|
|
86
86
|
const regexTestCases = [
|
|
87
87
|
{
|
|
88
|
-
regex_ai_agent_time: /The current date and time in ([A-Za-zÀ-ÿ .,'-]+(?:, [A-Za-zÀ-ÿ .,'-]+)*)
|
|
88
|
+
regex_ai_agent_time: /The current date and time in \[?([A-Za-zÀ-ÿ .,'-]+(?:, [A-Za-zÀ-ÿ .,'-]+)*)\]?,? is approximately ((?:0?[1-9]|1[0-2]):[0-5][0-9] (?:AM|PM)) on ([A-Z][a-z]+ (?:[1-9]|[12][0-9]|3[01]), \d{4})\./,
|
|
89
89
|
regex_db_vector: /Color and Varieties:\s*While orange is the most common color today, carrots can also be found in purple, red, yellow, and white varieties\. The orange color comes from beta-carotene, a pigment that the body converts into vitamin A\. Different colors may contain other antioxidants:\s*Purple carrots are rich in anthocyanins\s*Red carrots contain lycopene\s*Yellow carrots have lutein/,
|
|
90
90
|
},
|
|
91
91
|
];
|
|
@@ -125,10 +125,14 @@ _8_9_1.test.describe('Agentic Orchestation User Flows', () => {
|
|
|
125
125
|
await operateProcessInstancePage.assertActiveTokenIsPresent();
|
|
126
126
|
});
|
|
127
127
|
await _8_9_1.test.step('User can view the agent feedback on tasklist', async () => {
|
|
128
|
+
// Open this run's task by key: on a retry, the same-named task left
|
|
129
|
+
// behind (already assigned) by the failed first attempt would
|
|
130
|
+
// otherwise be opened, and it has no "Assign to me" button.
|
|
131
|
+
const taskKeys = await waitForUserTaskKeys(instanceKey);
|
|
128
132
|
await appsPage.clickCamundaApps();
|
|
129
133
|
await appsPage.clickTasklist(clusterName);
|
|
130
134
|
await (0, sleep_1.sleep)(5000);
|
|
131
|
-
await taskPanelPage.openTask(`AI Agent Chat With Tools ${params.provider}
|
|
135
|
+
await taskPanelPage.openTask(`AI Agent Chat With Tools ${params.provider}`, taskKeys);
|
|
132
136
|
await taskDetailsPage.clickAssignToMeButton();
|
|
133
137
|
});
|
|
134
138
|
await _8_9_1.test.step('User can view the agent response and complete the task', async () => {
|
|
@@ -204,7 +204,14 @@ _8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
204
204
|
await operateHomePage.clickProcessesTab();
|
|
205
205
|
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
206
206
|
await operateProcessesPage.clickProcessInstanceLink(processName);
|
|
207
|
+
// Connector jobs on the shared default cluster can take minutes to be
|
|
208
|
+
// picked up under nightly load (the nightly screenshot showed the token
|
|
209
|
+
// still on the REST task ~1 min after start, with the default 60s/3x
|
|
210
|
+
// budget already spent), so poll for completion for up to 10 minutes.
|
|
207
211
|
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateProcessInstancePage.completedIcon, {
|
|
212
|
+
totalTimeout: 600000,
|
|
213
|
+
visibilityTimeout: 30000,
|
|
214
|
+
maxRetries: 20,
|
|
208
215
|
postAction: async () => {
|
|
209
216
|
await page.reload();
|
|
210
217
|
},
|
|
@@ -449,7 +456,11 @@ _8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
449
456
|
const operateTab = await operateTabPromise;
|
|
450
457
|
const operateTabProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(operateTab);
|
|
451
458
|
await operateTabProcessInstancePage.closePopOverIfVisible();
|
|
452
|
-
|
|
459
|
+
// The flow chains seven connector jobs on the shared default cluster;
|
|
460
|
+
// under nightly load each can take a minute or more to be picked up
|
|
461
|
+
// (the nightly instance was still on the 4th task after the default
|
|
462
|
+
// 6 x 60s budget), so allow up to ~14 minutes for completion.
|
|
463
|
+
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateTabProcessInstancePage, operateTabProcessInstancePage.completedIcon, 'completed icon', 60000, false, 12);
|
|
453
464
|
await operateTabProcessInstancePage.assertProcessVariableContainsText('doc', 'gcp');
|
|
454
465
|
await operateTabProcessInstancePage.assertProcessVariableContainsText('doc', 'b4946b81fed5c91a7de5f77c350241bc5ece49152708c61bd6c2208836d8415e');
|
|
455
466
|
await operateTabProcessInstancePage.assertProcessVariableContainsText('doc', '19456');
|
package/dist/utils/apiHelpers.js
CHANGED
|
@@ -551,12 +551,28 @@ async function deployProcess(filePath, authToken, environment, clusterType) {
|
|
|
551
551
|
if (isMT) {
|
|
552
552
|
multipart.tenantId = '<default>';
|
|
553
553
|
}
|
|
554
|
-
|
|
554
|
+
// Retry when the gateway briefly cannot reach a broker (HTTP 503
|
|
555
|
+
// "Expected to handle request, but there was a connection error with one
|
|
556
|
+
// of the brokers") or another 5xx: the SaaS nightly saw a ~4s window of
|
|
557
|
+
// these on the Agentic Orchestration Cluster that failed every MCP spec
|
|
558
|
+
// deploying in it, while specs deploying seconds later succeeded.
|
|
559
|
+
const maxAttempts = 6;
|
|
560
|
+
let response = await apiRequestContext.post(url, {
|
|
555
561
|
headers: {
|
|
556
562
|
Authorization: authToken ?? '',
|
|
557
563
|
},
|
|
558
564
|
multipart,
|
|
559
565
|
});
|
|
566
|
+
for (let attempt = 1; attempt < maxAttempts && response.status() >= 500; attempt++) {
|
|
567
|
+
console.warn(`deployProcess: HTTP ${response.status()} for ${fileName}, attempt ${attempt}/${maxAttempts}, retrying in ${5 * attempt}s`);
|
|
568
|
+
await (0, sleep_1.sleep)(5000 * attempt);
|
|
569
|
+
response = await apiRequestContext.post(url, {
|
|
570
|
+
headers: {
|
|
571
|
+
Authorization: authToken ?? '',
|
|
572
|
+
},
|
|
573
|
+
multipart,
|
|
574
|
+
});
|
|
575
|
+
}
|
|
560
576
|
if (response.status() !== 200) {
|
|
561
577
|
const body = await response.text();
|
|
562
578
|
console.error(`deployProcess failed for ${fileName}: HTTP ${response.status()} - ${body}`);
|