mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Disable control flow e2e ADF (#4954)
* update project script possible different JS-API * first commit no controll flow * second commit no controll flow * third commit no controll flow * 4 commit no controll flow * 5 commit no controll flow * 6 commit no controll flow * 7 commit no controll flow * 8 commit no controll flow * 9 commit no controll flow * 10 commit no controll flow * 11 commit no controll flow * 12 commit no controll flow * 13 commit no controll flow * 14 commit no controll flow * 15 commit no controll flow * 16 commit no controll flow * 17 commit no controll flow * 18 commit no controll flow * 19 commit no controll flow * 20 commit no controll flow * remove wdpromise, protractor promise and deferred promises * - fixed some incorrect “expect” calls - fixed some matchers - removed “return this;” when not needed - added a few more await-s * forgot a file * fix some failing tests * replaced driver calls with browser calls and enabled back waitForAngular * fix rightClick methods and hopefully some tests * fix settings-component * some more fixes for core and content tests * try to fix some more issues * linting * revert some changes, allowing download on headless chrome won’t work with multiple browser instances * fixes for Search tests * try to remove some wait calls * fix build * increase allScriptsTimeout and try another protractor and web driver version * improve navigation methods * some fixes for notification history and login sso * forgot a space * fix packages and enable some screenshots * navigation bar fixes * fix some test * some fixes for notification history and navigation bar use correct visibility method in attachFileWidget test * fix searching and another fix for navigation * try solve sso login * some more fixes * refactor async forEach into for..of * try fix for search tests * resolve rebabse problems * remove install * fix lint * fix core e2e * fix core e2e * fix core e2e * fix ps tests * fix some tests * fix core e2e * fix core e2e * fix core * fix some issues PS * fix core * fix core * fix some ps test * fix rebase issues * remove save * fix url regressed after rebase * fix url regressed after rebase * fix ps and core * fix lint * more parallel e2e ps * fix some ps cloud test * some cloud fix * fix lint * fix some test * remove files to be ignored * out-tsc * improve one cs test * fix candidate base app * fix ps test * remove click function * clean methods alrady present in browser action * try ugly wait * move wait * remove duplicate call * remove underscore * fix after review * fix imports * minor cosmetic fixes * fix comments test
This commit is contained in:
@@ -36,6 +36,7 @@ import { UsersActions } from '../actions/users.actions';
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
import fs = require('fs');
|
||||
import path = require('path');
|
||||
import { ChecklistDialog } from '../pages/adf/process-services/dialog/createChecklistDialog';
|
||||
|
||||
describe('Start Task - Task App', () => {
|
||||
|
||||
@@ -60,7 +61,7 @@ describe('Start Task - Task App', () => {
|
||||
'name': resources.Files.ADF_DOCUMENTS.JPG.file_name
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -87,97 +88,125 @@ describe('Start Task - Task App', () => {
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
beforeEach(async () => {
|
||||
await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C260383] Should be possible to modify a task', () => {
|
||||
taskPage.createNewTask().addName(tasks[0])
|
||||
.addForm(app.formName).clickStartButton();
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[0]);
|
||||
taskPage.taskDetails().clickInvolvePeopleButton()
|
||||
.typeUser(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName)
|
||||
.selectUserToInvolve(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName)
|
||||
.checkUserIsSelected(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName);
|
||||
taskPage.taskDetails().clickAddInvolvedUserButton();
|
||||
expect(taskPage.taskDetails().getInvolvedUserEmail(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName))
|
||||
it('[C260383] Should be possible to modify a task', async () => {
|
||||
const task = await taskPage.createNewTask();
|
||||
await task.addName(tasks[0]);
|
||||
await task.addForm(app.formName);
|
||||
await task.clickStartButton();
|
||||
await taskPage.tasksListPage().checkContentIsDisplayed(tasks[0]);
|
||||
const taskDetails = await taskPage.taskDetails();
|
||||
await taskDetails.clickInvolvePeopleButton();
|
||||
await taskDetails.typeUser(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName);
|
||||
await taskDetails.selectUserToInvolve(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName);
|
||||
await taskDetails.checkUserIsSelected(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName);
|
||||
|
||||
await taskPage.taskDetails().clickAddInvolvedUserButton();
|
||||
|
||||
await expect(await taskPage.taskDetails().getInvolvedUserEmail(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName))
|
||||
.toEqual(assigneeUserModel.email);
|
||||
taskPage.taskDetails().selectActivityTab().addComment(firstComment)
|
||||
.checkCommentIsDisplayed(firstComment);
|
||||
taskPage.clickOnAddChecklistButton().addName(firstChecklist).clickCreateChecklistButton();
|
||||
taskPage.checkChecklistIsDisplayed(firstChecklist);
|
||||
taskPage.taskDetails().selectDetailsTab();
|
||||
|
||||
await taskDetails.selectActivityTab();
|
||||
await taskDetails.addComment(firstComment);
|
||||
await taskDetails.checkCommentIsDisplayed(firstComment);
|
||||
|
||||
await (await taskPage.clickOnAddChecklistButton()).addName(firstChecklist);
|
||||
|
||||
const checklistDialog = new ChecklistDialog();
|
||||
await checklistDialog.clickCreateChecklistButton();
|
||||
|
||||
await taskPage.checkChecklistIsDisplayed(firstChecklist);
|
||||
await taskPage.taskDetails().selectDetailsTab();
|
||||
});
|
||||
|
||||
it('[C260422] Should be possible to cancel a task', () => {
|
||||
taskPage.createNewTask().addName(tasks[3])
|
||||
.checkStartButtonIsEnabled().clickCancelButton();
|
||||
taskPage.tasksListPage().checkContentIsNotDisplayed(tasks[3]);
|
||||
expect(taskPage.filtersPage().getActiveFilter()).toEqual(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
it('[C260422] Should be possible to cancel a task', async () => {
|
||||
const task = await taskPage.createNewTask();
|
||||
|
||||
await task.addName(tasks[3]);
|
||||
await task.checkStartButtonIsEnabled();
|
||||
await task.clickCancelButton();
|
||||
|
||||
await taskPage.tasksListPage().checkContentIsNotDisplayed(tasks[3]);
|
||||
await expect(await taskPage.filtersPage().getActiveFilter()).toEqual(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
});
|
||||
|
||||
it('[C260423] Should be possible to save filled form', () => {
|
||||
taskPage.createNewTask()
|
||||
.addForm(app.formName).addName(tasks[4]).clickStartButton();
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[4]);
|
||||
expect(taskPage.formFields().setFieldValue(by.id, formTextField, formFieldValue)
|
||||
.getFieldValue(formTextField)).toEqual(formFieldValue);
|
||||
taskPage.formFields().refreshForm().checkFieldValue(by.id, formTextField, '');
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[4]);
|
||||
taskPage.formFields().setFieldValue(by.id, formTextField, formFieldValue)
|
||||
.checkFieldValue(by.id, formTextField, formFieldValue);
|
||||
taskPage.formFields().saveForm().checkFieldValue(by.id, formTextField, formFieldValue);
|
||||
it('[C260423] Should be possible to save filled form', async () => {
|
||||
const task = await taskPage.createNewTask();
|
||||
await task.addForm(app.formName);
|
||||
await task.addName(tasks[4]);
|
||||
await task.clickStartButton();
|
||||
|
||||
await taskPage.tasksListPage().checkContentIsDisplayed(tasks[4]);
|
||||
|
||||
const formFields = await taskPage.formFields();
|
||||
await formFields.setFieldValue(by.id, formTextField, formFieldValue);
|
||||
|
||||
await formFields.refreshForm();
|
||||
await formFields.checkFieldValue(by.id, formTextField, '');
|
||||
await taskPage.tasksListPage().checkContentIsDisplayed(tasks[4]);
|
||||
|
||||
await formFields.setFieldValue(by.id, formTextField, formFieldValue);
|
||||
await formFields.checkFieldValue(by.id, formTextField, formFieldValue);
|
||||
|
||||
await taskPage.formFields().saveForm();
|
||||
await formFields.checkFieldValue(by.id, formTextField, formFieldValue);
|
||||
});
|
||||
|
||||
it('[C260425] Should be possible to assign a user', () => {
|
||||
taskPage.createNewTask()
|
||||
.addName(tasks[5])
|
||||
.addAssignee(assigneeUserModel.firstName)
|
||||
.clickStartButton();
|
||||
it('[C260425] Should be possible to assign a user', async () => {
|
||||
const task = await taskPage.createNewTask();
|
||||
await task.addName(tasks[5]);
|
||||
await task.addAssignee(assigneeUserModel.firstName);
|
||||
await task.clickStartButton();
|
||||
|
||||
taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
taskPage.tasksListPage().getDataTable().waitForTableBody();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[5]);
|
||||
taskPage.tasksListPage().selectRow(tasks[5]);
|
||||
taskPage.checkTaskTitle(tasks[5]);
|
||||
expect(taskPage.taskDetails().getAssignee()).toEqual(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
await taskPage.tasksListPage().getDataTable().waitForTableBody();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
|
||||
await taskPage.tasksListPage().checkContentIsDisplayed(tasks[5]);
|
||||
await taskPage.tasksListPage().selectRow(tasks[5]);
|
||||
await taskPage.checkTaskTitle(tasks[5]);
|
||||
await expect(await taskPage.taskDetails().getAssignee()).toEqual(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName);
|
||||
});
|
||||
|
||||
it('Attach a file', () => {
|
||||
taskPage.createNewTask().addName(tasks[6]).clickStartButton();
|
||||
attachmentListPage.clickAttachFileButton(jpgFile.location);
|
||||
attachmentListPage.checkFileIsAttached(jpgFile.name);
|
||||
it('Attach a file', async () => {
|
||||
const startTaskDialog = await taskPage.createNewTask();
|
||||
await startTaskDialog.addName(tasks[6]);
|
||||
await startTaskDialog.clickStartButton();
|
||||
await attachmentListPage.clickAttachFileButton(jpgFile.location);
|
||||
await attachmentListPage.checkFileIsAttached(jpgFile.name);
|
||||
});
|
||||
|
||||
it('[C260420] Should Information box be hidden when showHeaderContent property is set on false', () => {
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(showHeaderTask);
|
||||
it('[C260420] Should Information box be hidden when showHeaderContent property is set on false', async () => {
|
||||
await taskPage.tasksListPage().checkContentIsDisplayed(showHeaderTask);
|
||||
|
||||
processServiceTabBarPage.clickSettingsButton();
|
||||
taskPage.taskDetails().appSettingsToggles().disableShowHeader();
|
||||
processServiceTabBarPage.clickTasksButton();
|
||||
await processServiceTabBarPage.clickSettingsButton();
|
||||
await taskPage.taskDetails().appSettingsToggles().disableShowHeader();
|
||||
await processServiceTabBarPage.clickTasksButton();
|
||||
|
||||
taskPage.taskDetails().taskInfoDrawerIsNotDisplayed();
|
||||
await taskPage.taskDetails().taskInfoDrawerIsNotDisplayed();
|
||||
|
||||
processServiceTabBarPage.clickSettingsButton();
|
||||
taskPage.taskDetails().appSettingsToggles().enableShowHeader();
|
||||
processServiceTabBarPage.clickTasksButton();
|
||||
await processServiceTabBarPage.clickSettingsButton();
|
||||
await taskPage.taskDetails().appSettingsToggles().enableShowHeader();
|
||||
await processServiceTabBarPage.clickTasksButton();
|
||||
|
||||
taskPage.taskDetails().taskInfoDrawerIsDisplayed();
|
||||
await taskPage.taskDetails().taskInfoDrawerIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C291780] Should be displayed an error message if task name exceed 255 characters', () => {
|
||||
const startDialog = taskPage.createNewTask().addName(taskName255Characters).checkStartButtonIsEnabled();
|
||||
startDialog.addName(taskNameBiggerThen255Characters)
|
||||
.blur(startDialog.name)
|
||||
.checkValidationErrorIsDisplayed(lengthValidationError)
|
||||
.checkStartButtonIsDisabled();
|
||||
it('[C291780] Should be displayed an error message if task name exceed 255 characters', async () => {
|
||||
const startDialog = await taskPage.createNewTask();
|
||||
await startDialog.addName(taskName255Characters);
|
||||
|
||||
await startDialog.checkStartButtonIsEnabled();
|
||||
await startDialog.addName(taskNameBiggerThen255Characters);
|
||||
await startDialog.blur(startDialog.name);
|
||||
await startDialog.checkValidationErrorIsDisplayed(lengthValidationError);
|
||||
await startDialog.checkStartButtonIsDisabled();
|
||||
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user