mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[no-issue] Parallel run e2e and e2e common action refactoring (#4702)
This commit is contained in:
@@ -59,7 +59,7 @@ describe('Modify applications', () => {
|
||||
firstApp = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
appVersionToBeDeleted = await apps.importPublishDeployApp(this.alfrescoJsApi, appToBeDeleted.file_location);
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
done();
|
||||
});
|
||||
@@ -74,7 +74,7 @@ describe('Modify applications', () => {
|
||||
expect(processServicesPage.getDescription(app.title)).toEqual(app.description);
|
||||
});
|
||||
|
||||
it('[C260213] Should a new version of the app be displayed on dashboard when is replaced by importing another app in APS', async () => {
|
||||
it('[C260213] Should a new version of the app be displayed on dashboard when is replaced by importing another app in APS', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
processServicesPage.checkApsContainer();
|
||||
@@ -87,7 +87,8 @@ describe('Modify applications', () => {
|
||||
return apps.importNewVersionAppDefinitionPublishDeployApp(this.alfrescoJsApi, replacingApp.file_location, firstApp.id);
|
||||
});
|
||||
|
||||
browser.refresh();
|
||||
navigationBarPage.clickHomeButton();
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
processServicesPage.checkApsContainer();
|
||||
|
||||
@@ -107,7 +108,8 @@ describe('Modify applications', () => {
|
||||
return modelActions.deleteEntireModel(this.alfrescoJsApi, firstApp.id);
|
||||
});
|
||||
|
||||
browser.refresh();
|
||||
navigationBarPage.clickHomeButton();
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
processServicesPage.checkApsContainer();
|
||||
processServicesPage.checkAppIsNotDisplayed(app.title);
|
||||
@@ -125,7 +127,8 @@ describe('Modify applications', () => {
|
||||
return apps.importNewVersionAppDefinitionPublishDeployApp(this.alfrescoJsApi, replacingApp.file_location, appVersionToBeDeleted.id);
|
||||
});
|
||||
|
||||
browser.refresh();
|
||||
navigationBarPage.clickHomeButton();
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
processServicesPage.getBackgroundColor(appToBeDeleted.title);
|
||||
|
||||
@@ -137,7 +140,8 @@ describe('Modify applications', () => {
|
||||
await apps.publishDeployApp(this.alfrescoJsApi, appVersionToBeDeleted.id);
|
||||
});
|
||||
|
||||
browser.refresh();
|
||||
navigationBarPage.clickHomeButton();
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
processServicesPage.checkApsContainer();
|
||||
processServicesPage.checkAppIsDisplayed(appToBeDeleted.title);
|
||||
@@ -162,7 +166,8 @@ describe('Modify applications', () => {
|
||||
await this.alfrescoJsApi.activiti.appsApi.updateAppDefinition(appVersionToBeDeleted.id, appDefinition);
|
||||
});
|
||||
|
||||
browser.refresh();
|
||||
navigationBarPage.clickHomeButton();
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
expect(processServicesPage.getDescription(appToBeDeleted.title)).toEqual(newDescription);
|
||||
expect(processServicesPage.getBackgroundColor(appToBeDeleted.title)).toEqual(CONSTANTS.APP_COLOR.RED);
|
||||
|
||||
@@ -58,10 +58,6 @@ describe('Attach Form Component', () => {
|
||||
hostBpm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
const users = new UsersActions();
|
||||
const appsActions = new AppsActions();
|
||||
|
||||
@@ -84,13 +80,13 @@ describe('Attach Form Component', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
await this.alfrescoJsApi.activiti.modelsApi.deleteModel(appId);
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
|
||||
|
||||
afterAll(async (done) => {
|
||||
try {
|
||||
await this.alfrescoJsApi.activiti.modelsApi.deleteModel(appId);
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
|
||||
} catch (error) {
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasksPage';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/processServicesPage';
|
||||
import { ChecklistDialog } from '../pages/adf/process-services/dialog/createChecklistDialog';
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
|
||||
import CONSTANTS = require('../util/constants');
|
||||
|
||||
@@ -31,7 +32,6 @@ import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import fs = require('fs');
|
||||
import path = require('path');
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Checklist component', () => {
|
||||
|
||||
@@ -41,6 +41,7 @@ describe('Checklist component', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const processServices = new ProcessServicesPage();
|
||||
const checklistDialog = new ChecklistDialog();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const tasks = ['no checklist created task', 'checklist number task', 'remove running checklist', 'remove completed checklist', 'hierarchy'];
|
||||
const checklists = ['cancelCheckList', 'dialogChecklist', 'addFirstChecklist', 'addSecondChecklist'];
|
||||
@@ -72,13 +73,14 @@ describe('Checklist component', () => {
|
||||
this.alfrescoJsApi.activiti.taskApi.createNewTask({ name: tasks[i] });
|
||||
}
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await browser.get(TestConfig.adf.url + '/activiti');
|
||||
navigationBarPage.clickHomeButton();
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
processServices.goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
done();
|
||||
@@ -143,7 +145,6 @@ describe('Checklist component', () => {
|
||||
taskPage.removeChecklists(removeChecklist[1]);
|
||||
taskPage.checkChecklistIsDisplayed(removeChecklist[0]);
|
||||
taskPage.checkChecklistIsNotDisplayed(removeChecklist[1]);
|
||||
// expect(taskPage.getNumberOfChecklists()).toEqual('1');
|
||||
});
|
||||
|
||||
it('[C261027] Should not be able to remove a completed Checklist when clicking on remove button', () => {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -52,7 +52,7 @@ describe('Sorting for process filters', () => {
|
||||
completed_least_recently: 'Completed - Least recently'
|
||||
};
|
||||
|
||||
beforeAll(async(done) => {
|
||||
beforeAll(async (done) => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'BPM',
|
||||
hostBpm: TestConfig.adf.url
|
||||
@@ -61,7 +61,7 @@ describe('Sorting for process filters', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async(done) => {
|
||||
beforeEach(async (done) => {
|
||||
const users = new UsersActions();
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
@@ -74,17 +74,12 @@ describe('Sorting for process filters', () => {
|
||||
const importedApp = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
appId = importedApp.id;
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage
|
||||
.navigateToProcessServicesPage()
|
||||
.goToTaskApp()
|
||||
.clickProcessButton();
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterEach(async(done) => {
|
||||
afterEach(async (done) => {
|
||||
await this.alfrescoJsApi.activiti.modelsApi.deleteModel(appId);
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
@@ -94,32 +89,38 @@ describe('Sorting for process filters', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C260476] Should be able to create a filter on APS for running processes - Oldest first and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
it('[C260476] Should be able to create a filter on APS for running processes - Oldest first and check on ADF', async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.running_old_first,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'created-asc', 'name': '', 'state': 'running'}
|
||||
'appId': null, 'name': processFilter.running_old_first, 'icon': 'glyphicon-random',
|
||||
'filter': { 'sort': 'created-asc', 'name': '', 'state': 'running' }
|
||||
});
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
||||
});
loginPage.loginToProcessServicesUsingUserModel(user);
navigationBarPage
|
||||
});
|
||||
|
||||
navigationBarPage
|
||||
.navigateToProcessServicesPage()
|
||||
.goToTaskApp()
|
||||
.clickProcessButton();
processFiltersPage.checkFilterIsDisplayed(processFilter.running_old_first);
filtersPage.goToFilter(processFilter.running_old_first);
browser.controlFlow().execute(async () => {
|
||||
.clickProcessButton();
|
||||
processFiltersPage.checkFilterIsDisplayed(processFilter.running_old_first);
|
||||
filtersPage.goToFilter(processFilter.running_old_first);
|
||||
await browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'running', 'sort': 'created-asc'
|
||||
});
|
||||
expect(processesQuery.data[0].name).toEqual('Process 1');
|
||||
expect(processesQuery.data[1].name).toEqual('Process 2');
|
||||
expect(processesQuery.data[2].name).toEqual('Process 3');
|
||||
});
});
|
||||
});
|
||||
});
|
||||
|
||||
it('[C260477] Should be able to create a filter on APS for completed processes - Oldest first and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
it('[C260477] Should be able to create a filter on APS for completed processes - Oldest first and check on ADF', async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.completed_old_first,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'created-asc', 'name': '', 'state': 'completed'}
|
||||
'appId': null, 'name': processFilter.completed_old_first, 'icon': 'glyphicon-random',
|
||||
'filter': { 'sort': 'created-asc', 'name': '', 'state': 'completed' }
|
||||
});
|
||||
|
||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -131,8 +132,6 @@ describe('Sorting for process filters', () => {
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(thirdProc.id);
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage
|
||||
.navigateToProcessServicesPage()
|
||||
.goToTaskApp()
|
||||
@@ -142,7 +141,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
filtersPage.goToFilter(processFilter.completed_old_first);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'created-asc'
|
||||
});
|
||||
@@ -152,11 +151,11 @@ describe('Sorting for process filters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C260478] Should be able to create a filter on APS for all processes - Oldest first and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
it('[C260478] Should be able to create a filter on APS for all processes - Oldest first and check on ADF', async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.all_old_first,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'created-asc', 'name': '', 'state': 'all'}
|
||||
'appId': null, 'name': processFilter.all_old_first, 'icon': 'glyphicon-random',
|
||||
'filter': { 'sort': 'created-asc', 'name': '', 'state': 'all' }
|
||||
});
|
||||
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -172,8 +171,6 @@ describe('Sorting for process filters', () => {
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(thirdProc.id);
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage
|
||||
.navigateToProcessServicesPage()
|
||||
.goToTaskApp()
|
||||
@@ -183,7 +180,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
filtersPage.goToFilter(processFilter.all_old_first);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'all', 'sort': 'created-asc'
|
||||
});
|
||||
@@ -196,11 +193,11 @@ describe('Sorting for process filters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C260479] Should be able to create a filter on APS for running processes - Newest first and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
it('[C260479] Should be able to create a filter on APS for running processes - Newest first and check on ADF', async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.running_new_first,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'created-desc', 'name': '', 'state': 'running'}
|
||||
'appId': null, 'name': processFilter.running_new_first, 'icon': 'glyphicon-random',
|
||||
'filter': { 'sort': 'created-desc', 'name': '', 'state': 'running' }
|
||||
});
|
||||
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -208,8 +205,6 @@ describe('Sorting for process filters', () => {
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage
|
||||
.navigateToProcessServicesPage()
|
||||
.goToTaskApp()
|
||||
@@ -219,7 +214,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
filtersPage.goToFilter(processFilter.running_new_first);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'running', 'sort': 'created-desc'
|
||||
});
|
||||
@@ -229,11 +224,11 @@ describe('Sorting for process filters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C260480] Should be able to create a filter on APS for completed processes - Newest first and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
it('[C260480] Should be able to create a filter on APS for completed processes - Newest first and check on ADF', async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.completed_new_first,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'created-desc', 'name': '', 'state': 'completed'}
|
||||
'appId': null, 'name': processFilter.completed_new_first, 'icon': 'glyphicon-random',
|
||||
'filter': { 'sort': 'created-desc', 'name': '', 'state': 'completed' }
|
||||
});
|
||||
|
||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -245,8 +240,6 @@ describe('Sorting for process filters', () => {
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(thirdProc.id);
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage
|
||||
.navigateToProcessServicesPage()
|
||||
.goToTaskApp()
|
||||
@@ -256,7 +249,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
filtersPage.goToFilter(processFilter.completed_new_first);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'created-desc'
|
||||
});
|
||||
@@ -266,11 +259,11 @@ describe('Sorting for process filters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C260481] Should be able to create a filter on APS for all processes - Newest first and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
it('[C260481] Should be able to create a filter on APS for all processes - Newest first and check on ADF', async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.all_new_first,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'created-desc', 'name': '', 'state': 'all'}
|
||||
'appId': null, 'name': processFilter.all_new_first, 'icon': 'glyphicon-random',
|
||||
'filter': { 'sort': 'created-desc', 'name': '', 'state': 'all' }
|
||||
});
|
||||
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -286,8 +279,6 @@ describe('Sorting for process filters', () => {
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(thirdProc.id);
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage
|
||||
.navigateToProcessServicesPage()
|
||||
.goToTaskApp()
|
||||
@@ -297,7 +288,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
filtersPage.goToFilter(processFilter.all_new_first);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'all', 'sort': 'created-desc'
|
||||
});
|
||||
@@ -310,11 +301,11 @@ describe('Sorting for process filters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C272815] Should be able to create a filter on APS for completed processes - Completed most recently and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
it('[C272815] Should be able to create a filter on APS for completed processes - Completed most recently and check on ADF', async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.completed_most_recently,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'ended-asc', 'name': '', 'state': 'completed'}
|
||||
'appId': null, 'name': processFilter.completed_most_recently, 'icon': 'glyphicon-random',
|
||||
'filter': { 'sort': 'ended-asc', 'name': '', 'state': 'completed' }
|
||||
});
|
||||
|
||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -326,8 +317,6 @@ describe('Sorting for process filters', () => {
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(thirdProc.id);
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage
|
||||
.navigateToProcessServicesPage()
|
||||
.goToTaskApp()
|
||||
@@ -337,7 +326,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
filtersPage.goToFilter(processFilter.completed_most_recently);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'ended-asc'
|
||||
});
|
||||
@@ -347,11 +336,11 @@ describe('Sorting for process filters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C272816] Should be able to create a filter on APS for completed processes - Completed least recently and check on ADF', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
it('[C272816] Should be able to create a filter on APS for completed processes - Completed least recently and check on ADF', async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
'name': processFilter.completed_least_recently,
'icon': 'glyphicon-random',
|
||||
'filter': {'sort': 'ended-desc', 'name': '', 'state': 'completed'}
|
||||
'appId': null, 'name': processFilter.completed_least_recently, 'icon': 'glyphicon-random',
|
||||
'filter': { 'sort': 'ended-desc', 'name': '', 'state': 'completed' }
|
||||
});
|
||||
|
||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
@@ -363,8 +352,6 @@ describe('Sorting for process filters', () => {
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(thirdProc.id);
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage
|
||||
.navigateToProcessServicesPage()
|
||||
.goToTaskApp()
|
||||
@@ -374,7 +361,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
filtersPage.goToFilter(processFilter.completed_least_recently);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await browser.controlFlow().execute(async () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'ended-desc'
|
||||
});
|
||||
|
||||
@@ -65,6 +65,8 @@ describe('New Process Filters', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -74,9 +76,7 @@ describe('New Process Filters', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C279965] Should be able to view default filters on ADF', () => {
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
it('[C279965] Should be able to view default filters on ADF', async () => {
|
||||
navigationBarPage.navigateToProcessServicesPage()
|
||||
.goToTaskApp()
|
||||
.clickProcessButton();
|
||||
@@ -86,7 +86,7 @@ describe('New Process Filters', () => {
|
||||
processFiltersPage.checkFilterIsDisplayed(processFilter.completed);
|
||||
});
|
||||
|
||||
it('[C260473] Should be able to create a new filter on APS and display it on ADF', () => {
|
||||
it('[C260473] Should be able to create a new filter on APS and display it on ADF', async () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
customProcessFilter = await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
|
||||
@@ -100,8 +100,6 @@ describe('New Process Filters', () => {
|
||||
return customProcessFilter;
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage.navigateToProcessServicesPage()
|
||||
.goToTaskApp()
|
||||
.clickProcessButton();
|
||||
@@ -109,7 +107,7 @@ describe('New Process Filters', () => {
|
||||
processFiltersPage.checkFilterIsDisplayed(processFilter.new_filter);
|
||||
});
|
||||
|
||||
it('[C286450] Should display the process filter icon when a custom filter is added', () => {
|
||||
it('[C286450] Should display the process filter icon when a custom filter is added', async () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
customProcessFilter = await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
|
||||
@@ -123,7 +121,6 @@ describe('New Process Filters', () => {
|
||||
return customProcessFilter;
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickProcessButton();
|
||||
|
||||
processFiltersPage.checkFilterIsDisplayed(processFilter.new_icon);
|
||||
@@ -136,7 +133,7 @@ describe('New Process Filters', () => {
|
||||
expect(processFiltersPage.getFilterIcon(processFilter.new_icon)).toEqual('cloud');
|
||||
});
|
||||
|
||||
it('[C260474] Should be able to edit a filter on APS and check it on ADF', () => {
|
||||
it('[C260474] Should be able to edit a filter on APS and check it on ADF', async () => {
|
||||
browser.controlFlow().execute(() => {
|
||||
return this.alfrescoJsApi.activiti.userFiltersApi.updateUserProcessInstanceFilter(filterId, {
|
||||
'appId': null,
|
||||
@@ -146,8 +143,6 @@ describe('New Process Filters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage.navigateToProcessServicesPage()
|
||||
.goToTaskApp()
|
||||
.clickProcessButton();
|
||||
@@ -155,7 +150,7 @@ describe('New Process Filters', () => {
|
||||
processFiltersPage.checkFilterIsDisplayed(processFilter.edited);
|
||||
});
|
||||
|
||||
it('[C286451] Should display changes on a process filter when this filter icon is edited', () => {
|
||||
it('[C286451] Should display changes on a process filter when this filter icon is edited', async () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
customProcessFilter = await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
|
||||
@@ -169,7 +164,6 @@ describe('New Process Filters', () => {
|
||||
return customProcessFilter;
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickProcessButton();
|
||||
|
||||
processFiltersPage.checkFilterIsDisplayed(processFilter.edit_icon);
|
||||
@@ -183,8 +177,6 @@ describe('New Process Filters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickProcessButton();
|
||||
|
||||
processFiltersPage.checkFilterIsDisplayed(processFilter.edit_icon);
|
||||
@@ -197,8 +189,7 @@ describe('New Process Filters', () => {
|
||||
expect(processFiltersPage.getFilterIcon(processFilter.edit_icon)).toEqual('cloud');
|
||||
});
|
||||
|
||||
it('[C286452] Should display process filter icons only when showIcon property is set on true', () => {
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
it('[C286452] Should display process filter icons only when showIcon property is set on true', async () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickProcessButton();
|
||||
processFiltersPage.checkFilterHasNoIcon(processFilter.all);
|
||||
|
||||
@@ -210,7 +201,7 @@ describe('New Process Filters', () => {
|
||||
expect(processFiltersPage.getFilterIcon(processFilter.all)).toEqual('dashboard');
|
||||
});
|
||||
|
||||
it('[C260475] Should be able to delete a filter on APS and check it on ADF', () => {
|
||||
it('[C260475] Should be able to delete a filter on APS and check it on ADF', async () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
customProcessFilter = await this.alfrescoJsApi.activiti.userFiltersApi.createUserProcessInstanceFilter({
|
||||
'appId': null,
|
||||
@@ -228,8 +219,6 @@ describe('New Process Filters', () => {
|
||||
return this.alfrescoJsApi.activiti.userFiltersApi.deleteUserProcessInstanceFilter(filterId);
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickProcessButton();
|
||||
|
||||
processFiltersPage.checkFilterIsNotDisplayed(processFilter.deleted);
|
||||
|
||||
@@ -121,399 +121,328 @@ describe('Start Task - Custom App', () => {
|
||||
'dueDate': currentDateStandardFormat
|
||||
});
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C286362] Default pagination settings on task list', () => {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
describe('', () => {
|
||||
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfTasks + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(nrOfTasks);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName)).toEqual(true);
|
||||
});
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page 1');
|
||||
expect(paginationPage.getTotalPages()).toEqual('of 1');
|
||||
paginationPage.checkPageSelectorIsNotDisplayed();
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
it('[C286367] 20 Items per page', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeItemsPerPage(itemsPerPage.twentyValue);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfTasks + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(nrOfTasks);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName)).toEqual(true);
|
||||
});
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
it('[C286365] 5 Items per page', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeItemsPerPage(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(0, 5))).toEqual(true);
|
||||
beforeEach(async () => {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
});
|
||||
|
||||
paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 6-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(5, 10))).toEqual(true);
|
||||
it('[C286362] Default pagination settings on task list', () => {
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfTasks + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(nrOfTasks);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName)).toEqual(true);
|
||||
});
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page 1');
|
||||
expect(paginationPage.getTotalPages()).toEqual('of 1');
|
||||
paginationPage.checkPageSelectorIsNotDisplayed();
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 11-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(10, 15))).toEqual(true);
|
||||
it('[C286367] 20 Items per page', function () {
|
||||
taskListSinglePage.typeItemsPerPage(itemsPerPage.twentyValue);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfTasks + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(nrOfTasks);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName)).toEqual(true);
|
||||
});
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 16-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(15, 20))).toEqual(true);
|
||||
});
|
||||
});
|
||||
it('[C286365] 5 Items per page', function () {
|
||||
taskListSinglePage.typeItemsPerPage(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(0, 5))).toEqual(true);
|
||||
});
|
||||
|
||||
it('[C286364] 10 Items per page', function () {
|
||||
currentPage = 1;
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
paginationPage.clickOnNextPage();
|
||||
|
||||
taskListSinglePage.typeItemsPerPage(itemsPerPage.tenValue);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.tenValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.tenValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(0, 10))).toEqual(true);
|
||||
});
|
||||
paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 11-' + itemsPerPage.tenValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.tenValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(10, 20))).toEqual(true);
|
||||
});
|
||||
});
|
||||
currentPage++;
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 6-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(5, 10))).toEqual(true);
|
||||
});
|
||||
|
||||
it('[C286363] 15 Items per page', function () {
|
||||
currentPage = 1;
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 11-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(10, 15))).toEqual(true);
|
||||
});
|
||||
|
||||
taskListSinglePage.typeItemsPerPage(itemsPerPage.fifteenValue);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fifteenValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(0, 15))).toEqual(true);
|
||||
});
|
||||
currentPage++;
|
||||
paginationPage.clickOnNextPage();
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 16-' + nrOfTasks + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(nrOfTasks - itemsPerPage.fifteenValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(15, 20))).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C286366] Pagination is not displayed when no task is displayed', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeAppId(secondAppRuntime.id);
|
||||
expect(taskListSinglePage.getAppId()).toEqual(secondAppRuntime.id.toString());
|
||||
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286406] Invalid values for items per page', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeItemsPerPage('0').clickAppId();
|
||||
expect(taskListSinglePage.getItemsPerPageFieldErrorMessage()).toEqual('Value must be greater than or equal to 1');
|
||||
});
|
||||
|
||||
it('[C286404] Navigate using page field', function () {
|
||||
currentPage = 1;
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeItemsPerPage(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.typePage(currentPage);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
|
||||
expect(paginationPage.getTotalPages()).toEqual(totalNrOfPages);
|
||||
paginationPage.checkPageSelectorIsDisplayed();
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(0, 5))).toEqual(true);
|
||||
paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 16-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(15, 20))).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
currentPage++;
|
||||
taskListSinglePage.typePage(currentPage);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
|
||||
expect(paginationPage.getTotalPages()).toEqual(totalNrOfPages);
|
||||
paginationPage.checkPageSelectorIsDisplayed();
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(5, 10))).toEqual(true);
|
||||
it('[C286364] 10 Items per page', function () {
|
||||
currentPage = 1;
|
||||
taskListSinglePage.typeItemsPerPage(itemsPerPage.tenValue);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.tenValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.tenValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(0, 10))).toEqual(true);
|
||||
});
|
||||
paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 11-' + itemsPerPage.tenValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.tenValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(10, 20))).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
currentPage++;
|
||||
taskListSinglePage.typePage(currentPage);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
|
||||
expect(paginationPage.getTotalPages()).toEqual(totalNrOfPages);
|
||||
paginationPage.checkPageSelectorIsDisplayed();
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(10, 15))).toEqual(true);
|
||||
it('[C286363] 15 Items per page', function () {
|
||||
currentPage = 1;
|
||||
taskListSinglePage.typeItemsPerPage(itemsPerPage.fifteenValue);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * currentPage + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fifteenValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(0, 15))).toEqual(true);
|
||||
});
|
||||
currentPage++;
|
||||
paginationPage.clickOnNextPage();
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 16-' + nrOfTasks + ' of ' + nrOfTasks);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(nrOfTasks - itemsPerPage.fifteenValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(15, 20))).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
currentPage++;
|
||||
taskListSinglePage.typePage(currentPage);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
|
||||
expect(paginationPage.getTotalPages()).toEqual(totalNrOfPages);
|
||||
paginationPage.checkPageSelectorIsDisplayed();
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(15, 20))).toEqual(true);
|
||||
it('[C286366] Pagination is not displayed when no task is displayed', function () {
|
||||
taskListSinglePage.typeAppId(secondAppRuntime.id);
|
||||
expect(taskListSinglePage.getAppId()).toEqual(secondAppRuntime.id.toString());
|
||||
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
});
|
||||
|
||||
it('[C286405] Type invalid values to page field', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typePage('0').clickAppId();
|
||||
expect(taskListSinglePage.getPageFieldErrorMessage()).toEqual('Value must be greater than or equal to 1');
|
||||
|
||||
taskListSinglePage.clickResetButton();
|
||||
taskListSinglePage.typePage('2');
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286413] Task is displayed when typing into dueAfter field a date before the tasks due date', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeDueAfter(beforeDate);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(paginationTasksName[0]);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(1);
|
||||
});
|
||||
|
||||
it('[C286414] Task is not displayed when typing into dueAfter field a date after the task due date', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeDueAfter(afterDate);
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286415] Task is not displayed when typing into dueAfter field the same date as tasks due date', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeDueAfter(currentDate);
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286424] Task is not displayed when typing into dueBefore field a date before the tasks due date', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeDueBefore(beforeDate);
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286425] Task is displayed when typing into dueBefore field a date after the task due date', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeDueBefore(afterDate);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(paginationTasksName[0]);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(1);
|
||||
});
|
||||
|
||||
it('[C286426] Task is not displayed when typing into dueBefore field the same date as tasks due date', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeDueBefore(currentDate);
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286428] Task is not displayed when typing into dueAfter field a date before the task due date and into dueBefore a date before task due date', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeDueBefore(beforeDate);
|
||||
taskListSinglePage.typeDueAfter(beforeDate);
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286427] Task is displayed when typing into dueAfter field a date before the tasks due date and into dueBefore a date after', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeDueBefore(afterDate);
|
||||
taskListSinglePage.typeDueAfter(beforeDate);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(paginationTasksName[0]);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(1);
|
||||
});
|
||||
|
||||
it('[C286429] Task is not displayed when typing into dueAfter field a date after the tasks due date and into dueBefore a date after', function () {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeDueBefore(afterDate);
|
||||
taskListSinglePage.typeDueAfter(afterDate);
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C280515] Should be able to see only the tasks of a specific app when typing the apps id in the appId field', () => {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeAppId(appRuntime.id);
|
||||
expect(taskListSinglePage.getAppId()).toEqual(appRuntime.id.toString());
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(app.taskName);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(app.taskName);
|
||||
taskListSinglePage.taskList().checkContentIsNotDisplayed(paginationTasksName[13]);
|
||||
});
|
||||
|
||||
it('[C280569] Should be able to see No tasks found when typing an invalid appId', () => {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeAppId(invalidAppId);
|
||||
expect(taskListSinglePage.getAppId()).toEqual(invalidAppId.toString());
|
||||
|
||||
expect(taskListSinglePage.taskList().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
|
||||
});
|
||||
|
||||
it('[C280570] Should be able to see only the tasks with specific name when typing the name in the task name field', () => {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeTaskName(paginationTasksName[13]);
|
||||
expect(taskListSinglePage.getTaskName()).toEqual(paginationTasksName[13]);
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(paginationTasksName[13]);
|
||||
taskListSinglePage.taskList().getRowsDisplayedWithSameName(paginationTasksName[13]).then((list) => {
|
||||
expect(list.length).toEqual(2);
|
||||
it('[C286406] Invalid values for items per page', function () {
|
||||
taskListSinglePage.typeItemsPerPage('0').clickAppId();
|
||||
expect(taskListSinglePage.getItemsPerPageFieldErrorMessage()).toEqual('Value must be greater than or equal to 1');
|
||||
});
|
||||
});
|
||||
|
||||
it('[C280571] Should be able to see No tasks found when typing a task name that does not exist', () => {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
it('[C286404] Navigate using page field', function () {
|
||||
currentPage = 1;
|
||||
taskListSinglePage.typeItemsPerPage(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.typePage(currentPage);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
|
||||
expect(paginationPage.getTotalPages()).toEqual(totalNrOfPages);
|
||||
paginationPage.checkPageSelectorIsDisplayed();
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(0, 5))).toEqual(true);
|
||||
});
|
||||
|
||||
taskListSinglePage.typeTaskName(invalidName);
|
||||
expect(taskListSinglePage.getTaskName()).toEqual(invalidName);
|
||||
currentPage++;
|
||||
taskListSinglePage.typePage(currentPage);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
|
||||
expect(paginationPage.getTotalPages()).toEqual(totalNrOfPages);
|
||||
paginationPage.checkPageSelectorIsDisplayed();
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(5, 10))).toEqual(true);
|
||||
});
|
||||
|
||||
expect(taskListSinglePage.taskList().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
|
||||
});
|
||||
currentPage++;
|
||||
taskListSinglePage.typePage(currentPage);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
|
||||
expect(paginationPage.getTotalPages()).toEqual(totalNrOfPages);
|
||||
paginationPage.checkPageSelectorIsDisplayed();
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(10, 15))).toEqual(true);
|
||||
});
|
||||
|
||||
it('[C280629] Should be able to see only the task with specific taskId when typing it in the task Id field', () => {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeTaskId(taskWithDueDate.id);
|
||||
expect(taskListSinglePage.getTaskId()).toEqual(taskWithDueDate.id);
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(taskWithDueDate.name);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(1);
|
||||
});
|
||||
|
||||
it('[C280630] Should be able to see No tasks found when typing an invalid taskId', () => {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.typeTaskId(invalidTaskId);
|
||||
expect(taskListSinglePage.getTaskId()).toEqual(invalidTaskId);
|
||||
|
||||
expect(taskListSinglePage.taskList().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
|
||||
});
|
||||
|
||||
it('[C286589] Should be able to see only completed tasks when choosing Completed from state drop down', () => {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.selectState('Completed');
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[0].name);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[1].name);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[2].name);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(3);
|
||||
});
|
||||
|
||||
it('[C286597] Should be able to see only running tasks when choosing Active from state drop down', () => {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
|
||||
taskListSinglePage.selectState('Active');
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsNotDisplayed(completedTasks[0].name);
|
||||
taskListSinglePage.taskList().checkContentIsNotDisplayed(completedTasks[1].name);
|
||||
taskListSinglePage.taskList().checkContentIsNotDisplayed(completedTasks[2].name);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName)).toEqual(true);
|
||||
currentPage++;
|
||||
taskListSinglePage.typePage(currentPage);
|
||||
taskListSinglePage.taskList().getDataTable().waitForTableBody();
|
||||
expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
|
||||
expect(paginationPage.getTotalPages()).toEqual(totalNrOfPages);
|
||||
paginationPage.checkPageSelectorIsDisplayed();
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName.slice(15, 20))).toEqual(true);
|
||||
});
|
||||
});
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(20);
|
||||
});
|
||||
|
||||
it('[C286598] Should be able to see all tasks when choosing All from state drop down', () => {
|
||||
navigationBarPage.clickTaskListButton();
|
||||
taskListSinglePage.clickResetButton();
|
||||
it('[C286405] Type invalid values to page field', function () {
|
||||
taskListSinglePage.typePage('0').clickAppId();
|
||||
expect(taskListSinglePage.getPageFieldErrorMessage()).toEqual('Value must be greater than or equal to 1');
|
||||
|
||||
taskListSinglePage.selectState('All');
|
||||
taskListSinglePage.clickResetButton();
|
||||
taskListSinglePage.typePage('2');
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[0].name);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[1].name);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[2].name);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName)).toEqual(true);
|
||||
it('[C286413] Task is displayed when typing into dueAfter field a date before the tasks due date', function () {
|
||||
taskListSinglePage.typeDueAfter(beforeDate);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(paginationTasksName[0]);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(1);
|
||||
});
|
||||
|
||||
it('[C286414] Task is not displayed when typing into dueAfter field a date after the task due date', function () {
|
||||
taskListSinglePage.typeDueAfter(afterDate);
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286415] Task is not displayed when typing into dueAfter field the same date as tasks due date', function () {
|
||||
taskListSinglePage.typeDueAfter(currentDate);
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286424] Task is not displayed when typing into dueBefore field a date before the tasks due date', function () {
|
||||
taskListSinglePage.typeDueBefore(beforeDate);
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286425] Task is displayed when typing into dueBefore field a date after the task due date', function () {
|
||||
taskListSinglePage.typeDueBefore(afterDate);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(paginationTasksName[0]);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(1);
|
||||
});
|
||||
|
||||
it('[C286426] Task is not displayed when typing into dueBefore field the same date as tasks due date', function () {
|
||||
taskListSinglePage.typeDueBefore(currentDate);
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286428] Task is not displayed when typing into dueAfter field a date before the task due date and into dueBefore a date before task due date', function () {
|
||||
taskListSinglePage.typeDueBefore(beforeDate);
|
||||
taskListSinglePage.typeDueAfter(beforeDate);
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286427] Task is displayed when typing into dueAfter field a date before the tasks due date and into dueBefore a date after', function () {
|
||||
taskListSinglePage.typeDueBefore(afterDate);
|
||||
taskListSinglePage.typeDueAfter(beforeDate);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(paginationTasksName[0]);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(1);
|
||||
});
|
||||
|
||||
it('[C286429] Task is not displayed when typing into dueAfter field a date after the tasks due date and into dueBefore a date after', function () {
|
||||
taskListSinglePage.typeDueBefore(afterDate);
|
||||
taskListSinglePage.typeDueAfter(afterDate);
|
||||
taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C280515] Should be able to see only the tasks of a specific app when typing the apps id in the appId field', () => {
|
||||
taskListSinglePage.typeAppId(appRuntime.id);
|
||||
expect(taskListSinglePage.getAppId()).toEqual(appRuntime.id.toString());
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(app.taskName);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(app.taskName);
|
||||
taskListSinglePage.taskList().checkContentIsNotDisplayed(paginationTasksName[13]);
|
||||
});
|
||||
|
||||
it('[C280569] Should be able to see No tasks found when typing an invalid appId', () => {
|
||||
taskListSinglePage.typeAppId(invalidAppId);
|
||||
expect(taskListSinglePage.getAppId()).toEqual(invalidAppId.toString());
|
||||
|
||||
expect(taskListSinglePage.taskList().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
|
||||
});
|
||||
|
||||
it('[C280570] Should be able to see only the tasks with specific name when typing the name in the task name field', () => {
|
||||
taskListSinglePage.typeTaskName(paginationTasksName[13]);
|
||||
expect(taskListSinglePage.getTaskName()).toEqual(paginationTasksName[13]);
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(paginationTasksName[13]);
|
||||
taskListSinglePage.taskList().getRowsDisplayedWithSameName(paginationTasksName[13]).then((list) => {
|
||||
expect(list.length).toEqual(2);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C280571] Should be able to see No tasks found when typing a task name that does not exist', () => {
|
||||
taskListSinglePage.typeTaskName(invalidName);
|
||||
expect(taskListSinglePage.getTaskName()).toEqual(invalidName);
|
||||
|
||||
expect(taskListSinglePage.taskList().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
|
||||
});
|
||||
|
||||
it('[C280629] Should be able to see only the task with specific taskId when typing it in the task Id field', () => {
|
||||
taskListSinglePage.typeTaskId(taskWithDueDate.id);
|
||||
expect(taskListSinglePage.getTaskId()).toEqual(taskWithDueDate.id);
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(taskWithDueDate.name);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(1);
|
||||
});
|
||||
|
||||
it('[C280630] Should be able to see No tasks found when typing an invalid taskId', () => {
|
||||
taskListSinglePage.typeTaskId(invalidTaskId);
|
||||
expect(taskListSinglePage.getTaskId()).toEqual(invalidTaskId);
|
||||
|
||||
expect(taskListSinglePage.taskList().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
|
||||
});
|
||||
|
||||
it('[C286589] Should be able to see only completed tasks when choosing Completed from state drop down', () => {
|
||||
taskListSinglePage.selectState('Completed');
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[0].name);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[1].name);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[2].name);
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(3);
|
||||
});
|
||||
|
||||
it('[C286597] Should be able to see only running tasks when choosing Active from state drop down', () => {
|
||||
taskListSinglePage.selectState('Active');
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsNotDisplayed(completedTasks[0].name);
|
||||
taskListSinglePage.taskList().checkContentIsNotDisplayed(completedTasks[1].name);
|
||||
taskListSinglePage.taskList().checkContentIsNotDisplayed(completedTasks[2].name);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName)).toEqual(true);
|
||||
});
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(20);
|
||||
});
|
||||
|
||||
it('[C286598] Should be able to see all tasks when choosing All from state drop down', () => {
|
||||
taskListSinglePage.selectState('All');
|
||||
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[0].name);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[1].name);
|
||||
taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[2].name);
|
||||
taskListSinglePage.taskList().getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, allTasksName)).toEqual(true);
|
||||
});
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(23);
|
||||
});
|
||||
expect(taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(23);
|
||||
});
|
||||
|
||||
// failing due to ADF-3667, blocked by ACTIVITI-1975
|
||||
|
||||
@@ -63,7 +63,7 @@ describe('Form widgets - People', () => {
|
||||
|
||||
appModel = await appsActions.importPublishDeployApp(alfrescoJsApi, app.file_location);
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../pages/adf/process-services/widgets/widget';
|
||||
|
||||
@@ -23,7 +23,6 @@ import CONSTANTS = require('../util/constants');
|
||||
|
||||
import FormDefinitionModel = require('../models/APS/FormDefinitionModel');
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
import Task = require('../models/APS/Task');
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
@@ -31,7 +30,6 @@ import resources = require('../util/resources');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
const formInstance = new FormDefinitionModel();
|
||||
|
||||
@@ -65,11 +63,27 @@ describe('Form widgets', () => {
|
||||
|
||||
appModel = await appsActions.importPublishDeployApp(alfrescoJsApi, app.file_location);
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
new NavigationBarPage().navigateToProcessServicesPage().goToApp(appModel.name);
|
||||
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.createNewTask().addName(newTask).addDescription('Description').addForm(app.formName).clickStartButton();
|
||||
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(newTask);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
expect(taskPage.taskDetails().getTitle()).toEqual('Activities');
|
||||
|
||||
const response = await taskPage.taskDetails().getId();
|
||||
|
||||
const formDefinition = await alfrescoJsApi.activiti.taskFormsApi.getTaskForm(response);
|
||||
formInstance.setFields(formDefinition.fields);
|
||||
formInstance.setAllWidgets(formDefinition.fields);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
|
||||
await alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
|
||||
@@ -78,43 +92,18 @@ describe('Form widgets', () => {
|
||||
});
|
||||
|
||||
it('[C272778] Should display text and multi-line in form', () => {
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
new NavigationBarPage().navigateToProcessServicesPage().goToApp(appModel.name)
|
||||
.clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.createNewTask().addName(newTask).addDescription('Description').addForm(app.formName).clickStartButton()
|
||||
.then(() => {
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(newTask);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
expect(taskPage.taskDetails().getTitle()).toEqual('Activities');
|
||||
})
|
||||
.then(() => {
|
||||
return alfrescoJsApi.activiti.taskApi.listTasks(new Task({ sort: 'created-desc' }));
|
||||
})
|
||||
.then((response) => {
|
||||
return alfrescoJsApi.activiti.taskFormsApi.getTaskForm(response.data[0].id);
|
||||
})
|
||||
.then((formDefinition) => {
|
||||
formInstance.setFields(formDefinition.fields);
|
||||
formInstance.setAllWidgets(formDefinition.fields);
|
||||
return formInstance;
|
||||
})
|
||||
.then(() => {
|
||||
expect(taskPage.formFields().getFieldLabel(appFields.text_id))
|
||||
.toEqual(formInstance.getWidgetBy('id', appFields.text_id).name);
|
||||
expect(taskPage.formFields().getFieldValue(appFields.text_id))
|
||||
.toEqual(formInstance.getWidgetBy('id', appFields.text_id).value || '');
|
||||
|
||||
expect(widget.multilineTextWidget().getFieldValue(appFields.multiline_id))
|
||||
.toEqual(formInstance.getWidgetBy('id', appFields.multiline_id).value || '');
|
||||
expect(taskPage.formFields().getFieldLabel(appFields.multiline_id))
|
||||
.toEqual(formInstance.getWidgetBy('id', appFields.multiline_id).name);
|
||||
});
|
||||
expect(taskPage.formFields().getFieldLabel(appFields.text_id))
|
||||
.toEqual(formInstance.getWidgetBy('id', appFields.text_id).name);
|
||||
expect(taskPage.formFields().getFieldValue(appFields.text_id))
|
||||
.toEqual(formInstance.getWidgetBy('id', appFields.text_id).value || '');
|
||||
|
||||
expect(widget.multilineTextWidget().getFieldValue(appFields.multiline_id))
|
||||
.toEqual(formInstance.getWidgetBy('id', appFields.multiline_id).value || '');
|
||||
expect(taskPage.formFields().getFieldLabel(appFields.multiline_id))
|
||||
.toEqual(formInstance.getWidgetBy('id', appFields.multiline_id).name);
|
||||
});
|
||||
|
||||
it('[C272779] Should display number and amount in form', () => {
|
||||
|
||||
expect(taskPage.formFields().getFieldValue(appFields.number_id))
|
||||
.toEqual(formInstance.getWidgetBy('id', appFields.number_id).value || '');
|
||||
expect(taskPage.formFields().getFieldLabel(appFields.number_id))
|
||||
@@ -127,7 +116,6 @@ describe('Form widgets', () => {
|
||||
});
|
||||
|
||||
it('[C272780] Should display attach file and attach folder in form', () => {
|
||||
|
||||
expect(taskPage.formFields().getFieldLabel(appFields.attachFolder_id))
|
||||
.toEqual(formInstance.getWidgetBy('id', appFields.attachFolder_id).name);
|
||||
expect(taskPage.formFields().getFieldLabel(appFields.attachFile_id))
|
||||
@@ -135,7 +123,6 @@ describe('Form widgets', () => {
|
||||
});
|
||||
|
||||
it('[C272781] Should display date and date & time in form', () => {
|
||||
|
||||
expect(taskPage.formFields().getFieldLabel(appFields.date_id))
|
||||
.toContain(formInstance.getWidgetBy('id', appFields.date_id).name);
|
||||
expect(taskPage.formFields().getFieldValue(appFields.date_id))
|
||||
@@ -148,7 +135,6 @@ describe('Form widgets', () => {
|
||||
});
|
||||
|
||||
it('[C272782] Should display people and group in form', () => {
|
||||
|
||||
expect(taskPage.formFields().getFieldValue(appFields.people_id))
|
||||
.toEqual(formInstance.getWidgetBy('id', appFields.people_id).value || '');
|
||||
expect(taskPage.formFields().getFieldLabel(appFields.people_id))
|
||||
@@ -236,13 +222,13 @@ describe('Form widgets', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
beforeEach(async() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -69,16 +69,16 @@ describe('Process List - Pagination when adding processes', () => {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
}
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
new NavigationBarPage().navigateToProcessServicesPage().goToTaskApp().clickProcessButton();
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
processFiltersPage.waitForTableBody();
|
||||
await new NavigationBarPage().navigateToProcessServicesPage().goToTaskApp().clickProcessButton();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C261046] Should keep Items per page after adding processes', () => {
|
||||
it('[C261046] Should keep Items per page after adding processes', async () => {
|
||||
await processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
await processFiltersPage.waitForTableBody();
|
||||
totalPages = 2;
|
||||
page = 1;
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ describe('Items per page set to 15 and adding of tasks', () => {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
}
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -31,7 +31,6 @@ import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import fs = require('fs');
|
||||
import path = require('path');
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('People component', () => {
|
||||
|
||||
@@ -70,18 +69,19 @@ describe('People component', () => {
|
||||
|
||||
await this.alfrescoJsApi.activiti.appsApi.importAppDefinition(file);
|
||||
|
||||
for (let i = 0; i < tasks.length; i++) {
|
||||
await this.alfrescoJsApi.activiti.taskApi.createNewTask({name: tasks[i]});
|
||||
}
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await this.alfrescoJsApi.activiti.taskApi.createNewTask({ name: tasks[0] });
|
||||
await this.alfrescoJsApi.activiti.taskApi.createNewTask({ name: tasks[1] });
|
||||
await this.alfrescoJsApi.activiti.taskApi.createNewTask({ name: tasks[2] });
|
||||
await this.alfrescoJsApi.activiti.taskApi.createNewTask({ name: tasks[3] });
|
||||
await this.alfrescoJsApi.activiti.taskApi.createNewTask({ name: tasks[4] });
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await browser.get(TestConfig.adf.url + '/activiti');
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
processServices.goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
done();
|
||||
@@ -146,7 +146,7 @@ describe('People component', () => {
|
||||
taskPage.taskDetails().checkNoPeopleIsInvolved();
|
||||
});
|
||||
|
||||
it('[C280013] Should not be able to complete a task by a involved user', () => {
|
||||
it('[C280013] Should not be able to complete a task by a involved user', async () => {
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[1]);
|
||||
taskPage.tasksListPage().selectRow(tasks[1]);
|
||||
|
||||
@@ -159,7 +159,7 @@ describe('People component', () => {
|
||||
expect(taskPage.taskDetails().getInvolvedUserEmail(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName))
|
||||
.toEqual(assigneeUserModel.email);
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(assigneeUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(assigneeUserModel);
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[1]);
|
||||
@@ -193,7 +193,7 @@ describe('People component', () => {
|
||||
expect(taskPage.taskDetails().getInvolvedPeopleTitle()).toEqual(peopleTitle + '(2)');
|
||||
});
|
||||
|
||||
it('[C280014] Should involved user see the task in completed filters when the task is completed', () => {
|
||||
it('[C280014] Should involved user see the task in completed filters when the task is completed', async () => {
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[3]);
|
||||
taskPage.tasksListPage().selectRow(tasks[3]);
|
||||
|
||||
@@ -212,7 +212,7 @@ describe('People component', () => {
|
||||
expect(taskPage.taskDetails().getInvolvedUserEmail(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName))
|
||||
.toEqual(assigneeUserModel.email);
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(assigneeUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(assigneeUserModel);
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.COMPLETED_TASKS);
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[3]);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/processServicesPage';
|
||||
@@ -79,15 +79,16 @@ describe('Process Filters Test', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
beforeEach(async () => {
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
processServicesPage.checkApsContainer();
|
||||
processServicesPage.goToApp(app.title);
|
||||
processServiceTabBarPage.clickProcessButton();
|
||||
processListPage.checkProcessListIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C260387] Should the running process be displayed when clicking on Running filter', () => {
|
||||
processServicesPage.goToApp(app.title);
|
||||
processServiceTabBarPage.clickProcessButton();
|
||||
processListPage.checkProcessListIsDisplayed();
|
||||
|
||||
processFiltersPage.clickCreateProcessButton();
|
||||
processFiltersPage.clickNewProcessDropdown();
|
||||
|
||||
@@ -116,6 +117,10 @@ describe('Process Filters Test', () => {
|
||||
});
|
||||
|
||||
it('[C280063] Should both the new created process and a completed one to be displayed when clicking on All filter', () => {
|
||||
processServicesPage.goToApp(app.title);
|
||||
processServiceTabBarPage.clickProcessButton();
|
||||
processListPage.checkProcessListIsDisplayed();
|
||||
|
||||
processFiltersPage.clickAllFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilter.all);
|
||||
processFiltersPage.selectFromProcessList(processTitle.running);
|
||||
@@ -124,6 +129,10 @@ describe('Process Filters Test', () => {
|
||||
});
|
||||
|
||||
it('[C280064] Should the completed process be displayed when clicking on Completed filter', () => {
|
||||
processServicesPage.goToApp(app.title);
|
||||
processServiceTabBarPage.clickProcessButton();
|
||||
processListPage.checkProcessListIsDisplayed();
|
||||
|
||||
processFiltersPage.clickCompletedFilterButton();
|
||||
processFiltersPage.checkFilterIsHighlighted(processFilter.completed);
|
||||
processFiltersPage.selectFromProcessList(processTitle.completed);
|
||||
@@ -149,10 +158,14 @@ describe('Process Filters Test', () => {
|
||||
return this.alfrescoJsApi.activiti.userFiltersApi.getUserProcessInstanceFilters({appId: deployedApp.id});
|
||||
});
|
||||
|
||||
processServicesPage.goToApp(app.title);
|
||||
processServiceTabBarPage.clickProcessButton();
|
||||
processListPage.checkProcessListIsDisplayed();
|
||||
|
||||
expect(taskAppFilters.size).toBe(defaultFiltersNumber);
|
||||
|
||||
taskAppFilters.data.forEach((filter) => {
|
||||
browser.get(processFilterUrl + filter.id);
|
||||
BrowserActions.getUrl(processFilterUrl + filter.id);
|
||||
processListPage.checkProcessListIsDisplayed();
|
||||
processFiltersPage.checkFilterIsHighlighted(filter.name);
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { ProcessListDemoPage } from '../pages/adf/demo-shell/process-services/processListDemoPage';
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
@@ -24,7 +24,6 @@ import resources = require('../util/resources');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Process List Test', () => {
|
||||
|
||||
@@ -102,7 +101,7 @@ describe('Process List Test', () => {
|
||||
});
|
||||
|
||||
beforeEach((done) => {
|
||||
browser.get(TestConfig.adf.url + '/process-list');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/process-list');
|
||||
done();
|
||||
});
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ describe('Process List - Pagination', function () {
|
||||
|
||||
deployedTestApp = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -72,7 +72,7 @@ describe('Task List Pagination - Sorting', () => {
|
||||
this.alfrescoJsApi.activiti.taskApi.createNewTask({name: taskNames[i]});
|
||||
}
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -65,60 +65,54 @@ describe('Start Task - Task App', () => {
|
||||
|
||||
await this.alfrescoJsApi.activiti.appsApi.importAppDefinition(file);
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C260421] Should a standalone task be displayed when creating a new task without form', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.createNewTask().addName(tasks[0]).clickStartButton()
|
||||
.then(() => {
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[0]);
|
||||
taskPage.taskDetails().noFormIsDisplayed();
|
||||
taskPage.taskDetails().checkCompleteTaskButtonIsDisplayed().checkCompleteTaskButtonIsEnabled();
|
||||
taskPage.taskDetails().checkAttachFormButtonIsDisplayed();
|
||||
taskPage.taskDetails().checkAttachFormButtonIsEnabled();
|
||||
expect(taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
expect(taskPage.formFields().getNoFormMessage()).toEqual(noFormMessage);
|
||||
});
|
||||
|
||||
taskPage.createNewTask().addName(tasks[0]).clickStartButton();
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[0]);
|
||||
taskPage.taskDetails().noFormIsDisplayed();
|
||||
taskPage.taskDetails().checkCompleteTaskButtonIsDisplayed().checkCompleteTaskButtonIsEnabled();
|
||||
taskPage.taskDetails().checkAttachFormButtonIsDisplayed();
|
||||
taskPage.taskDetails().checkAttachFormButtonIsEnabled();
|
||||
expect(taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
expect(taskPage.formFields().getNoFormMessage()).toEqual(noFormMessage);
|
||||
});
|
||||
|
||||
it('[C268910] Should a standalone task be displayed in completed tasks when completing it', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.createNewTask().addName(tasks[1]).clickStartButton()
|
||||
.then(() => {
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[1]);
|
||||
taskPage.formFields().noFormIsDisplayed();
|
||||
taskPage.createNewTask().addName(tasks[1]).clickStartButton();
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[1]);
|
||||
taskPage.formFields().noFormIsDisplayed();
|
||||
|
||||
taskPage.completeTaskNoForm();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.COMPLETED_TASKS);
|
||||
taskPage.tasksListPage().selectRow(tasks[1]);
|
||||
expect(taskPage.formFields().getCompletedTaskNoFormMessage()).toEqual('Task ' + tasks[1] + ' completed');
|
||||
taskPage.completeTaskNoForm();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.COMPLETED_TASKS);
|
||||
taskPage.tasksListPage().selectRow(tasks[1]);
|
||||
expect(taskPage.formFields().getCompletedTaskNoFormMessage()).toEqual('Task ' + tasks[1] + ' completed');
|
||||
|
||||
taskPage.formFields().noFormIsDisplayed();
|
||||
expect(taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
});
|
||||
taskPage.formFields().noFormIsDisplayed();
|
||||
expect(taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASK_DETAILS.NO_FORM);
|
||||
});
|
||||
|
||||
it('[C268911] Should allow adding a form to a standalone task when clicking on Add form button', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.createNewTask().addName(tasks[2]).clickStartButton()
|
||||
.then(() => {
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[2]);
|
||||
taskPage.formFields().noFormIsDisplayed();
|
||||
taskPage.createNewTask().addName(tasks[2]).clickStartButton();
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[2]);
|
||||
taskPage.formFields().noFormIsDisplayed();
|
||||
|
||||
taskPage.formFields().clickOnAttachFormButton().selectForm(app.formName).clickOnAttachFormButton();
|
||||
expect(taskPage.taskDetails().getFormName()).toEqual(app.formName);
|
||||
});
|
||||
taskPage.formFields().clickOnAttachFormButton().selectForm(app.formName).clickOnAttachFormButton();
|
||||
expect(taskPage.taskDetails().getFormName()).toEqual(app.formName);
|
||||
});
|
||||
|
||||
it('[C268912] Should a standalone task be displayed when removing the form from APS', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.createNewTask().addName(tasks[3]).addForm(app.formName).clickStartButton();
|
||||
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(tasks[3]);
|
||||
|
||||
@@ -112,8 +112,8 @@ describe('Start Process Component', () => {
|
||||
|
||||
describe(' Once logged with user without apps', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
loginPage.loginToProcessServicesUsingUserModel(procUserModel);
|
||||
beforeEach(async () => {
|
||||
await loginPage.loginToProcessServicesUsingUserModel(procUserModel);
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
processServicesPage.checkApsContainer();
|
||||
});
|
||||
@@ -129,8 +129,11 @@ describe('Start Process Component', () => {
|
||||
|
||||
describe(' Once logged with user with app', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
loginPage.loginToProcessServicesUsingUserModel(secondProcUserModel);
|
||||
beforeAll(async () => {
|
||||
await loginPage.loginToProcessServicesUsingUserModel(secondProcUserModel);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
processServicesPage.checkApsContainer();
|
||||
});
|
||||
@@ -375,8 +378,8 @@ describe('Start Process Component', () => {
|
||||
processDetailsPage.checkActiveTaskTitleIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C260457] Should display process in Completed when cancelled', () => {
|
||||
loginPage.loginToProcessServicesUsingUserModel(secondProcUserModel);
|
||||
it('[C260457] Should display process in Completed when cancelled', async () => {
|
||||
await loginPage.loginToProcessServicesUsingUserModel(secondProcUserModel);
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
processServicesPage.checkApsContainer();
|
||||
processServicesPage.goToApp(app.title);
|
||||
|
||||
@@ -78,7 +78,7 @@ describe('Start Task - Custom App', () => {
|
||||
|
||||
appModel = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
@@ -170,7 +170,6 @@ describe('Start Task - Custom App', () => {
|
||||
|
||||
taskPage
|
||||
.createNewTask()
|
||||
.checkStartButtonIsDisabled()
|
||||
.addName(tasks[3])
|
||||
.checkStartButtonIsEnabled()
|
||||
.clickCancelButton();
|
||||
|
||||
@@ -83,92 +83,80 @@ describe('Start Task - Task App', () => {
|
||||
|
||||
await this.alfrescoJsApi.activiti.appsApi.importAppDefinition(file);
|
||||
|
||||
await this.alfrescoJsApi.activiti.taskApi.createNewTask({name: showHeaderTask});
|
||||
await this.alfrescoJsApi.activiti.taskApi.createNewTask({ name: showHeaderTask });
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C260383] Should be possible to modify a task', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.createNewTask().addName(tasks[0])
|
||||
.addForm(app.formName).clickStartButton()
|
||||
.then(() => {
|
||||
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))
|
||||
.toEqual(assigneeUserModel.email);
|
||||
taskPage.taskDetails().selectActivityTab().addComment(firstComment)
|
||||
.checkCommentIsDisplayed(firstComment);
|
||||
taskPage.clickOnAddChecklistButton().addName(firstChecklist).clickCreateChecklistButton();
|
||||
taskPage.checkChecklistIsDisplayed(firstChecklist);
|
||||
taskPage.taskDetails().selectDetailsTab();
|
||||
});
|
||||
.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))
|
||||
.toEqual(assigneeUserModel.email);
|
||||
taskPage.taskDetails().selectActivityTab().addComment(firstComment)
|
||||
.checkCommentIsDisplayed(firstComment);
|
||||
taskPage.clickOnAddChecklistButton().addName(firstChecklist).clickCreateChecklistButton();
|
||||
taskPage.checkChecklistIsDisplayed(firstChecklist);
|
||||
taskPage.taskDetails().selectDetailsTab();
|
||||
});
|
||||
|
||||
it('[C260422] Should be possible to cancel a task', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.createNewTask().checkStartButtonIsDisabled().addName(tasks[3])
|
||||
.checkStartButtonIsEnabled().clickCancelButton()
|
||||
.then(() => {
|
||||
taskPage.tasksListPage().checkContentIsNotDisplayed(tasks[3]);
|
||||
expect(taskPage.filtersPage().getActiveFilter()).toEqual(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
});
|
||||
taskPage.createNewTask().addName(tasks[3])
|
||||
.checkStartButtonIsEnabled().clickCancelButton();
|
||||
taskPage.tasksListPage().checkContentIsNotDisplayed(tasks[3]);
|
||||
expect(taskPage.filtersPage().getActiveFilter()).toEqual(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
});
|
||||
|
||||
it('[C260423] Should be possible to save filled form', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.createNewTask()
|
||||
.addForm(app.formName).addName(tasks[4]).clickStartButton()
|
||||
.then(() => {
|
||||
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);
|
||||
});
|
||||
.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('[C260425] Should be possible to assign a user', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.createNewTask().addName(tasks[5])
|
||||
.addAssignee(assigneeUserModel.firstName).clickStartButton()
|
||||
.then(() => {
|
||||
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);
|
||||
});
|
||||
taskPage.createNewTask()
|
||||
.addName(tasks[5])
|
||||
.addAssignee(assigneeUserModel.firstName)
|
||||
.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);
|
||||
});
|
||||
|
||||
it('Attach a file', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.createNewTask().addName(tasks[6]).clickStartButton()
|
||||
.then(() => {
|
||||
attachmentListPage.clickAttachFileButton(jpgFile.location);
|
||||
attachmentListPage.checkFileIsAttached(jpgFile.name);
|
||||
});
|
||||
taskPage.createNewTask().addName(tasks[6]).clickStartButton();
|
||||
attachmentListPage.clickAttachFileButton(jpgFile.location);
|
||||
attachmentListPage.checkFileIsAttached(jpgFile.name);
|
||||
});
|
||||
|
||||
it('[C260420] Should Information box be hidden when showHeaderContent property is set on false', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.tasksListPage().checkContentIsDisplayed(showHeaderTask);
|
||||
|
||||
processServiceTabBarPage.clickSettingsButton();
|
||||
@@ -185,15 +173,15 @@ describe('Start Task - Task App', () => {
|
||||
});
|
||||
|
||||
xit('[C260424] Should be able to see Spinner loading on task list when clicking on Tasks', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp();
|
||||
taskPage.tasksListPage().getDataTable().checkSpinnerIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C291780] Should be displayed an error message if task name exceed 255 characters', () => {
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp().clickTasksButton();
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
const startDialog = taskPage.createNewTask().addName(taskName255Characters).checkStartButtonIsEnabled();
|
||||
startDialog.addName(taskNameBiggerThen255Characters).blur(startDialog.name).checkValidationErrorIsDisplayed(lengthValidationError).checkStartButtonIsDisabled();
|
||||
startDialog.addName(taskNameBiggerThen255Characters)
|
||||
.blur(startDialog.name)
|
||||
.checkValidationErrorIsDisplayed(lengthValidationError)
|
||||
.checkStartButtonIsDisabled();
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasksPage';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/processServicesPage';
|
||||
|
||||
@@ -32,7 +32,6 @@ import { AppsActions } from '../actions/APS/apps.actions';
|
||||
|
||||
import path = require('path');
|
||||
import { Util } from '../util/util';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Task Audit', () => {
|
||||
|
||||
@@ -68,13 +67,13 @@ describe('Task Audit', () => {
|
||||
|
||||
appModel = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await browser.get(TestConfig.adf.url + '/activiti');
|
||||
await BrowserActions.getUrl(TestConfig.adf.url + '/activiti');
|
||||
done();
|
||||
});
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ describe('Task Details - Form', () => {
|
||||
|
||||
otherTask = await this.alfrescoJsApi.activiti.taskApi.getTask(otherEmptyTask.id);
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -61,7 +61,7 @@ describe('Task Details - No form', () => {
|
||||
|
||||
await apps.startProcess(this.alfrescoJsApi, importedApp);
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@ import resources = require('../util/resources');
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import dateFormat = require('dateformat');
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasksPage';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
@@ -66,13 +66,13 @@ describe('Task Details component', () => {
|
||||
|
||||
appModel = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await browser.get(TestConfig.adf.url + '/activiti');
|
||||
await BrowserActions.getUrl(TestConfig.adf.url + '/activiti');
|
||||
done();
|
||||
});
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ describe('Task', () => {
|
||||
|
||||
appId = appModel.id;
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ describe('Task List Pagination', () => {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
}
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
@@ -198,8 +198,8 @@ describe('Task List Pagination', () => {
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
it('Pagination in an empty task list', () => {
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModelEmpty);
|
||||
it('Pagination in an empty task list', async () => {
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModelEmpty);
|
||||
|
||||
navigationBarPage.navigateToProcessServicesPage().goToTaskApp();
|
||||
paginationPage.checkPaginationIsNotDisplayed();
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
|
||||
@@ -60,13 +59,13 @@ describe('Amount Widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -57,13 +56,13 @@ describe('Attach Folder widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -58,13 +57,13 @@ describe('Checkbox Widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -58,13 +57,13 @@ describe('Date and time widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -58,13 +57,13 @@ describe('Date widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -58,13 +57,13 @@ describe('Document Template widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -58,13 +57,13 @@ describe('Dropdown widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -60,13 +59,13 @@ describe('Dynamic Table widget ', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
@@ -121,13 +120,13 @@ describe('Dynamic Table widget ', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -58,13 +57,13 @@ describe('Header widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -58,13 +57,13 @@ describe('Hyperlink widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -58,13 +57,13 @@ describe('Multi-line Widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
|
||||
@@ -59,13 +58,13 @@ describe('Number widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -58,13 +57,13 @@ describe('People widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -59,14 +58,14 @@ describe('Radio Buttons Widget', () => {
|
||||
});
|
||||
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasksPage';
|
||||
import { Widget } from '../../pages/adf/process-services/widgets/widget';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
@@ -58,13 +57,13 @@ describe('Text widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const urlToNavigateTo = `${TestConfig.adf.url}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
browser.get(urlToNavigateTo);
|
||||
BrowserActions.getUrl(urlToNavigateTo);
|
||||
taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user