@camunda/e2e-test-suite 0.0.1736 → 0.0.1738
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/ModelerCreatePage.js +26 -4
- package/dist/pages/8.11/ModelerHomePage.d.ts +3 -0
- package/dist/pages/8.11/ModelerHomePage.js +48 -4
- package/dist/pages/8.7/ModelerCreatePage.d.ts +1 -0
- package/dist/pages/8.7/ModelerCreatePage.js +15 -0
- package/dist/pages/8.7/ModelerHomePage.d.ts +1 -0
- package/dist/pages/8.7/ModelerHomePage.js +12 -0
- package/dist/pages/SM-8.9/ModelerCreatePage.js +2 -2
- package/dist/pages/SM-8.9/UtilitiesPage.js +8 -5
- package/package.json +1 -1
|
@@ -344,7 +344,7 @@ class ModelerCreatePage {
|
|
|
344
344
|
this.appendGatewayButton = page.getByRole('button', {
|
|
345
345
|
name: 'Append gateway',
|
|
346
346
|
});
|
|
347
|
-
this.parallelGatewayOption = page.
|
|
347
|
+
this.parallelGatewayOption = page.locator('.djs-popup-results [data-id="replace-with-parallel-gateway"]');
|
|
348
348
|
this.firstPlacedGateway = page
|
|
349
349
|
.locator('[data-element-id*="Gateway"]')
|
|
350
350
|
.first();
|
|
@@ -374,7 +374,7 @@ class ModelerCreatePage {
|
|
|
374
374
|
this.appendGatewayButton = page.getByRole('button', {
|
|
375
375
|
name: 'Append gateway',
|
|
376
376
|
});
|
|
377
|
-
this.parallelGatewayOption = page.
|
|
377
|
+
this.parallelGatewayOption = page.locator('.djs-popup-results [data-id="replace-with-parallel-gateway"]');
|
|
378
378
|
this.firstPlacedGateway = page
|
|
379
379
|
.locator('[data-element-id*="Gateway"]')
|
|
380
380
|
.first();
|
|
@@ -1533,8 +1533,30 @@ class ModelerCreatePage {
|
|
|
1533
1533
|
await this.appendGatewayButton.click({ timeout: 30000 });
|
|
1534
1534
|
}
|
|
1535
1535
|
async clickParallelGatewayOption() {
|
|
1536
|
-
|
|
1537
|
-
|
|
1536
|
+
// bpmn-js renders a parallel gateway's marker as a <path> in its visual
|
|
1537
|
+
// (exclusive has none); confirm the replace took and retry, else an invalid
|
|
1538
|
+
// diagram is saved and fails deploy validation.
|
|
1539
|
+
const parallelMarker = this.secondPlacedGateway
|
|
1540
|
+
.locator('.djs-visual path')
|
|
1541
|
+
.first();
|
|
1542
|
+
for (let attempt = 1; attempt <= 3; attempt++) {
|
|
1543
|
+
const popupOpen = await this.parallelGatewayOption
|
|
1544
|
+
.isVisible()
|
|
1545
|
+
.catch(() => false);
|
|
1546
|
+
if (!popupOpen) {
|
|
1547
|
+
await this.clickChangeTypeButton();
|
|
1548
|
+
}
|
|
1549
|
+
await (0, test_1.expect)(this.parallelGatewayOption).toBeVisible({ timeout: 30000 });
|
|
1550
|
+
await this.parallelGatewayOption.click({ timeout: 90000 });
|
|
1551
|
+
const converted = await parallelMarker
|
|
1552
|
+
.waitFor({ state: 'visible', timeout: 15000 })
|
|
1553
|
+
.then(() => true)
|
|
1554
|
+
.catch(() => false);
|
|
1555
|
+
if (converted) {
|
|
1556
|
+
return;
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
throw new Error('Gateway was not converted to a parallel gateway');
|
|
1538
1560
|
}
|
|
1539
1561
|
async clickFirstPlacedGateway() {
|
|
1540
1562
|
try {
|
|
@@ -51,6 +51,8 @@ declare class ModelerHomePage {
|
|
|
51
51
|
readonly renameProjectMenuItem: Locator;
|
|
52
52
|
readonly defaultNamedProjectRow: Locator;
|
|
53
53
|
readonly renameMenuItem: Locator;
|
|
54
|
+
readonly newEntityNameInput: Locator;
|
|
55
|
+
readonly newEntityNameSubmitButton: Locator;
|
|
54
56
|
constructor(page: Page);
|
|
55
57
|
dismissOverlays(): Promise<void>;
|
|
56
58
|
clickCreateNewProjectButton(): Promise<void>;
|
|
@@ -65,6 +67,7 @@ declare class ModelerHomePage {
|
|
|
65
67
|
clickWorkspaceDiagramTypeDropdown(): Promise<void>;
|
|
66
68
|
clickBpmnTemplateOption(): Promise<void>;
|
|
67
69
|
clickFormOption(): Promise<void>;
|
|
70
|
+
private confirmNewEntityName;
|
|
68
71
|
enterFormName(name: string): Promise<void>;
|
|
69
72
|
openFormRenameEditor(): Promise<void>;
|
|
70
73
|
enterFormNameWithRetry(name: string): Promise<void>;
|
|
@@ -75,6 +75,8 @@ class ModelerHomePage {
|
|
|
75
75
|
renameProjectMenuItem;
|
|
76
76
|
defaultNamedProjectRow;
|
|
77
77
|
renameMenuItem;
|
|
78
|
+
newEntityNameInput;
|
|
79
|
+
newEntityNameSubmitButton;
|
|
78
80
|
constructor(page) {
|
|
79
81
|
this.page = page;
|
|
80
82
|
this.processApplicationPage = new ProcessApplicationPage_1.ProcessApplicationPage(page);
|
|
@@ -264,6 +266,10 @@ class ModelerHomePage {
|
|
|
264
266
|
// addresses the still-unnamed project the create flow just added.
|
|
265
267
|
this.defaultNamedProjectRow = page.locator(`[data-test="entity-${this.defaultNewProjectName}"]`);
|
|
266
268
|
this.renameMenuItem = page.getByRole('menuitem', { name: 'Rename' });
|
|
269
|
+
// camunda-hub #31596 asks for the resource name up front: a create-menu item
|
|
270
|
+
// now opens this dialog (NewEntityNameDialog) before the resource exists.
|
|
271
|
+
this.newEntityNameInput = page.locator('[data-test="new-entity-name-input"]');
|
|
272
|
+
this.newEntityNameSubmitButton = page.locator('[data-test="new-entity-name-submit"]');
|
|
267
273
|
}
|
|
268
274
|
async dismissOverlays() {
|
|
269
275
|
// Before the generic pass, for the same reason
|
|
@@ -459,10 +465,21 @@ class ModelerHomePage {
|
|
|
459
465
|
async clickBpmnTemplateOption() {
|
|
460
466
|
const maxAttempts = 3;
|
|
461
467
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
462
|
-
|
|
463
|
-
|
|
468
|
+
// A failed create keeps the naming dialog open; resubmit it rather than
|
|
469
|
+
// reopening a menu the dialog's overlay covers.
|
|
470
|
+
if (!(await this.newEntityNameInput.isVisible())) {
|
|
471
|
+
await (0, test_1.expect)(this.bpmnTemplateOption).toBeVisible({
|
|
472
|
+
timeout: 15000,
|
|
473
|
+
});
|
|
474
|
+
await this.bpmnTemplateOption.click();
|
|
475
|
+
}
|
|
476
|
+
// #31596: confirm the naming dialog so the diagram is created and opens.
|
|
477
|
+
await this.confirmNewEntityName().catch((error) => {
|
|
478
|
+
if (attempt === maxAttempts) {
|
|
479
|
+
throw error;
|
|
480
|
+
}
|
|
481
|
+
return false;
|
|
464
482
|
});
|
|
465
|
-
await this.bpmnTemplateOption.click();
|
|
466
483
|
const opened = await this.page
|
|
467
484
|
.waitForURL(/\/diagrams\//, { timeout: 60000 })
|
|
468
485
|
.then(() => true)
|
|
@@ -471,12 +488,31 @@ class ModelerHomePage {
|
|
|
471
488
|
return;
|
|
472
489
|
}
|
|
473
490
|
console.warn(`No diagram opened on attempt ${attempt}; re-opening the create menu.`);
|
|
474
|
-
await this.
|
|
491
|
+
if (!(await this.newEntityNameInput.isVisible())) {
|
|
492
|
+
await this.clickDiagramTypeDropdown();
|
|
493
|
+
}
|
|
475
494
|
}
|
|
476
495
|
}
|
|
477
496
|
async clickFormOption() {
|
|
478
497
|
await this.formTemplateOption.click();
|
|
479
498
|
}
|
|
499
|
+
// camunda-hub #31596 asks for the resource name up front: a create-menu item
|
|
500
|
+
// now opens this dialog (NewEntityNameDialog) before the resource exists,
|
|
501
|
+
// instead of creating a placeholder renamed afterwards. Fills `name` when
|
|
502
|
+
// given, else accepts the prefilled default; returns false on a build that
|
|
503
|
+
// predates the dialog so the caller falls back to the old rename flow.
|
|
504
|
+
async confirmNewEntityName(name) {
|
|
505
|
+
if (!(await this.becameVisible(this.newEntityNameInput, 15000))) {
|
|
506
|
+
return false;
|
|
507
|
+
}
|
|
508
|
+
if (name !== undefined) {
|
|
509
|
+
await this.newEntityNameInput.fill(name, { timeout: 30000 });
|
|
510
|
+
await (0, test_1.expect)(this.newEntityNameInput).toHaveValue(name, { timeout: 5000 });
|
|
511
|
+
}
|
|
512
|
+
await this.newEntityNameSubmitButton.click({ timeout: 10000 });
|
|
513
|
+
await (0, test_1.expect)(this.newEntityNameInput).toBeHidden({ timeout: 30000 });
|
|
514
|
+
return true;
|
|
515
|
+
}
|
|
480
516
|
// The legacy shell opens a fresh form with its breadcrumb name in inline-edit
|
|
481
517
|
// mode. Nav-v2 has no inline editing: the form stays "New form" until renamed
|
|
482
518
|
// through the crumb's "<name> actions" kebab and the shared rename dialog.
|
|
@@ -489,6 +525,14 @@ class ModelerHomePage {
|
|
|
489
525
|
if (await this.formNameBreadcrumb(name).isVisible()) {
|
|
490
526
|
return;
|
|
491
527
|
}
|
|
528
|
+
// #31596: the form is named in this create dialog instead of being
|
|
529
|
+
// created as "New form" and renamed through the breadcrumb.
|
|
530
|
+
if (await this.confirmNewEntityName(name)) {
|
|
531
|
+
await (0, test_1.expect)(this.formNameBreadcrumb(name)).toBeVisible({
|
|
532
|
+
timeout: 30000,
|
|
533
|
+
});
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
492
536
|
const editorOpen = await this.becameVisible(this.formNameInput.or(this.renameInput).first(), 15000);
|
|
493
537
|
if (!editorOpen) {
|
|
494
538
|
await this.openFormRenameEditor();
|
|
@@ -148,6 +148,7 @@ declare class ModelerCreatePage {
|
|
|
148
148
|
clickDiagramBreadcrumb(): Promise<void>;
|
|
149
149
|
clickEditDiagramNameButton(): Promise<void>;
|
|
150
150
|
enterDiagramName(name: string): Promise<void>;
|
|
151
|
+
private isDiagramNameEditorOpen;
|
|
151
152
|
clickVariableInput(): Promise<void>;
|
|
152
153
|
fillVariableInput(variable: string): Promise<void>;
|
|
153
154
|
clickEmbedFormButton(): Promise<void>;
|
|
@@ -964,6 +964,12 @@ class ModelerCreatePage {
|
|
|
964
964
|
const maxAttempts = 3;
|
|
965
965
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
966
966
|
try {
|
|
967
|
+
// Since hub names files in a dialog before creating them (camunda-hub
|
|
968
|
+
// #31596) the inline editor no longer opens on a new diagram.
|
|
969
|
+
if (attempt === 1 && !(await this.isDiagramNameEditorOpen())) {
|
|
970
|
+
await this.clickDiagramBreadcrumb();
|
|
971
|
+
await this.clickEditDiagramNameButton();
|
|
972
|
+
}
|
|
967
973
|
// The design-system nav's Rename opens a modal dialog
|
|
968
974
|
// (RenameDialogDs.tsx) instead of the legacy inline breadcrumb
|
|
969
975
|
// editor -- fill and submit whichever is actually open.
|
|
@@ -1000,6 +1006,15 @@ class ModelerCreatePage {
|
|
|
1000
1006
|
}
|
|
1001
1007
|
}
|
|
1002
1008
|
}
|
|
1009
|
+
async isDiagramNameEditorOpen() {
|
|
1010
|
+
if (await this.renameDialog.isVisible().catch(() => false)) {
|
|
1011
|
+
return true;
|
|
1012
|
+
}
|
|
1013
|
+
return this.diagramNameInput
|
|
1014
|
+
.waitFor({ state: 'visible', timeout: 10000 })
|
|
1015
|
+
.then(() => this.diagramNameInput.isEditable())
|
|
1016
|
+
.catch(() => false);
|
|
1017
|
+
}
|
|
1003
1018
|
async clickVariableInput() {
|
|
1004
1019
|
await this.variableInput.click({ timeout: 60000 });
|
|
1005
1020
|
}
|
|
@@ -60,6 +60,7 @@ declare class ModelerHomePage {
|
|
|
60
60
|
clickBpmnTemplateOption(): Promise<void>;
|
|
61
61
|
clickIdpApplicationTemplateOption(): Promise<void>;
|
|
62
62
|
clickFormOption(): Promise<void>;
|
|
63
|
+
private confirmNewEntityNameDialog;
|
|
63
64
|
enterFormName(name: string): Promise<void>;
|
|
64
65
|
openFormRenameEditor(): Promise<void>;
|
|
65
66
|
clickProjectBreadcrumb(): Promise<void>;
|
|
@@ -353,12 +353,24 @@ class ModelerHomePage {
|
|
|
353
353
|
await this.page.waitForTimeout(3000);
|
|
354
354
|
await this.bpmnTemplateOption.click({ force: true, timeout: 60000 });
|
|
355
355
|
}
|
|
356
|
+
await this.confirmNewEntityNameDialog();
|
|
356
357
|
}
|
|
357
358
|
async clickIdpApplicationTemplateOption() {
|
|
358
359
|
await this.idpTemplateOption.click({ timeout: 120000 });
|
|
359
360
|
}
|
|
360
361
|
async clickFormOption() {
|
|
361
362
|
await this.formTemplateOption.click();
|
|
363
|
+
await this.confirmNewEntityNameDialog();
|
|
364
|
+
}
|
|
365
|
+
// Hub asks for a name before creating a file (camunda-hub #31596). Callers
|
|
366
|
+
// rename the file afterwards, so accept the prefilled default.
|
|
367
|
+
async confirmNewEntityNameDialog() {
|
|
368
|
+
const submit = this.page.locator('[data-test="new-entity-name-submit"]');
|
|
369
|
+
if (!(await this.becameVisible(submit, 15000))) {
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
await submit.click({ timeout: 30000 });
|
|
373
|
+
await (0, test_1.expect)(submit).toBeHidden({ timeout: 60000 });
|
|
362
374
|
}
|
|
363
375
|
// Right after a form is created the hub renders its breadcrumb name in
|
|
364
376
|
// inline-edit mode, but once the form store finishes loading it re-renders
|
|
@@ -1051,11 +1051,11 @@ class ModelerCreatePage {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
async fillStartEventVariablesForDocHandling(zeebeUrl, zeebeClientId, zeebeClientSecret) {
|
|
1053
1053
|
console.log(`URL: ${zeebeUrl}, ClientId: ${zeebeClientId}, Secret: ${zeebeClientSecret}`);
|
|
1054
|
-
(0, test_1.expect)(this.connectorsDocHandlingStartEventElement).toBeVisible({
|
|
1054
|
+
await (0, test_1.expect)(this.connectorsDocHandlingStartEventElement).toBeVisible({
|
|
1055
1055
|
timeout: 60000,
|
|
1056
1056
|
});
|
|
1057
1057
|
await this.connectorsDocHandlingStartEventElement.click();
|
|
1058
|
-
(0, test_1.expect)(this.startEventVariableInputWithThreeVariables).toBeVisible({
|
|
1058
|
+
await (0, test_1.expect)(this.startEventVariableInputWithThreeVariables).toBeVisible({
|
|
1059
1059
|
timeout: 60000,
|
|
1060
1060
|
});
|
|
1061
1061
|
await this.startEventVariableInputWithThreeVariables.click();
|
|
@@ -554,13 +554,16 @@ async function publishRestConnectorTemplateToProject(page, modelerHomePage) {
|
|
|
554
554
|
async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, zeebeUrl, zeebeClientId, zeebeClientSecret, endpoint, tenant = '') {
|
|
555
555
|
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
556
556
|
await publishRestConnectorTemplateToProject(page, modelerHomePage);
|
|
557
|
+
// Upload a uniquely named copy: parallel workers sharing one diagram
|
|
558
|
+
// overwrite each other's name, process id and connector settings live.
|
|
559
|
+
const bpmnContent = (0, fileUpload_1.readResourceFile)('SM-8.9/SM_Document_Handling_Connectors_User_Flow.bpmn').replaceAll('SM_Document_Handling_Connectors_User_Flow', processName);
|
|
557
560
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
558
561
|
await modelerHomePage.clickUploadFilesButton();
|
|
559
|
-
await (0, fileUpload_1.
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
await
|
|
562
|
+
await (0, fileUpload_1.uploadFileContent)(page, {
|
|
563
|
+
name: `${processName}.bpmn`,
|
|
564
|
+
buffer: Buffer.from(bpmnContent),
|
|
565
|
+
});
|
|
566
|
+
await modelerHomePage.clickProcessDiagram(processName);
|
|
564
567
|
await modelerCreatePage.clickGeneralPropertiesPanel();
|
|
565
568
|
await modelerCreatePage.clickNameInput();
|
|
566
569
|
await modelerCreatePage.fillNameInput(processName);
|