@camunda/e2e-test-suite 0.0.1547 → 0.0.1548
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.
|
@@ -2,6 +2,8 @@ import { Page, Locator } from '@playwright/test';
|
|
|
2
2
|
declare class IdpCreatePage {
|
|
3
3
|
private page;
|
|
4
4
|
readonly createIdpTemplateButton: Locator;
|
|
5
|
+
readonly createNewDropdownButton: Locator;
|
|
6
|
+
readonly createExtractionTemplateOption: Locator;
|
|
5
7
|
readonly idpExtractionTemplateName: Locator;
|
|
6
8
|
readonly idpDescriptionField: Locator;
|
|
7
9
|
readonly providerDropdown: Locator;
|
|
@@ -27,7 +29,9 @@ declare class IdpCreatePage {
|
|
|
27
29
|
readonly unstructured_toastNotificationCloseButton: Locator;
|
|
28
30
|
readonly selectUnstructuredDataExtraction: Locator;
|
|
29
31
|
readonly selectStructuredDataExtraction: Locator;
|
|
32
|
+
readonly selectStructuredDataExtractionLabel: Locator;
|
|
30
33
|
readonly extractionInProgressNotification: Locator;
|
|
34
|
+
readonly structured_ExtractionInProgress: Locator;
|
|
31
35
|
readonly extractionFailureIndicator: Locator;
|
|
32
36
|
readonly structured_FieldsTab: Locator;
|
|
33
37
|
readonly structured_TablesTab: Locator;
|
|
@@ -72,6 +76,7 @@ declare class IdpCreatePage {
|
|
|
72
76
|
clickCloseToastNotification(): Promise<void>;
|
|
73
77
|
selectStructuredDataExtractionMethod(): Promise<void>;
|
|
74
78
|
clickStructuredUploadFilesButton(): Promise<void>;
|
|
79
|
+
private waitForStructuredExtractionToFinish;
|
|
75
80
|
selectAllExtractionFields(): Promise<void>;
|
|
76
81
|
clickTablesTab(): Promise<void>;
|
|
77
82
|
selectAllExtractedTables(): Promise<void>;
|
|
@@ -6,6 +6,8 @@ const sleep_1 = require("../../utils/sleep");
|
|
|
6
6
|
class IdpCreatePage {
|
|
7
7
|
page;
|
|
8
8
|
createIdpTemplateButton;
|
|
9
|
+
createNewDropdownButton;
|
|
10
|
+
createExtractionTemplateOption;
|
|
9
11
|
idpExtractionTemplateName;
|
|
10
12
|
idpDescriptionField;
|
|
11
13
|
providerDropdown;
|
|
@@ -31,7 +33,9 @@ class IdpCreatePage {
|
|
|
31
33
|
unstructured_toastNotificationCloseButton;
|
|
32
34
|
selectUnstructuredDataExtraction;
|
|
33
35
|
selectStructuredDataExtraction;
|
|
36
|
+
selectStructuredDataExtractionLabel;
|
|
34
37
|
extractionInProgressNotification;
|
|
38
|
+
structured_ExtractionInProgress;
|
|
35
39
|
extractionFailureIndicator;
|
|
36
40
|
structured_FieldsTab;
|
|
37
41
|
structured_TablesTab;
|
|
@@ -48,18 +52,25 @@ class IdpCreatePage {
|
|
|
48
52
|
structured_SuccessfullPublishNotification;
|
|
49
53
|
constructor(page) {
|
|
50
54
|
this.page = page;
|
|
55
|
+
// Hub renders the plain "Create extraction template" button while
|
|
56
|
+
// classification is unavailable for the environment, and the "Create new"
|
|
57
|
+
// dropdown (extraction / classification items) once it is.
|
|
51
58
|
this.createIdpTemplateButton = page.getByRole('button', {
|
|
52
59
|
name: 'Create extraction template',
|
|
53
60
|
exact: true,
|
|
54
61
|
});
|
|
62
|
+
this.createNewDropdownButton = page.locator('[data-test="idp-create-template-dropdown"]');
|
|
63
|
+
this.createExtractionTemplateOption = page.locator('[data-test="create-extraction-template"]');
|
|
55
64
|
this.idpExtractionTemplateName = page.locator('#idp-project-name');
|
|
56
|
-
this.idpDescriptionField = page
|
|
65
|
+
this.idpDescriptionField = page
|
|
66
|
+
.getByRole('dialog', { name: 'Create extraction template' })
|
|
67
|
+
.locator('#idp-project-description');
|
|
57
68
|
this.createIdpExtractationTemplateButton = page.getByRole('button', {
|
|
58
69
|
name: 'Create template',
|
|
59
70
|
exact: true,
|
|
60
71
|
});
|
|
61
|
-
this.unstructured_UploadFilesButton = page.getByRole('
|
|
62
|
-
name:
|
|
72
|
+
this.unstructured_UploadFilesButton = page.getByRole('region', {
|
|
73
|
+
name: /Drag and drop.*PDF.*upload/i,
|
|
63
74
|
});
|
|
64
75
|
this.extractButton = page.getByRole('button', {
|
|
65
76
|
name: 'Extract',
|
|
@@ -68,7 +79,7 @@ class IdpCreatePage {
|
|
|
68
79
|
this.unstructured_extractFieldName = page.locator('#new-extraction-field-name');
|
|
69
80
|
this.unstructured_extractFieldPrompt = page.locator('#new-extraction-field-prompt');
|
|
70
81
|
this.unstructured_addExtractionFieldButton = page.getByRole('button', {
|
|
71
|
-
name: 'Add',
|
|
82
|
+
name: 'Add field',
|
|
72
83
|
exact: true,
|
|
73
84
|
});
|
|
74
85
|
this.unstructured_extractionModelDropdown =
|
|
@@ -82,26 +93,51 @@ class IdpCreatePage {
|
|
|
82
93
|
this.unstructured_validateExtractionTab = page.getByRole('tab', {
|
|
83
94
|
name: 'Validate extraction',
|
|
84
95
|
});
|
|
85
|
-
this.unstructured_testCaseSavedNotification = page.getByText('
|
|
86
|
-
this.unstructured_expandAllRowsButton = page
|
|
96
|
+
this.unstructured_testCaseSavedNotification = page.getByText('Test case successfully saved');
|
|
97
|
+
this.unstructured_expandAllRowsButton = page
|
|
98
|
+
.getByRole('row')
|
|
99
|
+
.filter({ hasText: 'bank_account_number' })
|
|
100
|
+
.getByRole('button')
|
|
101
|
+
.first()
|
|
102
|
+
.or(page.getByLabel('Expand all rows'));
|
|
87
103
|
this.unstructured_passTestCaseResultsRows = page.locator('[data-test="pass-test-case-results"]');
|
|
88
104
|
this.unstructured_publishButton = page.getByRole('button', {
|
|
89
105
|
name: 'Publish',
|
|
90
106
|
});
|
|
91
107
|
this.unstructured_publishToProjecOption = page.getByRole('menuitem', {
|
|
92
|
-
name:
|
|
108
|
+
name: /^Publish to (project|workspace)$/,
|
|
93
109
|
});
|
|
94
110
|
this.unstructured_versionFieldName = page.locator('#version-name');
|
|
95
111
|
this.unstructured_versionFieldDescription = page.locator('#version-description');
|
|
96
112
|
this.unstructured_publishButtonModal = page
|
|
97
113
|
.getByLabel('Publish Extraction Project')
|
|
98
114
|
.getByRole('button', { name: 'Publish' });
|
|
99
|
-
this.unstructured_idpSuccessfullPublishNotification = page.getByText('
|
|
100
|
-
this.unstructured_toastNotificationCloseButton =
|
|
101
|
-
|
|
115
|
+
this.unstructured_idpSuccessfullPublishNotification = page.getByText('IDP project published successfully.');
|
|
116
|
+
this.unstructured_toastNotificationCloseButton = page
|
|
117
|
+
.locator('[data-sonner-toast]')
|
|
118
|
+
.getByRole('button', { name: 'Dismiss' })
|
|
119
|
+
.or(page.getByLabel('Close notification'))
|
|
120
|
+
.first();
|
|
102
121
|
this.selectUnstructuredDataExtraction = page.getByText('Unstructured data extraction');
|
|
103
|
-
|
|
122
|
+
// The design-system radio tile exposes a `radio` named after its title and
|
|
123
|
+
// description and renders no `label[for]`, so match on the role and keep the
|
|
124
|
+
// id/label lookups for the Carbon variant.
|
|
125
|
+
this.selectStructuredDataExtraction = page
|
|
126
|
+
.getByRole('radio', { name: /^Structured form extraction/ })
|
|
127
|
+
.or(page.locator('#idp-project-extraction-method-structured'))
|
|
128
|
+
.first();
|
|
129
|
+
this.selectStructuredDataExtractionLabel = page
|
|
130
|
+
.getByRole('radiogroup')
|
|
131
|
+
.getByText('Structured form extraction')
|
|
132
|
+
.or(page.locator('label[for="idp-project-extraction-method-structured"]'))
|
|
133
|
+
.first();
|
|
104
134
|
this.extractionInProgressNotification = page.getByText('Extracting document...');
|
|
135
|
+
// Structured extraction cycles through several progress messages before it
|
|
136
|
+
// finishes: "Extracting document..." (single file, Configure template),
|
|
137
|
+
// "Extracting documents..." (multiple files, Test template) and finally
|
|
138
|
+
// "Just a little bit more...". Matching only the first one made the
|
|
139
|
+
// progress gate a no-op.
|
|
140
|
+
this.structured_ExtractionInProgress = page.getByText(/Extracting documents?\.\.\.|Just a little bit more\.\.\./);
|
|
105
141
|
// Terminal states the product renders when extraction itself fails: the
|
|
106
142
|
// error toast (unstructured) and the empty state (structured). Both persist,
|
|
107
143
|
// so they can be probed once the in-progress indicator clears.
|
|
@@ -112,12 +148,10 @@ class IdpCreatePage {
|
|
|
112
148
|
name: 'Extraction could not be completed',
|
|
113
149
|
}));
|
|
114
150
|
this.structured_uploadFilesButton = page
|
|
115
|
-
.getByRole('
|
|
116
|
-
name: /Drag and drop.*PDF.*upload/i,
|
|
117
|
-
})
|
|
151
|
+
.getByRole('region', { name: /Drag and drop.*PDF.*upload/i })
|
|
118
152
|
.first();
|
|
119
153
|
this.structured_FieldsTab = page.getByRole('tab', {
|
|
120
|
-
name:
|
|
154
|
+
name: /fields/i,
|
|
121
155
|
});
|
|
122
156
|
this.structured_TablesTab = page.getByRole('tab', {
|
|
123
157
|
name: 'Tables',
|
|
@@ -125,12 +159,19 @@ class IdpCreatePage {
|
|
|
125
159
|
this.structured_TestTemplateTab = page.getByRole('tab', {
|
|
126
160
|
name: 'Test template',
|
|
127
161
|
});
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
162
|
+
// The design-system table puts `aria-label="Activate all rows"` on the
|
|
163
|
+
// header checkbox itself, so the column header no longer carries that name.
|
|
164
|
+
this.structured_CheckboxSelectAllFields = page
|
|
165
|
+
.getByRole('checkbox', { name: 'Activate all rows' })
|
|
166
|
+
.or(page
|
|
167
|
+
.getByRole('table', { name: 'Extracted fields' })
|
|
168
|
+
.getByRole('columnheader')
|
|
169
|
+
.getByRole('checkbox'))
|
|
170
|
+
.first();
|
|
171
|
+
this.structured_CheckboxSelectAllTables = page
|
|
172
|
+
.getByText('Select all tables')
|
|
173
|
+
.first();
|
|
174
|
+
this.structured_SelectedFieldsTablesMessage = page.getByText(/^\s*\d+\s+fields?\s*&\s*\d+\s+tables?\s+selected$/);
|
|
134
175
|
this.structured_TestExtractionTemplateButton = page.getByRole('button', {
|
|
135
176
|
name: 'Test extraction template',
|
|
136
177
|
});
|
|
@@ -149,7 +190,14 @@ class IdpCreatePage {
|
|
|
149
190
|
});
|
|
150
191
|
this.structured_SuccessfullPublishNotification =
|
|
151
192
|
page.getByText('Template published');
|
|
152
|
-
|
|
193
|
+
// The design-system `SelectTrigger` the IDP dialogs now render carries
|
|
194
|
+
// `aria-labelledby` pointing at a `Label` that emits no matching `id`, so
|
|
195
|
+
// the trigger exposes no accessible name and a role+name query matches
|
|
196
|
+
// nothing. Target the trigger ids the dialogs set, keeping the role+name
|
|
197
|
+
// match for the Carbon variant.
|
|
198
|
+
this.providerDropdown = page
|
|
199
|
+
.locator('#idp-classification-project-provider-select, #idp-extraction-project-provider-select')
|
|
200
|
+
.or(page.getByRole('combobox', { name: 'Provider' }));
|
|
153
201
|
}
|
|
154
202
|
/**
|
|
155
203
|
* Surfaces a product-side extraction failure as the test error instead of
|
|
@@ -168,7 +216,27 @@ class IdpCreatePage {
|
|
|
168
216
|
throw new Error(`${step} failed in the product: ${detail}`);
|
|
169
217
|
}
|
|
170
218
|
async clickCreateIdpTemplateButton() {
|
|
171
|
-
await this.createIdpTemplateButton.
|
|
219
|
+
await (0, test_1.expect)(this.createIdpTemplateButton.or(this.createNewDropdownButton).first()).toBeVisible({ timeout: 60000 });
|
|
220
|
+
if (await this.createIdpTemplateButton.isVisible()) {
|
|
221
|
+
await this.createIdpTemplateButton.click({ timeout: 60000 });
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
225
|
+
if (!(await this.createExtractionTemplateOption.isVisible())) {
|
|
226
|
+
await this.createNewDropdownButton.click({ timeout: 60000 });
|
|
227
|
+
}
|
|
228
|
+
try {
|
|
229
|
+
await (0, test_1.expect)(this.createExtractionTemplateOption).toBeVisible({
|
|
230
|
+
timeout: 10000,
|
|
231
|
+
});
|
|
232
|
+
await this.createExtractionTemplateOption.click({ timeout: 10000 });
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
// menu did not open, or item detached before the click; retry
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
throw new Error('Failed to click create extraction template option after 3 attempts');
|
|
172
240
|
}
|
|
173
241
|
async fillIdpExtractionTemplateName(name) {
|
|
174
242
|
await this.idpExtractionTemplateName.fill(name);
|
|
@@ -179,8 +247,9 @@ class IdpCreatePage {
|
|
|
179
247
|
});
|
|
180
248
|
}
|
|
181
249
|
async clickUnstructuredUploadFilesButton() {
|
|
182
|
-
await this.unstructured_UploadFilesButton.
|
|
183
|
-
|
|
250
|
+
await (0, test_1.expect)(this.unstructured_UploadFilesButton).toBeVisible({
|
|
251
|
+
timeout: 60000,
|
|
252
|
+
});
|
|
184
253
|
}
|
|
185
254
|
async clickExtractButton() {
|
|
186
255
|
await (0, test_1.expect)(this.extractButton).toBeEnabled({
|
|
@@ -200,15 +269,21 @@ class IdpCreatePage {
|
|
|
200
269
|
}
|
|
201
270
|
async selectExtractionModelOption(option) {
|
|
202
271
|
const comboboxOption = this.page.getByRole('option', { name: option });
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
272
|
+
for (let attempt = 0; attempt < 4; attempt++) {
|
|
273
|
+
if (!(await comboboxOption.isVisible())) {
|
|
274
|
+
await this.unstructured_extractionModelDropdown.click({
|
|
275
|
+
timeout: 60000,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
try {
|
|
279
|
+
await comboboxOption.click({ timeout: 10000 });
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
catch {
|
|
283
|
+
// list re-rendered and detached the option mid-click; reopen and retry
|
|
284
|
+
}
|
|
211
285
|
}
|
|
286
|
+
throw new Error(`Failed to select extraction model ${option} after 4 attempts`);
|
|
212
287
|
}
|
|
213
288
|
async clickExtractDocumentButton() {
|
|
214
289
|
await (0, test_1.expect)(this.unstructured_extractDocumentButton).toBeVisible({
|
|
@@ -291,19 +366,41 @@ class IdpCreatePage {
|
|
|
291
366
|
});
|
|
292
367
|
}
|
|
293
368
|
async selectStructuredDataExtractionMethod() {
|
|
294
|
-
await this.
|
|
369
|
+
await (0, test_1.expect)(this.selectStructuredDataExtractionLabel).toBeVisible({
|
|
370
|
+
timeout: 30000,
|
|
371
|
+
});
|
|
372
|
+
const maxRetries = 3;
|
|
373
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
374
|
+
await this.selectStructuredDataExtractionLabel.click({ timeout: 60000 });
|
|
375
|
+
const isChecked = await this.selectStructuredDataExtraction.isChecked();
|
|
376
|
+
if (isChecked)
|
|
377
|
+
return;
|
|
378
|
+
console.warn(`Structured extraction not selected on attempt ${attempt}, retrying...`);
|
|
379
|
+
await this.page.waitForTimeout(1000);
|
|
380
|
+
}
|
|
381
|
+
await (0, test_1.expect)(this.selectStructuredDataExtraction).toBeChecked({
|
|
382
|
+
timeout: 5000,
|
|
383
|
+
});
|
|
295
384
|
}
|
|
296
385
|
async clickStructuredUploadFilesButton() {
|
|
297
386
|
await (0, test_1.expect)(this.structured_uploadFilesButton).toBeVisible({
|
|
298
387
|
timeout: 60000,
|
|
299
388
|
});
|
|
300
|
-
|
|
301
|
-
|
|
389
|
+
}
|
|
390
|
+
// Blocks until the structured extraction really finished, instead of until
|
|
391
|
+
// one particular progress message went away. The LLM-backed extraction takes
|
|
392
|
+
// several minutes and its duration varies per provider and per run.
|
|
393
|
+
async waitForStructuredExtractionToFinish(timeout = 420000) {
|
|
394
|
+
const inProgress = this.structured_ExtractionInProgress.first();
|
|
395
|
+
// The progress message can lag the upload/click by a moment; if extraction
|
|
396
|
+
// was already done by the time we look, carry on to the not-visible check.
|
|
397
|
+
await inProgress
|
|
398
|
+
.waitFor({ state: 'visible', timeout: 15000 })
|
|
399
|
+
.catch(() => undefined);
|
|
400
|
+
await (0, test_1.expect)(inProgress).not.toBeVisible({ timeout });
|
|
302
401
|
}
|
|
303
402
|
async selectAllExtractionFields() {
|
|
304
|
-
await
|
|
305
|
-
timeout: 300000,
|
|
306
|
-
});
|
|
403
|
+
await this.waitForStructuredExtractionToFinish();
|
|
307
404
|
await this.assertNoExtractionFailure('Structured form extraction');
|
|
308
405
|
try {
|
|
309
406
|
await (0, test_1.expect)(this.structured_FieldsTab).toBeVisible({
|
|
@@ -347,9 +444,7 @@ class IdpCreatePage {
|
|
|
347
444
|
timeout: 60000,
|
|
348
445
|
});
|
|
349
446
|
await this.structured_TestExtractionTemplateButton.click({ timeout: 60000 });
|
|
350
|
-
await
|
|
351
|
-
timeout: 300000,
|
|
352
|
-
});
|
|
447
|
+
await this.waitForStructuredExtractionToFinish();
|
|
353
448
|
}
|
|
354
449
|
async extractionResultsAreVisible() {
|
|
355
450
|
await (0, test_1.expect)(this.structured_TestSummaryResult).toBeVisible({
|
|
@@ -382,10 +477,19 @@ class IdpCreatePage {
|
|
|
382
477
|
await this.idpDescriptionField.fill(description);
|
|
383
478
|
}
|
|
384
479
|
async selectProvider(provider) {
|
|
385
|
-
await this.providerDropdown.
|
|
480
|
+
await (0, test_1.expect)(this.providerDropdown).toBeVisible({ timeout: 60000 });
|
|
481
|
+
await (0, test_1.expect)(async () => {
|
|
482
|
+
// The dialog can hand the trigger an already-open listbox; clicking it
|
|
483
|
+
// then closes the menu instead of opening it.
|
|
484
|
+
const isExpanded = (await this.providerDropdown.getAttribute('aria-expanded')) === 'true';
|
|
485
|
+
if (!isExpanded) {
|
|
486
|
+
await this.providerDropdown.click({ timeout: 10000 });
|
|
487
|
+
}
|
|
488
|
+
await (0, test_1.expect)(this.providerDropdown).toHaveAttribute('aria-expanded', 'true', { timeout: 5000 });
|
|
489
|
+
}).toPass({ timeout: 60000 });
|
|
386
490
|
const providerOption = this.page
|
|
387
|
-
.
|
|
388
|
-
.
|
|
491
|
+
.locator('[role="listbox"] [role="option"]')
|
|
492
|
+
.filter({ hasText: new RegExp(`^${provider}$`) });
|
|
389
493
|
await (0, test_1.expect)(providerOption).toBeVisible({ timeout: 120000 });
|
|
390
494
|
await providerOption.click({ timeout: 120000 });
|
|
391
495
|
}
|
|
@@ -31,6 +31,9 @@ declare class ModelerHomePage {
|
|
|
31
31
|
readonly messageBanner: Locator;
|
|
32
32
|
readonly idpTemplateOption: Locator;
|
|
33
33
|
readonly idpEmptyStateButton: Locator;
|
|
34
|
+
readonly idpProjectsTab: Locator;
|
|
35
|
+
readonly createIdpProjectButton: Locator;
|
|
36
|
+
readonly workspaceRootBreadcrumb: Locator;
|
|
34
37
|
readonly idpApplicationNameInput: Locator;
|
|
35
38
|
readonly createIdpApplicationButton: Locator;
|
|
36
39
|
readonly dialog: Locator;
|
|
@@ -9,6 +9,7 @@ const randomName_1 = require("../../utils/randomName");
|
|
|
9
9
|
const ProcessApplicationPage_1 = require("./ProcessApplicationPage");
|
|
10
10
|
const submitModalWithRetry_1 = require("../../utils/assertionHelpers/submitModalWithRetry");
|
|
11
11
|
const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
|
|
12
|
+
const modelerCluster_1 = require("../../utils/modelerCluster");
|
|
12
13
|
const hubResourceRename_1 = require("../../utils/hubResourceRename");
|
|
13
14
|
class ModelerHomePage {
|
|
14
15
|
defaultFolderName = 'Cross Component Test Project';
|
|
@@ -58,6 +59,9 @@ class ModelerHomePage {
|
|
|
58
59
|
messageBanner;
|
|
59
60
|
idpTemplateOption;
|
|
60
61
|
idpEmptyStateButton;
|
|
62
|
+
idpProjectsTab;
|
|
63
|
+
createIdpProjectButton;
|
|
64
|
+
workspaceRootBreadcrumb;
|
|
61
65
|
idpApplicationNameInput;
|
|
62
66
|
createIdpApplicationButton;
|
|
63
67
|
dialog;
|
|
@@ -127,7 +131,12 @@ class ModelerHomePage {
|
|
|
127
131
|
.locator('[data-test="rename-input"]')
|
|
128
132
|
.or(page.locator('[data-test="editable-input"]'))
|
|
129
133
|
.first();
|
|
130
|
-
|
|
134
|
+
// Hub's workspace projects page renamed IDP applications to "IDP projects"
|
|
135
|
+
// (camunda-hub CreateIdpApplicationModal.common.tsx).
|
|
136
|
+
this.idpApplicationNameInput = page
|
|
137
|
+
.getByPlaceholder('New IDP Application')
|
|
138
|
+
.or(page.getByPlaceholder('New IDP project'))
|
|
139
|
+
.first();
|
|
131
140
|
this.createIdpApplicationButton = page.getByRole('button', {
|
|
132
141
|
name: 'Create',
|
|
133
142
|
exact: true,
|
|
@@ -142,6 +151,13 @@ class ModelerHomePage {
|
|
|
142
151
|
this.idpEmptyStateButton = page.getByRole('button', {
|
|
143
152
|
name: 'Create IDP application',
|
|
144
153
|
});
|
|
154
|
+
// Hub's workspace projects page (camunda-hub WorkspaceProjects.tsx) has no
|
|
155
|
+
// create menu at the root: IDP projects live on their own tab, created
|
|
156
|
+
// through its "Create IDP project" split button (header or empty state).
|
|
157
|
+
this.idpProjectsTab = page.locator('[data-test="tab-idp-applications"]');
|
|
158
|
+
this.createIdpProjectButton = page
|
|
159
|
+
.getByRole('button', { name: 'Create IDP project', exact: true })
|
|
160
|
+
.first();
|
|
145
161
|
// Camunda Hub's design-system shell renders this trigger as
|
|
146
162
|
// `create-action-dropdown` (CreateActionDs.tsx, accessible name "Create
|
|
147
163
|
// new"); `diagram-dropdown` is the legacy shell's id and survives only in
|
|
@@ -188,6 +204,12 @@ class ModelerHomePage {
|
|
|
188
204
|
.getByRole('button', { name: this.defaultFolderName, exact: true })
|
|
189
205
|
.last())
|
|
190
206
|
.first();
|
|
207
|
+
// The trail reads "<org> / <workspace> / <project>" and the workspace and
|
|
208
|
+
// its project share a name, so the workspace root is the FIRST match;
|
|
209
|
+
// `workspaceBreadcrumb` above deliberately takes the last one.
|
|
210
|
+
this.workspaceRootBreadcrumb = (0, hubResourceRename_1.hubBreadcrumbs)(page)
|
|
211
|
+
.getByRole('link', { name: this.defaultFolderName, exact: true })
|
|
212
|
+
.first();
|
|
191
213
|
this.homeBreadcrumb = page.locator('[data-test="breadcrumb-home"]');
|
|
192
214
|
this.openOrganizationsButton = page.getByLabel('Open Organizations');
|
|
193
215
|
this.manageButton = page.getByRole('menuitem', { name: 'Manage' });
|
|
@@ -1244,6 +1266,13 @@ class ModelerHomePage {
|
|
|
1244
1266
|
async selectCluster(clusterName) {
|
|
1245
1267
|
//Select the correct cluster if multiple exist
|
|
1246
1268
|
const baseClusterName = clusterName.split('(')[0].trim();
|
|
1269
|
+
// With Hub's Environments feature on (camunda-hub#29210) the IDP create
|
|
1270
|
+
// dialog picks an Environment row instead of a cluster toggle.
|
|
1271
|
+
const hasEnvironmentRow = await this.becameVisible(this.dialog.locator('[data-test^="environment-row-"]').first(), 10000);
|
|
1272
|
+
if (hasEnvironmentRow) {
|
|
1273
|
+
await (0, modelerCluster_1.selectDeployEnvironment)(this.dialog, baseClusterName);
|
|
1274
|
+
return;
|
|
1275
|
+
}
|
|
1247
1276
|
const cluster = this.dialog.getByText(new RegExp(`^${baseClusterName}`));
|
|
1248
1277
|
await (0, test_1.expect)(cluster).toBeVisible({
|
|
1249
1278
|
timeout: 30000,
|
|
@@ -1267,10 +1296,27 @@ class ModelerHomePage {
|
|
|
1267
1296
|
// "Create IDP application" button, so waiting for the create menu there
|
|
1268
1297
|
// times out. Race both entry points, then use whichever one rendered.
|
|
1269
1298
|
async startIdpApplicationCreation() {
|
|
1270
|
-
|
|
1299
|
+
// clickCrossComponentProjectFolder() lands inside the project, but IDP
|
|
1300
|
+
// projects only exist at the workspace root. The projects list renders the
|
|
1301
|
+
// IDP tab and the "New project" button, never an open project, so their
|
|
1302
|
+
// absence means a hop back through the breadcrumb is needed.
|
|
1303
|
+
const atWorkspaceRoot = await this.becameVisible(this.idpProjectsTab.or(this.createNewProjectButton).first(), 10000);
|
|
1304
|
+
if (!atWorkspaceRoot) {
|
|
1305
|
+
await this.workspaceRootBreadcrumb.click({ timeout: 30000 });
|
|
1306
|
+
}
|
|
1307
|
+
const rootLoaded = await this.becameVisible(this.idpEmptyStateButton
|
|
1308
|
+
.or(this.diagramTypeDropdown)
|
|
1309
|
+
.or(this.idpProjectsTab)
|
|
1310
|
+
.first(), 60000);
|
|
1271
1311
|
if (!rootLoaded) {
|
|
1272
1312
|
await this.page.reload();
|
|
1273
1313
|
}
|
|
1314
|
+
if (await this.becameVisible(this.idpProjectsTab, 5000)) {
|
|
1315
|
+
await this.idpProjectsTab.click({ timeout: 30000 });
|
|
1316
|
+
await (0, test_1.expect)(this.createIdpProjectButton).toBeVisible({ timeout: 60000 });
|
|
1317
|
+
await this.createIdpProjectButton.click({ timeout: 30000 });
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1274
1320
|
if (await this.becameVisible(this.idpEmptyStateButton, 5000)) {
|
|
1275
1321
|
await this.idpEmptyStateButton.click({ timeout: 60000 });
|
|
1276
1322
|
return;
|
|
@@ -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
|
_8_8_1.test.describe.configure({ mode: 'parallel' });
|
|
54
55
|
_8_8_1.test.describe('IDP User Flow Tests', () => {
|
|
@@ -62,14 +63,7 @@ _8_8_1.test.describe('IDP User Flow Tests', () => {
|
|
|
62
63
|
});
|
|
63
64
|
_8_8_1.test.describe('Unstructured Extraction', () => {
|
|
64
65
|
for (const params of unstructuredTestCases) {
|
|
65
|
-
|
|
66
|
-
// about outbound REST connectors + {{secrets.*}} masking, unrelated to
|
|
67
|
-
// this symptom: "Save as test case" never becomes enabled after
|
|
68
|
-
// extraction is triggered (120s timeout). 100% hard-fail for AWS,
|
|
69
|
-
// Azure, and GCP, both attempt and retry, in both chromium-v1 and
|
|
70
|
-
// chromium-v2 (PR #3349, run 34128373455). Mis-attributed to #8500
|
|
71
|
-
// originally; needs its own bug filed before unskipping again.
|
|
72
|
-
_8_8_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, }) => {
|
|
66
|
+
(0, _8_8_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, }) => {
|
|
73
67
|
_8_8_1.test.slow();
|
|
74
68
|
idpApplicationName = await (0, randomName_1.randomNameAgregator)(`${params.provider} unstructured` + ' - IDP_Application_Name');
|
|
75
69
|
idpDocumentExtractionTemplateName = await (0, randomName_1.randomNameAgregator)(`${params.provider} unstructured` + ' - IDP_Extraction_Template_Name');
|
|
@@ -144,11 +138,7 @@ _8_8_1.test.describe('IDP User Flow Tests', () => {
|
|
|
144
138
|
});
|
|
145
139
|
_8_8_1.test.describe('Structured Extraction', () => {
|
|
146
140
|
for (const params of structuredTestCases) {
|
|
147
|
-
|
|
148
|
-
// comment. 100% hard-fail for both AWS and GCP, both attempt and
|
|
149
|
-
// retry, in both chromium-v1 and chromium-v2 (PR #3349, run
|
|
150
|
-
// 34128373455). Not bug #8500.
|
|
151
|
-
_8_8_1.test.skip(`${params.provider} structured - User creates an idp application with a document extraction template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
|
|
141
|
+
(0, _8_8_1.test)(`${params.provider} structured - User creates an idp application with a document extraction template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
|
|
152
142
|
_8_8_1.test.slow();
|
|
153
143
|
idpApplicationName = await (0, randomName_1.randomNameAgregator)(`${params.provider} structured` + ' - IDP_Application_Name');
|
|
154
144
|
idpDocumentExtractionTemplateName = await (0, randomName_1.randomNameAgregator)(`${params.provider} structured` + ' - IDP_Extraction_Template_Name');
|