@camunda/e2e-test-suite 0.0.1511 → 0.0.1512
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.
- package/dist/pages/8.10/IdpCreatePage.js +1 -1
- package/dist/pages/8.10/ModelerCreatePage.js +1 -1
- package/dist/pages/8.11/IdpCreatePage.js +4 -2
- package/dist/pages/8.11/ModelerCreatePage.js +1 -1
- package/dist/pages/8.7/ModelerCreatePage.js +1 -1
- package/dist/pages/8.8/ModelerCreatePage.js +1 -1
- package/dist/pages/8.9/IdpCreatePage.js +3 -1
- package/dist/pages/8.9/ModelerCreatePage.js +1 -1
- package/dist/pages/SM-8.8/IdpCreatePage.d.ts +2 -0
- package/dist/pages/SM-8.8/IdpCreatePage.js +42 -4
- package/package.json +1 -1
|
@@ -116,7 +116,7 @@ class IdpCreatePage {
|
|
|
116
116
|
name: 'Publish',
|
|
117
117
|
});
|
|
118
118
|
this.unstructured_publishToProjecOption = page.getByRole('menuitem', {
|
|
119
|
-
name: 'Publish to
|
|
119
|
+
name: 'Publish to workspace',
|
|
120
120
|
});
|
|
121
121
|
this.unstructured_versionFieldName = page.locator('#version-name');
|
|
122
122
|
this.unstructured_versionFieldDescription = page.locator('#version-description');
|
|
@@ -265,7 +265,7 @@ class ModelerCreatePage {
|
|
|
265
265
|
this.createEndEvent = page.getByTitle('Create end event');
|
|
266
266
|
this.canvas = page.locator('.djs-container');
|
|
267
267
|
this.zoomOutButton = page.locator('[data-test="zoom-out"]');
|
|
268
|
-
this.endEventCanvas = page.locator('
|
|
268
|
+
this.endEventCanvas = page.locator('.bjs-container');
|
|
269
269
|
this.connectToOtherElementButton = page.getByRole('button', {
|
|
270
270
|
name: 'Connect to other element',
|
|
271
271
|
});
|
|
@@ -115,8 +115,10 @@ class IdpCreatePage {
|
|
|
115
115
|
this.unstructured_publishButton = page.getByRole('button', {
|
|
116
116
|
name: 'Publish',
|
|
117
117
|
});
|
|
118
|
+
// Hub renames "project" to "workspace" once the org has
|
|
119
|
+
// workspacesEnabled, so the publish menu offers "Publish to workspace".
|
|
118
120
|
this.unstructured_publishToProjecOption = page.getByRole('menuitem', {
|
|
119
|
-
name:
|
|
121
|
+
name: /^Publish to (project|workspace)$/,
|
|
120
122
|
});
|
|
121
123
|
this.unstructured_versionFieldName = page.locator('#version-name');
|
|
122
124
|
this.unstructured_versionFieldDescription = page.locator('#version-description');
|
|
@@ -194,7 +196,7 @@ class IdpCreatePage {
|
|
|
194
196
|
this.classifyingLoader = page.getByText('Classifying...');
|
|
195
197
|
// Hub notifications render either as a Carbon alert or, once the
|
|
196
198
|
// design-system toast is on, as a sonner toast carrying no alert role.
|
|
197
|
-
const publishSuccessText =
|
|
199
|
+
const publishSuccessText = /IDP (project|workspace) published successfully\./;
|
|
198
200
|
this.classificationSuccessfullPublishNotification = page
|
|
199
201
|
.getByRole('alert')
|
|
200
202
|
.filter({ hasText: publishSuccessText })
|
|
@@ -265,7 +265,7 @@ class ModelerCreatePage {
|
|
|
265
265
|
this.createEndEvent = page.getByTitle('Create end event');
|
|
266
266
|
this.canvas = page.locator('.djs-container');
|
|
267
267
|
this.zoomOutButton = page.locator('[data-test="zoom-out"]');
|
|
268
|
-
this.endEventCanvas = page.locator('
|
|
268
|
+
this.endEventCanvas = page.locator('.bjs-container');
|
|
269
269
|
this.connectToOtherElementButton = page.getByRole('button', {
|
|
270
270
|
name: 'Connect to other element',
|
|
271
271
|
});
|
|
@@ -227,7 +227,7 @@ class ModelerCreatePage {
|
|
|
227
227
|
this.createTask = page.getByTitle('Create task');
|
|
228
228
|
this.createEndEvent = page.getByTitle('Create end event');
|
|
229
229
|
this.canvas = page.locator('rect').nth(1);
|
|
230
|
-
this.endEventCanvas = page.locator('
|
|
230
|
+
this.endEventCanvas = page.locator('.bjs-container');
|
|
231
231
|
this.connectToOtherElementButton = page.getByRole('button', {
|
|
232
232
|
name: 'Connect to other element',
|
|
233
233
|
});
|
|
@@ -268,7 +268,7 @@ class ModelerCreatePage {
|
|
|
268
268
|
this.createEndEvent = page.getByTitle('Create end event');
|
|
269
269
|
this.canvas = page.locator('.djs-container');
|
|
270
270
|
this.zoomOutButton = page.locator('[data-test="zoom-out"]');
|
|
271
|
-
this.endEventCanvas = page.locator('
|
|
271
|
+
this.endEventCanvas = page.locator('.bjs-container');
|
|
272
272
|
this.connectToOtherElementButton = page.getByRole('button', {
|
|
273
273
|
name: 'Connect to other element',
|
|
274
274
|
});
|
|
@@ -116,8 +116,10 @@ class IdpCreatePage {
|
|
|
116
116
|
this.unstructured_publishButton = page.getByRole('button', {
|
|
117
117
|
name: 'Publish',
|
|
118
118
|
});
|
|
119
|
+
// Hub renamed the action to "Publish to workspace" (camunda-hub#30780);
|
|
120
|
+
// the legacy renderer still says "Publish to project".
|
|
119
121
|
this.unstructured_publishToProjecOption = page.getByRole('menuitem', {
|
|
120
|
-
name:
|
|
122
|
+
name: /^Publish to (workspace|project)$/,
|
|
121
123
|
});
|
|
122
124
|
this.unstructured_versionFieldName = page.locator('#version-name');
|
|
123
125
|
this.unstructured_versionFieldDescription = page.locator('#version-description');
|
|
@@ -249,7 +249,7 @@ class ModelerCreatePage {
|
|
|
249
249
|
this.createEndEvent = page.getByTitle('Create end event');
|
|
250
250
|
this.canvas = page.locator('.djs-container');
|
|
251
251
|
this.zoomOutButton = page.locator('[data-test="zoom-out"]');
|
|
252
|
-
this.endEventCanvas = page.locator('
|
|
252
|
+
this.endEventCanvas = page.locator('.bjs-container');
|
|
253
253
|
this.connectToOtherElementButton = page.getByRole('button', {
|
|
254
254
|
name: 'Connect to other element',
|
|
255
255
|
});
|
|
@@ -41,6 +41,8 @@ declare class IdpCreatePage {
|
|
|
41
41
|
readonly structured_TestSummaryResult: Locator;
|
|
42
42
|
readonly structured_DetailsResult: Locator;
|
|
43
43
|
readonly structured_ExtractionFailedToast: Locator;
|
|
44
|
+
readonly structured_ExtractionNotCompletedHeading: Locator;
|
|
45
|
+
readonly structured_RerunExtractionButton: Locator;
|
|
44
46
|
readonly structured_PublishTemplateButton: Locator;
|
|
45
47
|
readonly structured_PublishTemplateToProjectButton: Locator;
|
|
46
48
|
readonly structured_SuccessfulPublishNotification: Locator;
|
|
@@ -45,6 +45,8 @@ class IdpCreatePage {
|
|
|
45
45
|
structured_TestSummaryResult;
|
|
46
46
|
structured_DetailsResult;
|
|
47
47
|
structured_ExtractionFailedToast;
|
|
48
|
+
structured_ExtractionNotCompletedHeading;
|
|
49
|
+
structured_RerunExtractionButton;
|
|
48
50
|
structured_PublishTemplateButton;
|
|
49
51
|
structured_PublishTemplateToProjectButton;
|
|
50
52
|
structured_SuccessfulPublishNotification;
|
|
@@ -139,6 +141,12 @@ class IdpCreatePage {
|
|
|
139
141
|
this.structured_ExtractionFailedToast = page
|
|
140
142
|
.getByText('Extraction failed')
|
|
141
143
|
.first();
|
|
144
|
+
this.structured_ExtractionNotCompletedHeading = page.getByRole('heading', {
|
|
145
|
+
name: 'Extraction could not be completed',
|
|
146
|
+
});
|
|
147
|
+
this.structured_RerunExtractionButton = page.getByRole('button', {
|
|
148
|
+
name: 'Rerun extraction',
|
|
149
|
+
});
|
|
142
150
|
this.structured_PublishTemplateButton = page.getByRole('button', {
|
|
143
151
|
name: 'Publish Template',
|
|
144
152
|
});
|
|
@@ -311,10 +319,40 @@ class IdpCreatePage {
|
|
|
311
319
|
});
|
|
312
320
|
}
|
|
313
321
|
async selectAllExtractionFields() {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
322
|
+
const maxRetries = 3;
|
|
323
|
+
const fieldsOrFailure = this.structured_CheckboxSelectAllFields
|
|
324
|
+
.or(this.structured_ExtractionNotCompletedHeading)
|
|
325
|
+
.first();
|
|
326
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
327
|
+
await (0, test_1.expect)(fieldsOrFailure).toBeVisible({ timeout: 120000 });
|
|
328
|
+
if (await this.structured_CheckboxSelectAllFields
|
|
329
|
+
.isVisible()
|
|
330
|
+
.catch(() => false)) {
|
|
331
|
+
await this.structured_CheckboxSelectAllFields.click({ timeout: 60000 });
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
const toasts = await this.page
|
|
335
|
+
.getByRole('alert')
|
|
336
|
+
.allInnerTexts()
|
|
337
|
+
.catch(() => []);
|
|
338
|
+
console.error(`Structured extraction attempt ${attempt + 1} did not complete: ` +
|
|
339
|
+
toasts.map((t) => t.replace(/\s+/g, ' ').trim()).join(' | '));
|
|
340
|
+
if (attempt < maxRetries - 1) {
|
|
341
|
+
for (let i = 0; i < 5; i++) {
|
|
342
|
+
if (!(await this.closeNotificationButton.isVisible()))
|
|
343
|
+
break;
|
|
344
|
+
await this.closeNotificationButton
|
|
345
|
+
.click({ timeout: 5000 })
|
|
346
|
+
.catch(() => { });
|
|
347
|
+
}
|
|
348
|
+
await (0, sleep_1.sleep)(5000);
|
|
349
|
+
await this.structured_RerunExtractionButton.click({ timeout: 60000 });
|
|
350
|
+
await (0, test_1.expect)(this.structured_ExtractionNotCompletedHeading).not.toBeVisible({ timeout: 30000 });
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
throw new Error(`Structured extraction of the uploaded document failed after ` +
|
|
354
|
+
`${maxRetries} attempts ("Extraction could not be completed"). ` +
|
|
355
|
+
`Check the document upload to the cluster / IDP backend.`);
|
|
318
356
|
}
|
|
319
357
|
async clickTablesTab() {
|
|
320
358
|
await (0, test_1.expect)(this.structured_TablesTab).toBeVisible({
|