[no-issue] Parallel run e2e and e2e common action refactoring (#4702)

This commit is contained in:
Eugenio Romano
2019-05-13 04:44:35 +02:00
committed by GitHub
parent a48bfc3714
commit 898e3b5a80
288 changed files with 8704 additions and 5130 deletions

View File

@@ -46,7 +46,7 @@ describe('Comment component for Processes', () => {
multiple_users: 'Test Comment multiple users'
};
beforeAll(async(done) => {
beforeAll(async (done) => {
this.alfrescoJsApi = new AlfrescoApi({
provider: 'BPM',
@@ -74,19 +74,22 @@ describe('Comment component for Processes', () => {
done();
});
afterAll(async(done) => {
await this.alfrescoJsApi.activiti.modelsApi.deleteModel(appId);
afterAll(async (done) => {
try {
await this.alfrescoJsApi.activiti.modelsApi.deleteModel(appId);
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
} catch (error) {
}
done();
});
it('[C260237] Should not be able to add a comment on a completed task', () => {
browser.controlFlow().execute(async() => {
const newTask = await this.alfrescoJsApi.activiti.taskApi.createNewTask({name: taskName.completed_task});
browser.controlFlow().execute(async () => {
const newTask = await this.alfrescoJsApi.activiti.taskApi.createNewTask({ name: taskName.completed_task });
const taskId = newTask.id;
@@ -102,15 +105,15 @@ describe('Comment component for Processes', () => {
});
it('[C212864] Should be able to add multiple comments on a single task using different users', () => {
browser.controlFlow().execute(async() => {
const newTask = await this.alfrescoJsApi.activiti.taskApi.createNewTask({name: taskName.multiple_users});
browser.controlFlow().execute(async () => {
const newTask = await this.alfrescoJsApi.activiti.taskApi.createNewTask({ name: taskName.multiple_users });
newTaskId = newTask.id;
await this.alfrescoJsApi.activiti.taskApi.involveUser(newTaskId, {email: secondUser.email});
await this.alfrescoJsApi.activiti.taskApi.involveUser(newTaskId, { email: secondUser.email });
const taskComment = {message: 'Task Comment'};
const secondTaskComment = {message: 'Second Task Comment'};
const taskComment = { message: 'Task Comment' };
const secondTaskComment = { message: 'Second Task Comment' };
await this.alfrescoJsApi.activiti.taskApi.addTaskComment(taskComment, newTaskId);
await this.alfrescoJsApi.activiti.taskApi.addTaskComment(secondTaskComment, newTaskId);
@@ -122,10 +125,10 @@ describe('Comment component for Processes', () => {
taskPage.tasksListPage().selectRow(taskName.multiple_users);
taskPage.taskDetails().selectActivityTab();
browser.controlFlow().execute(async() => {
const totalComments = await this.alfrescoJsApi.activiti.taskApi.getTaskComments(newTaskId, {'latestFirst': true});
browser.controlFlow().execute(async () => {
const totalComments = await this.alfrescoJsApi.activiti.taskApi.getTaskComments(newTaskId, { 'latestFirst': true });
const thirdTaskComment = {message: 'Third Task Comment'};
const thirdTaskComment = { message: 'Third Task Comment' };
await commentsPage.checkUserIconIsDisplayed(0);
await commentsPage.checkUserIconIsDisplayed(1);
@@ -152,8 +155,8 @@ describe('Comment component for Processes', () => {
taskPage.tasksListPage().selectRow(taskName.multiple_users);
taskPage.taskDetails().selectActivityTab();
browser.controlFlow().execute(async() => {
const totalComments = await this.alfrescoJsApi.activiti.taskApi.getTaskComments(newTaskId, {'latestFirst': true});
browser.controlFlow().execute(async () => {
const totalComments = await this.alfrescoJsApi.activiti.taskApi.getTaskComments(newTaskId, { 'latestFirst': true });
await commentsPage.checkUserIconIsDisplayed(0);
await commentsPage.checkUserIconIsDisplayed(1);