mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
@@ -15,7 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, LoginPage, StringUtil, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
TaskUtil,
|
||||
UserModel,
|
||||
UsersActions
|
||||
} from '@alfresco/adf-testing';
|
||||
import { browser, by } from 'protractor';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
@@ -23,9 +31,6 @@ import { AttachmentListPage } from './../pages/attachment-list.page';
|
||||
import { ChecklistDialog } from './../pages/dialog/create-checklist-dialog.page';
|
||||
import { ProcessServiceTabBarPage } from './../pages/process-service-tab-bar.page';
|
||||
import { TasksPage } from './../pages/tasks.page';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { TaskRepresentation } from '@alfresco/js-api';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
|
||||
describe('Start Task - Task App', () => {
|
||||
@@ -39,6 +44,8 @@ describe('Start Task - Task App', () => {
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const taskUtil = new TaskUtil(apiService);
|
||||
const applicationsUtil = new ApplicationsUtil(apiService);
|
||||
|
||||
let processUserModel, assigneeUserModel;
|
||||
const formTextField = app.form_fields.form_fieldId;
|
||||
@@ -62,14 +69,11 @@ describe('Start Task - Task App', () => {
|
||||
|
||||
processUserModel = await usersActions.createUser(new UserModel({ tenantId: assigneeUserModel.tenantId }));
|
||||
|
||||
const pathFile = path.join(browser.params.testConfig.main.rootPath + app.file_location);
|
||||
const file = fs.createReadStream(pathFile);
|
||||
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
|
||||
await apiService.getInstance().activiti.appsApi.importAppDefinition(file);
|
||||
await applicationsUtil.importApplication(app.file_path);
|
||||
|
||||
await apiService.getInstance().activiti.taskApi.createNewTask(new TaskRepresentation({ name: showHeaderTask }));
|
||||
await taskUtil.createStandaloneTask(showHeaderTask);
|
||||
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
|
Reference in New Issue
Block a user