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:
Eugenio Romano
2019-08-17 14:32:02 +02:00
committed by GitHub
parent 4f3cf669f2
commit 83412bb9b6
328 changed files with 17653 additions and 18793 deletions

View File

@@ -62,7 +62,7 @@ describe('Start Task', () => {
let identityService: IdentityService;
let groupIdentityService: GroupIdentityService;
beforeAll(async (done) => {
beforeAll(async () => {
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
identityService = new IdentityService(apiService);
@@ -80,11 +80,10 @@ describe('Start Task', () => {
browser.params.config.oauth2.host,
browser.params.config.identityHost);
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
done();
});
afterAll(async (done) => {
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
afterAll(async () => {
const tasksService = new TasksService(apiService);
const tasks = [standaloneTaskName, unassignedTaskName, reassignTaskName];
@@ -94,136 +93,148 @@ describe('Start Task', () => {
await tasksService.deleteTask(taskId, simpleApp);
}
}
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
await identityService.deleteIdentityUser(activitiUser.idIdentityService);
await identityService.deleteIdentityUser(apsUser.idIdentityService);
await identityService.deleteIdentityUser(testUser.idIdentityService);
done();
});
beforeEach(() => {
navigationBarPage.navigateToProcessServicesCloudPage();
appListCloudComponent.checkApsContainer();
appListCloudComponent.checkAppIsDisplayed(simpleApp);
appListCloudComponent.goToApp(simpleApp);
tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
beforeEach(async () => {
await navigationBarPage.navigateToProcessServicesCloudPage();
await appListCloudComponent.checkApsContainer();
await appListCloudComponent.checkAppIsDisplayed(simpleApp);
await appListCloudComponent.goToApp(simpleApp);
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
});
it('[C297675] Should create a task unassigned when assignee field is empty in Start Task form', () => {
tasksCloudDemoPage.openNewTaskForm();
startTask.checkFormIsDisplayed();
peopleCloudComponent.clearAssignee();
startTask.addName(unassignedTaskName);
startTask.clickStartButton();
tasksCloudDemoPage.editTaskFilterCloudComponent()
.clickCustomiseFilterHeader()
.clearAssignee()
.setStatusFilterDropDown('CREATED');
tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(unassignedTaskName);
const taskId = tasksCloudDemoPage.taskListCloudComponent().getIdCellValue(unassignedTaskName);
tasksCloudDemoPage.taskListCloudComponent().selectRow(unassignedTaskName);
taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
expect(taskHeaderCloudPage.getId()).toBe(taskId);
expect(taskHeaderCloudPage.getAssignee()).toBe('No assignee');
it('[C297675] Should create a task unassigned when assignee field is empty in Start Task form', async () => {
await tasksCloudDemoPage.openNewTaskForm();
await startTask.checkFormIsDisplayed();
await peopleCloudComponent.clearAssignee();
await startTask.addName(unassignedTaskName);
await startTask.clickStartButton();
await tasksCloudDemoPage.editTaskFilterCloudComponent();
await tasksCloudDemoPage.editTaskFilterCloudComponent().clickCustomiseFilterHeader();
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('CREATED');
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(unassignedTaskName);
const taskId = await tasksCloudDemoPage.taskListCloudComponent().getIdCellValue(unassignedTaskName);
await tasksCloudDemoPage.taskListCloudComponent().selectRow(unassignedTaskName);
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
await expect(await taskHeaderCloudPage.getId()).toBe(taskId);
await expect(await taskHeaderCloudPage.getAssignee()).toBe('No assignee');
});
it('[C291956] Should be able to create a new standalone task without assignee', () => {
tasksCloudDemoPage.openNewTaskForm();
startTask.checkFormIsDisplayed();
expect(peopleCloudComponent.getAssignee()).toContain(testUser.firstName, 'does not contain Admin');
startTask.addName(unassignedTaskName);
startTask.clickStartButton();
startTask.checkStartButtonIsEnabled();
tasksCloudDemoPage.editTaskFilterCloudComponent()
.clickCustomiseFilterHeader()
.setStatusFilterDropDown('CREATED')
.clearAssignee();
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(unassignedTaskName);
it('[C291956] Should be able to create a new standalone task without assignee', async () => {
await tasksCloudDemoPage.openNewTaskForm();
await startTask.checkFormIsDisplayed();
await expect(await peopleCloudComponent.getAssignee()).toContain(testUser.firstName, 'does not contain Admin');
await startTask.addName(unassignedTaskName);
await startTask.clickStartButton();
await startTask.checkStartButtonIsEnabled();
await tasksCloudDemoPage.editTaskFilterCloudComponent();
await tasksCloudDemoPage.editTaskFilterCloudComponent().clickCustomiseFilterHeader();
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('CREATED');
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(unassignedTaskName);
});
it('[C290166] Should be possible to cancel a task', () => {
tasksCloudDemoPage.openNewTaskForm();
startTask.checkFormIsDisplayed();
startTask.checkStartButtonIsDisabled()
.blur(startTask.name)
.checkValidationErrorIsDisplayed(requiredError);
startTask.addName(standaloneTaskName)
.addDescription('descriptions')
.addDueDate('12/12/2018');
startTask.checkStartButtonIsEnabled();
startTask.clickCancelButton();
tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(standaloneTaskName);
it('[C290166] Should be possible to cancel a task', async () => {
await tasksCloudDemoPage.openNewTaskForm();
await startTask.checkFormIsDisplayed();
await startTask.checkStartButtonIsDisabled();
await startTask.blur(await startTask.name);
await startTask.checkValidationErrorIsDisplayed(requiredError);
await startTask.addName(standaloneTaskName);
await startTask.addDescription('descriptions');
await startTask .addDueDate('12/12/2018');
await startTask.checkStartButtonIsEnabled();
await startTask.clickCancelButton();
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(standaloneTaskName);
});
it('[C290180] Should be able to create a new standalone task', () => {
tasksCloudDemoPage.openNewTaskForm();
startTask.checkFormIsDisplayed();
startTask.addName(standaloneTaskName)
.addDescription('descriptions')
.addDueDate('12/12/2018')
.addPriority('50')
.clickStartButton();
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(standaloneTaskName);
it('[C290180] Should be able to create a new standalone task', async () => {
await tasksCloudDemoPage.openNewTaskForm();
await startTask.checkFormIsDisplayed();
await startTask.addName(standaloneTaskName);
await startTask.addDescription('descriptions');
await startTask.addDueDate('12/12/2018');
await startTask.addPriority('50');
await startTask.clickStartButton();
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(standaloneTaskName);
});
it('[C290181] Should be displayed an error message if task name exceed 255 characters', () => {
tasksCloudDemoPage.openNewTaskForm();
startTask.checkFormIsDisplayed();
startTask.addName(taskName255Characters)
.checkStartButtonIsEnabled();
startTask.addName(taskNameBiggerThen255Characters)
.blur(startTask.name)
.checkValidationErrorIsDisplayed(lengthValidationError)
.checkStartButtonIsDisabled()
.clickCancelButton();
it('[C290181] Should be displayed an error message if task name exceed 255 characters', async () => {
await tasksCloudDemoPage.openNewTaskForm();
await startTask.checkFormIsDisplayed();
await startTask.addName(taskName255Characters);
await startTask.checkStartButtonIsEnabled();
await startTask.addName(taskNameBiggerThen255Characters);
await startTask.blur(await startTask.name);
await startTask.checkValidationErrorIsDisplayed(lengthValidationError);
await startTask.checkStartButtonIsDisabled();
await startTask.clickCancelButton();
});
it('[C291774] Should be displayed an error message if the date is invalid', () => {
tasksCloudDemoPage.openNewTaskForm();
startTask.addDueDate('12/12/2018')
.checkStartButtonIsEnabled();
startTask.addDueDate('invalid date')
.blur(startTask.dueDate)
.validateDate(dateValidationError)
.checkStartButtonIsDisabled()
.clickCancelButton();
it('[C291774] Should be displayed an error message if the date is invalid', async () => {
await tasksCloudDemoPage.openNewTaskForm();
await startTask.addDueDate('12/12/2018');
await startTask.checkStartButtonIsEnabled();
await startTask.addDueDate('invalid date');
await startTask.blur(await startTask.dueDate);
await startTask.validateDate(dateValidationError);
await startTask.checkStartButtonIsDisabled();
await startTask.clickCancelButton();
});
it('[C290182] Should be possible to assign the task to another user', () => {
tasksCloudDemoPage.openNewTaskForm();
startTask.checkFormIsDisplayed();
startTask.addName(standaloneTaskName);
peopleCloudComponent.searchAssigneeAndSelect(`${activitiUser.firstName} ${activitiUser.lastName}`);
startTask.checkStartButtonIsEnabled();
startTask.clickStartButton();
tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
expect(tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(standaloneTaskName);
it('[C290182] Should be possible to assign the task to another user', async () => {
await tasksCloudDemoPage.openNewTaskForm();
await startTask.checkFormIsDisplayed();
await startTask.addName(standaloneTaskName);
await peopleCloudComponent.searchAssigneeAndSelect(`${activitiUser.firstName} ${activitiUser.lastName}`);
await startTask.checkStartButtonIsEnabled();
await startTask.clickStartButton();
await browser.driver.sleep(1000);
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
});
it('[C291953] Assignee field should display the logged user as default', () => {
tasksCloudDemoPage.openNewTaskForm();
startTask.checkFormIsDisplayed();
expect(peopleCloudComponent.getAssignee()).toContain(testUser.firstName, 'does not contain Admin');
startTask.clickCancelButton();
it('[C291953] Assignee field should display the logged user as default', async () => {
await tasksCloudDemoPage.openNewTaskForm();
await startTask.checkFormIsDisplayed();
await expect(await peopleCloudComponent.getAssignee()).toContain(testUser.firstName, 'does not contain Admin');
await startTask.clickCancelButton();
});
it('[C305050] Should be able to reassign the removed user when starting a new task', () => {
tasksCloudDemoPage.openNewTaskForm();
startTask.checkFormIsDisplayed();
startTask.addName(reassignTaskName);
expect(peopleCloudComponent.getAssignee()).toBe(`${testUser.firstName} ${testUser.lastName}`);
peopleCloudComponent.searchAssignee(apsUser.username);
peopleCloudComponent.checkUserIsDisplayed(`${apsUser.firstName} ${apsUser.lastName}`);
peopleCloudComponent.selectAssigneeFromList(`${apsUser.firstName} ${apsUser.lastName}`);
startTask.clickStartButton();
tasksCloudDemoPage.editTaskFilterCloudComponent()
.clickCustomiseFilterHeader()
.clearAssignee()
.setStatusFilterDropDown('ALL');
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(reassignTaskName);
tasksCloudDemoPage.taskListCloudComponent().selectRow(reassignTaskName);
expect(taskHeaderCloudPage.getAssignee()).toBe(apsUser.username);
it('[C305050] Should be able to reassign the removed user when starting a new task', async () => {
await tasksCloudDemoPage.openNewTaskForm();
await startTask.checkFormIsDisplayed();
await startTask.addName(reassignTaskName);
await expect(await peopleCloudComponent.getAssignee()).toBe(`${testUser.firstName} ${testUser.lastName}`);
await peopleCloudComponent.searchAssignee(apsUser.username);
await peopleCloudComponent.checkUserIsDisplayed(`${apsUser.firstName} ${apsUser.lastName}`);
await peopleCloudComponent.selectAssigneeFromList(`${apsUser.firstName} ${apsUser.lastName}`);
await startTask.clickStartButton();
await tasksCloudDemoPage.editTaskFilterCloudComponent().clickCustomiseFilterHeader();
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ALL');
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(reassignTaskName);
await browser.driver.sleep(1000);
await tasksCloudDemoPage.taskListCloudComponent().selectRow(reassignTaskName);
await expect(await taskHeaderCloudPage.getAssignee()).toBe(apsUser.username);
});
});