@camunda/e2e-test-suite 0.0.812 → 0.0.813
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.
|
@@ -9,6 +9,7 @@ declare class FormJsPage {
|
|
|
9
9
|
readonly textField: Locator;
|
|
10
10
|
readonly documentPreview: Locator;
|
|
11
11
|
readonly keyInput: Locator;
|
|
12
|
+
readonly fieldLabelInput: Locator;
|
|
12
13
|
readonly uploadMultipleFilesToggle: Locator;
|
|
13
14
|
readonly documentReferenceInput: Locator;
|
|
14
15
|
readonly generalPanel: Locator;
|
|
@@ -26,6 +27,7 @@ declare class FormJsPage {
|
|
|
26
27
|
clickGenerateFormButton(): Promise<void>;
|
|
27
28
|
dragAndDrop(source: Locator, target: Locator): Promise<void>;
|
|
28
29
|
fillKeyInput(key: string): Promise<void>;
|
|
30
|
+
fillFieldLabel(label: string): Promise<void>;
|
|
29
31
|
enableUploadMultipleFiles(): Promise<void>;
|
|
30
32
|
filldocumentReferenceInput(key: string): Promise<void>;
|
|
31
33
|
clickGeneralPropertiesPanel(): Promise<void>;
|
|
@@ -13,6 +13,7 @@ class FormJsPage {
|
|
|
13
13
|
textField;
|
|
14
14
|
documentPreview;
|
|
15
15
|
keyInput;
|
|
16
|
+
fieldLabelInput;
|
|
16
17
|
uploadMultipleFilesToggle;
|
|
17
18
|
documentReferenceInput;
|
|
18
19
|
generalPanel;
|
|
@@ -33,6 +34,7 @@ class FormJsPage {
|
|
|
33
34
|
this.documentPreview = page.locator('button[data-field-type="documentPreview"]');
|
|
34
35
|
this.filePicker = page.locator('button[data-field-type="filepicker"]');
|
|
35
36
|
this.keyInput = page.getByRole('textbox', { name: 'key' });
|
|
37
|
+
this.fieldLabelInput = page.locator('#bio-properties-panel-label');
|
|
36
38
|
this.uploadMultipleFilesToggle = page.locator('div[data-entry-id="multiple"] .bio-properties-panel-toggle-switch__switcher');
|
|
37
39
|
this.documentReferenceInput = page.getByRole('textbox', {
|
|
38
40
|
name: 'document reference',
|
|
@@ -91,6 +93,13 @@ class FormJsPage {
|
|
|
91
93
|
await (0, test_1.expect)(this.keyInput).toHaveValue(key, { timeout: 20000 });
|
|
92
94
|
await (0, sleep_1.sleep)(1000);
|
|
93
95
|
}
|
|
96
|
+
async fillFieldLabel(label) {
|
|
97
|
+
// "Field label" is a contenteditable (FEEL-capable) editor, not an <input>,
|
|
98
|
+
// so assert its text content rather than a form value.
|
|
99
|
+
await this.fieldLabelInput.fill(label, { timeout: 60000 });
|
|
100
|
+
await (0, test_1.expect)(this.fieldLabelInput).toContainText(label, { timeout: 20000 });
|
|
101
|
+
await (0, sleep_1.sleep)(1000);
|
|
102
|
+
}
|
|
94
103
|
async enableUploadMultipleFiles() {
|
|
95
104
|
await this.uploadMultipleFilesToggle.click({ timeout: 60000 });
|
|
96
105
|
}
|
|
@@ -11,7 +11,6 @@ const UtilitiesPage_1 = require("../../pages/8.8/UtilitiesPage");
|
|
|
11
11
|
const deleteOrg_1 = require("../../utils/deleteOrg");
|
|
12
12
|
const sleep_1 = require("../../utils/sleep");
|
|
13
13
|
const mailSlurpClient_1 = require("../../utils/mailSlurpClient");
|
|
14
|
-
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
15
14
|
const users_1 = require("../../utils/users");
|
|
16
15
|
const testUser = (0, users_1.getTestUser)('eleventhUser');
|
|
17
16
|
_8_8_1.test.describe.configure({ mode: 'parallel' });
|
|
@@ -407,10 +406,13 @@ _8_8_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
407
406
|
});
|
|
408
407
|
});
|
|
409
408
|
//Skipped due to bug 22577: https://github.com/camunda/camunda-hub/issues/22577
|
|
410
|
-
_8_8_1.test
|
|
409
|
+
(0, _8_8_1.test)('Public Start Form @tasklistV1', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, formJsPage, taskDetailsPage, taskPanelPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, browser, }) => {
|
|
411
410
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
412
411
|
const processName = 'User_Task_Process_With_Public_Form' + randomString;
|
|
413
412
|
const formName = 'Public form' + randomString;
|
|
413
|
+
// Unique per run so repeated runs in the shared project never collide.
|
|
414
|
+
const publicFormFieldKey = 'Public_Form_Text_Field_' + randomString;
|
|
415
|
+
const publicFormSubmission = 'Public Form Test Value';
|
|
414
416
|
await _8_8_1.test.step('Navigate to Web Modeler', async () => {
|
|
415
417
|
await (0, test_1.expect)(homePage.camundaComponentsButton).toBeVisible({
|
|
416
418
|
timeout: 120000,
|
|
@@ -431,7 +433,8 @@ _8_8_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
431
433
|
await formJsPage.dragAndDrop(formJsPage.textField, formJsPage.formEditor);
|
|
432
434
|
await (0, test_1.expect)(formJsPage.textFieldInForm).toBeVisible();
|
|
433
435
|
await formJsPage.clickGeneralPropertiesPanel();
|
|
434
|
-
await formJsPage.
|
|
436
|
+
await formJsPage.fillFieldLabel(publicFormFieldKey);
|
|
437
|
+
await formJsPage.fillKeyInput(publicFormFieldKey);
|
|
435
438
|
await formJsPage.deployForm(clusterName);
|
|
436
439
|
});
|
|
437
440
|
await _8_8_1.test.step('Add A BPMN Template To The Project', async () => {
|
|
@@ -451,39 +454,39 @@ _8_8_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
451
454
|
publicFormLink = await modelerCreatePage.getPublicationLink();
|
|
452
455
|
await (0, sleep_1.sleep)(1000);
|
|
453
456
|
});
|
|
454
|
-
await _8_8_1.test.step('
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
});
|
|
462
|
-
await _8_8_1.test.step('Access Public Form After Session Reset and Submit the Form', async () => {
|
|
457
|
+
await _8_8_1.test.step('Access public form anonymously and submit', async () => {
|
|
458
|
+
// A public start form must be reachable without authentication, so open
|
|
459
|
+
// it in a fresh context; the main session stays logged in for the task
|
|
460
|
+
// completion step below.
|
|
461
|
+
const anonContext = await browser.newContext();
|
|
462
|
+
const anonPage = await anonContext.newPage();
|
|
463
|
+
const anonTaskDetailsPage = new TaskDetailsPage_1.TaskDetailsPage(anonPage);
|
|
463
464
|
console.log('Navigating to public form:', publicFormLink);
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
await
|
|
473
|
-
|
|
474
|
-
});
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
465
|
+
// Re-navigate until the form renders to absorb brief Tasklist import lag
|
|
466
|
+
// after deploy.
|
|
467
|
+
await (0, test_1.expect)(async () => {
|
|
468
|
+
await anonPage.goto(publicFormLink, { waitUntil: 'domcontentloaded' });
|
|
469
|
+
await (0, test_1.expect)(anonTaskDetailsPage.textInput).toBeVisible({
|
|
470
|
+
timeout: 15000,
|
|
471
|
+
});
|
|
472
|
+
}).toPass({ timeout: 120000, intervals: [5000, 10000, 15000] });
|
|
473
|
+
await anonTaskDetailsPage.fillTextInput(publicFormSubmission);
|
|
474
|
+
await anonTaskDetailsPage.clickSubmitButton();
|
|
475
|
+
await (0, test_1.expect)(anonPage.getByRole('heading', { name: 'Success!' })).toBeVisible({ timeout: 30000 });
|
|
476
|
+
await anonContext.close();
|
|
477
|
+
});
|
|
478
|
+
await _8_8_1.test.step('Complete User Task in Tasklist', async () => {
|
|
479
|
+
// The main session is still authenticated, so go straight to Tasklist.
|
|
478
480
|
await appsPage.clickCamundaApps();
|
|
479
481
|
await appsPage.clickTasklist(clusterName);
|
|
480
|
-
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(page, taskPanelPage.taskListPageBanner, 'Tasklist banner');
|
|
481
482
|
await taskPanelPage.openTask(processName);
|
|
482
|
-
await (0, test_1.expect)(page
|
|
483
|
-
.getByRole('row')
|
|
484
|
-
.filter({ hasText: 'Public_Form_Text_Field' })
|
|
485
|
-
.getByText('"Public Form Test Value"')).toBeVisible({ timeout: 30000 });
|
|
486
483
|
await taskDetailsPage.clickAssignToMeButton();
|
|
484
|
+
await (0, test_1.expect)(taskDetailsPage.assignedToMeText).toBeVisible({
|
|
485
|
+
timeout: 60000,
|
|
486
|
+
});
|
|
487
|
+
// The value submitted via the public form is carried into the task
|
|
488
|
+
// variable as a JSON string, so it is wrapped in quotes.
|
|
489
|
+
await (0, test_1.expect)(page.getByTitle(`${publicFormFieldKey} Value`)).toHaveValue(`"${publicFormSubmission}"`, { timeout: 30000 });
|
|
487
490
|
await taskDetailsPage.clickCompleteTaskButton();
|
|
488
491
|
});
|
|
489
492
|
await _8_8_1.test.step('Assert Process Instance is Completed in Operate', async () => {
|