mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-30333]FE - [Process-services] Create ADF task form. (#5611)
* [ACA-3033] FE - [Process-services] Create ADF task form. * * Modifed task-from-template * * Refactored details component with the task-form * * Updated unit tests to the recent changes * * Modified task-details component * * Fixed failing tests * * Fixed failing tests* Added doc * * Fixed task-details-form e2e * Fixed failing test on tas-details e2e * * Fixed flaky process-services e2e * * Fixed flaky e2e tests
This commit is contained in:
@@ -99,6 +99,7 @@ describe('Attach Folder', () => {
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await widget.attachFolderWidget().checkFolderIsAttached(app.UPLOAD_FOLDER_FORM_CS.FIELD.widget_id, user.email);
|
||||
await widget.attachFolderWidget().removeFolder(app.UPLOAD_FOLDER_FORM_CS.FIELD.widget_id, user.email);
|
||||
await taskPage.formFields().checkWidgetIsVisible(app.UPLOAD_FOLDER_FORM_CS.FIELD.widget_id);
|
||||
await widget.attachFolderWidget().checkFolderIsNotAttached(app.UPLOAD_FOLDER_FORM_CS.FIELD.widget_id, user.email);
|
||||
});
|
||||
});
|
||||
|
@@ -22,12 +22,14 @@ import { UsersActions } from '../actions/users.actions';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { AttachFormPage } from '../pages/adf/process-services/attach-form.page';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
import { TaskDetailsPage } from '../pages/adf/process-services/task-details.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
|
||||
describe('Attach Form Component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const taskDetailsPage = new TaskDetailsPage();
|
||||
const attachFormPage = new AttachFormPage();
|
||||
const formFields = new FormFields();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
@@ -83,9 +85,9 @@ describe('Attach Form Component', () => {
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.tasksListPage().selectRow(testNames.taskName);
|
||||
|
||||
await attachFormPage.checkNoFormMessageIsDisplayed();
|
||||
await attachFormPage.checkAttachFormButtonIsDisplayed();
|
||||
await attachFormPage.checkCompleteButtonIsDisplayed();
|
||||
await taskPage.taskDetails().checkStandaloneNoFormMessageIsDisplayed();
|
||||
await taskPage.taskDetails().checkAttachFormButtonIsDisplayed();
|
||||
await taskPage.taskDetails().checkCompleteTaskButtonIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C280048] Should be able to view the attach-form component after clicking cancel button', async () => {
|
||||
@@ -94,7 +96,7 @@ describe('Attach Form Component', () => {
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.tasksListPage().selectRow(testNames.taskName);
|
||||
|
||||
await attachFormPage.clickAttachFormButton();
|
||||
await taskPage.taskDetails().clickAttachFormButton();
|
||||
await attachFormPage.checkDefaultFormTitleIsDisplayed(testNames.formTitle);
|
||||
await attachFormPage.checkFormDropdownIsDisplayed();
|
||||
await attachFormPage.checkCancelButtonIsDisplayed();
|
||||
@@ -104,7 +106,7 @@ describe('Attach Form Component', () => {
|
||||
await formFields.checkWidgetIsReadOnlyMode(testNames.widgetTitle);
|
||||
|
||||
await attachFormPage.clickCancelButton();
|
||||
await attachFormPage.checkAttachFormButtonIsDisplayed();
|
||||
await taskPage.taskDetails().checkAttachFormButtonIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C280017] Should be able to attach a form on a standalone task and complete', async () => {
|
||||
@@ -113,7 +115,7 @@ describe('Attach Form Component', () => {
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.tasksListPage().selectRow(testNames.taskName);
|
||||
|
||||
await attachFormPage.clickAttachFormButton();
|
||||
await taskDetailsPage.clickAttachFormButton();
|
||||
await attachFormPage.selectAttachFormOption(testNames.formName);
|
||||
await attachFormPage.clickAttachFormButton();
|
||||
|
||||
|
@@ -81,7 +81,7 @@ describe('Start Task - Task App', () => {
|
||||
await taskPage.taskDetails().checkAttachFormButtonIsDisplayed();
|
||||
await taskPage.taskDetails().checkAttachFormButtonIsEnabled();
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
await expect(await taskPage.formFields().getNoFormMessage()).toEqual(noFormMessage);
|
||||
await expect(await taskDetails.getNoFormMessage()).toEqual(noFormMessage);
|
||||
});
|
||||
|
||||
it('[C268910] Should a standalone task be displayed in completed tasks when completing it', async () => {
|
||||
@@ -107,17 +107,20 @@ describe('Start Task - Task App', () => {
|
||||
|
||||
await taskPage.tasksListPage().checkContentIsDisplayed(tasks[2]);
|
||||
await taskPage.formFields().noFormIsDisplayed();
|
||||
await taskPage.taskDetails().clickAttachFormButton();
|
||||
|
||||
const formFields = await taskPage.formFields();
|
||||
await formFields.clickOnAttachFormButton();
|
||||
await formFields.selectForm(app.formName);
|
||||
await formFields.clickOnAttachFormButton();
|
||||
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.taskDetails().checkCompleteFormButtonIsDisplayed();
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(app.formName);
|
||||
});
|
||||
|
||||
it('[C268912] Should a standalone task be displayed when removing the form from APS', async () => {
|
||||
const task = await taskPage.createNewTask();
|
||||
const taskDetails = await taskPage.taskDetails();
|
||||
await task.addName(tasks[3]);
|
||||
await task.selectForm(app.formName);
|
||||
await task.clickStartButton();
|
||||
@@ -134,6 +137,6 @@ describe('Start Task - Task App', () => {
|
||||
|
||||
await taskPage.formFields().noFormIsDisplayed();
|
||||
await expect(await taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
await expect(await taskPage.formFields().getNoFormMessage()).toEqual(noFormMessage);
|
||||
await expect(await taskDetails.getNoFormMessage()).toEqual(noFormMessage);
|
||||
});
|
||||
});
|
||||
|
@@ -27,11 +27,13 @@ import { TaskDetailsPage } from '../pages/adf/process-services/task-details.page
|
||||
import { TasksListPage } from '../pages/adf/process-services/tasks-list.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
import { AttachFormPage } from '../pages/adf/process-services/attach-form.page';
|
||||
|
||||
describe('Task Details - Form', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const tasksListPage = new TasksListPage();
|
||||
const taskDetailsPage = new TaskDetailsPage();
|
||||
const attachFormPage = new AttachFormPage();
|
||||
const taskPage = new TasksPage();
|
||||
const filtersPage = new FiltersPage();
|
||||
const widget = new Widget();
|
||||
@@ -101,25 +103,27 @@ describe('Task Details - Form', () => {
|
||||
await tasksListPage.selectRow(task.name);
|
||||
await taskDetailsPage.clickForm();
|
||||
|
||||
await taskDetailsPage.checkAttachFormDropdownIsDisplayed();
|
||||
await taskDetailsPage.checkAttachFormButtonIsDisabled();
|
||||
await attachFormPage.checkFormDropdownIsDisplayed();
|
||||
await attachFormPage.checkAttachFormButtonIsDisabled();
|
||||
|
||||
await taskDetailsPage.selectAttachFormOption(newForm.name);
|
||||
await attachFormPage.selectAttachFormOption(newForm.name);
|
||||
await taskDetailsPage.checkSelectedForm(newForm.name);
|
||||
await taskDetailsPage.checkAttachFormButtonIsEnabled();
|
||||
await attachFormPage.checkAttachFormButtonIsDisplayed();
|
||||
|
||||
await taskDetailsPage.checkCancelAttachFormIsDisplayed();
|
||||
await taskDetailsPage.clickCancelAttachForm();
|
||||
await attachFormPage.checkCancelButtonIsDisplayed();
|
||||
await attachFormPage.clickCancelButton();
|
||||
|
||||
await taskDetailsPage.checkFormIsAttached(attachedForm.name);
|
||||
|
||||
await taskDetailsPage.clickForm();
|
||||
|
||||
await taskDetailsPage.checkAttachFormDropdownIsDisplayed();
|
||||
await taskDetailsPage.selectAttachFormOption(newForm.name);
|
||||
await attachFormPage.checkFormDropdownIsDisplayed();
|
||||
await attachFormPage.checkAttachFormButtonIsDisabled();
|
||||
await attachFormPage.selectAttachFormOption(newForm.name);
|
||||
await taskDetailsPage.checkSelectedForm(newForm.name);
|
||||
|
||||
await taskDetailsPage.checkAttachFormButtonIsDisplayed();
|
||||
await taskDetailsPage.clickAttachFormButton();
|
||||
await attachFormPage.checkAttachFormButtonIsDisplayed();
|
||||
await attachFormPage.clickAttachFormButton();
|
||||
|
||||
await taskDetailsPage.checkFormIsAttached(newForm.name);
|
||||
});
|
||||
|
Reference in New Issue
Block a user