mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-3040]Refactor/and move to testing package POs and API calls (#5607)
* Refactor/and move to testing package POs and API calls * Remove method * Add task list PO * Use adf testing package APS1 calls * Fix some tests * Update new test * Fix some process-services tests * no message * Fix 2 tests * Create StartProcess page in ADF testing package; refactor process-services tests * no message
This commit is contained in:
@@ -49,25 +49,6 @@ export class AppsActions {
|
||||
return appDefinitionId;
|
||||
}
|
||||
|
||||
async importPublishDeployApp(alfrescoJsApi, appFileLocation, option = {}) {
|
||||
const appCreated = await this.importApp(alfrescoJsApi, appFileLocation, option);
|
||||
|
||||
const publishApp = await alfrescoJsApi.activiti.appsApi.publishAppDefinition(appCreated.id, new AppPublish());
|
||||
|
||||
await alfrescoJsApi.activiti.appsApi.deployAppDefinitions({ appDefinitions: [{ id: publishApp.appDefinition.id }] });
|
||||
|
||||
return appCreated;
|
||||
}
|
||||
|
||||
async importApp(alfrescoJsApi, appFileLocation, options = {}) {
|
||||
browser.setFileDetector(new remote.FileDetector());
|
||||
|
||||
const pathFile = path.join(browser.params.testConfig.main.rootPath + appFileLocation);
|
||||
const file = fs.createReadStream(pathFile);
|
||||
|
||||
return alfrescoJsApi.activiti.appsDefinitionApi.importAppDefinition(file, options);
|
||||
}
|
||||
|
||||
async publishDeployApp(alfrescoJsApi, appId) {
|
||||
browser.setFileDetector(new remote.FileDetector());
|
||||
|
||||
@@ -92,32 +73,4 @@ export class AppsActions {
|
||||
|
||||
return appCreated;
|
||||
}
|
||||
|
||||
async startProcess(alfrescoJsApi, app, processName?: string) {
|
||||
browser.setFileDetector(new remote.FileDetector());
|
||||
|
||||
const appDefinitionsList = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
|
||||
const appDefinition = appDefinitionsList.data.filter((currentApp) => {
|
||||
return currentApp.name === app.name;
|
||||
});
|
||||
|
||||
const processDefinitionList = await alfrescoJsApi.activiti.processApi.getProcessDefinitions({ deploymentId: appDefinition.deploymentId });
|
||||
|
||||
const chosenProcess = processDefinitionList.data.find( (processDefinition) => {
|
||||
return processDefinition.name === processName;
|
||||
});
|
||||
|
||||
const processDefinitionIdToStart = chosenProcess ? chosenProcess.id : processDefinitionList.data[0].id;
|
||||
|
||||
const startProcessOptions: any = { processDefinitionId: processDefinitionIdToStart };
|
||||
|
||||
if (typeof processName !== 'undefined') {
|
||||
startProcessOptions.name = processName;
|
||||
}
|
||||
|
||||
return alfrescoJsApi.activiti.processApi.startNewProcessInstance(startProcessOptions);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -50,5 +50,4 @@ export class TaskFiltersDemoPage {
|
||||
async checkActiveFilterActive(): Promise<string> {
|
||||
return BrowserActions.getText(this.activeFilter);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -39,7 +39,6 @@ export class ProcessDetailsPage {
|
||||
auditLogEmptyListMessage: ElementFinder = element(by.css('.app-empty-list-header'));
|
||||
cancelProcessButton: ElementFinder = element(by.css('div[data-automation-id="header-status"] > button'));
|
||||
activeTask: ElementFinder = element(by.css('div[data-automation-id="active-tasks"]'));
|
||||
startForm: ElementFinder = element(by.css('div[data-automation-id="start-form"]'));
|
||||
completedTask: ElementFinder = element(by.css('div[data-automation-id="completed-tasks"]'));
|
||||
taskTitle: ElementFinder = element(by.css('h2[class="adf-activiti-task-details__header"]'));
|
||||
|
||||
@@ -137,10 +136,6 @@ export class ProcessDetailsPage {
|
||||
await BrowserActions.click(this.activeTask);
|
||||
}
|
||||
|
||||
async clickOnStartForm(): Promise<void> {
|
||||
await BrowserActions.click(this.startForm);
|
||||
}
|
||||
|
||||
async clickOnCompletedTask(): Promise<void> {
|
||||
await BrowserActions.click(this.completedTask);
|
||||
}
|
||||
|
@@ -15,9 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage, StartProcessPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder, Locator } from 'protractor';
|
||||
import { StartProcessPage } from './start-process.page';
|
||||
|
||||
export class ProcessFiltersPage {
|
||||
|
||||
|
@@ -1,145 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, Key, protractor, browser, ElementFinder } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions, FormFields, DropdownPage } from '@alfresco/adf-testing';
|
||||
|
||||
export class StartProcessPage {
|
||||
|
||||
defaultProcessName: ElementFinder = element(by.css('input[id="processName"]'));
|
||||
processNameInput: ElementFinder = element(by.id('processName'));
|
||||
selectProcessDropdownArrow: ElementFinder = element(by.css('button[id="adf-select-process-dropdown"]'));
|
||||
cancelProcessButton: ElementFinder = element(by.id('cancel_process'));
|
||||
formStartProcessButton: ElementFinder = element(by.css('button[data-automation-id="adf-form-start process"]'));
|
||||
startProcessButton: ElementFinder = element(by.css('button[data-automation-id="btn-start"]'));
|
||||
noProcess: ElementFinder = element(by.id('no-process-message'));
|
||||
processDefinition: ElementFinder = element(by.css('input[id="processDefinitionName"]'));
|
||||
processDefinitionOptionsPanel: ElementFinder = element(by.css('div[class*="processDefinitionOptions"]'));
|
||||
|
||||
dropdownPage = new DropdownPage();
|
||||
|
||||
async checkNoProcessMessage(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.noProcess);
|
||||
}
|
||||
|
||||
async pressDownArrowAndEnter(): Promise<void> {
|
||||
await this.processDefinition.sendKeys(protractor.Key.ARROW_DOWN);
|
||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
}
|
||||
|
||||
async checkNoProcessDefinitionOptionIsDisplayed() {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.processDefinitionOptionsPanel);
|
||||
}
|
||||
|
||||
async getDefaultName(): Promise<string> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.defaultProcessName);
|
||||
return this.defaultProcessName.getAttribute('value');
|
||||
}
|
||||
|
||||
async deleteDefaultName() {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.processNameInput);
|
||||
await BrowserActions.clearWithBackSpace(this.processNameInput);
|
||||
}
|
||||
|
||||
async enterProcessName(name): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.processNameInput, name);
|
||||
}
|
||||
|
||||
async selectFromProcessDropdown(name): Promise<void> {
|
||||
await this.clickProcessDropdownArrow();
|
||||
await this.selectOption(name);
|
||||
}
|
||||
|
||||
async clickProcessDropdownArrow(): Promise<void> {
|
||||
await BrowserActions.click(this.selectProcessDropdownArrow);
|
||||
}
|
||||
|
||||
async checkOptionIsDisplayed(name): Promise<void> {
|
||||
await this.dropdownPage.checkOptionIsDisplayed(name);
|
||||
}
|
||||
|
||||
async checkOptionIsNotDisplayed(name): Promise<void> {
|
||||
await this.dropdownPage.checkOptionIsNotDisplayed(name);
|
||||
}
|
||||
|
||||
async selectOption(name): Promise<void> {
|
||||
await this.dropdownPage.selectOption(name);
|
||||
}
|
||||
|
||||
async typeProcessDefinition(name): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.processDefinition, name);
|
||||
}
|
||||
|
||||
async getProcessDefinitionValue(): Promise<string> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.processDefinition);
|
||||
return this.processDefinition.getAttribute('value');
|
||||
}
|
||||
|
||||
async clickCancelProcessButton(): Promise<void> {
|
||||
await BrowserActions.click(this.cancelProcessButton);
|
||||
}
|
||||
|
||||
async clickFormStartProcessButton(): Promise<void> {
|
||||
await BrowserActions.click(this.formStartProcessButton);
|
||||
}
|
||||
|
||||
async checkStartFormProcessButtonIsEnabled() {
|
||||
await expect(await this.formStartProcessButton.isEnabled()).toBe(true);
|
||||
}
|
||||
|
||||
async checkStartProcessButtonIsEnabled() {
|
||||
await expect(await this.startProcessButton.isEnabled()).toBe(true);
|
||||
}
|
||||
|
||||
async checkStartProcessButtonIsDisabled() {
|
||||
await expect(await this.startProcessButton.isEnabled()).toBe(false);
|
||||
}
|
||||
|
||||
async clickStartProcessButton(): Promise<void> {
|
||||
await BrowserActions.click(this.startProcessButton);
|
||||
}
|
||||
|
||||
async checkSelectProcessPlaceholderIsDisplayed(): Promise<string> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.processDefinition);
|
||||
const processPlaceholder = await this.processDefinition.getAttribute('value');
|
||||
return processPlaceholder;
|
||||
}
|
||||
|
||||
async checkValidationErrorIsDisplayed(error, elementRef = 'mat-error'): Promise<void> {
|
||||
const errorElement: ElementFinder = element(by.cssContainingText(elementRef, error));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(errorElement);
|
||||
}
|
||||
|
||||
async blur(locator): Promise<void> {
|
||||
await BrowserActions.click(locator);
|
||||
await locator.sendKeys(Key.TAB);
|
||||
}
|
||||
|
||||
async clearField(locator): Promise<void> {
|
||||
await BrowserActions.clearWithBackSpace(locator);
|
||||
}
|
||||
|
||||
formFields(): FormFields {
|
||||
return new FormFields();
|
||||
}
|
||||
|
||||
async startProcess({name, processName }) {
|
||||
await this.enterProcessName(name);
|
||||
await this.selectFromProcessDropdown(processName);
|
||||
await this.clickStartProcessButton();
|
||||
}
|
||||
}
|
@@ -15,12 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginSSOPage, AppListCloudPage, IdentityService, GroupIdentityService, ApiService, StringUtil, StartTasksCloudPage, TaskFormCloudComponent, EditProcessFilterCloudComponentPage } from '@alfresco/adf-testing';
|
||||
import { LoginSSOPage, AppListCloudPage, IdentityService, GroupIdentityService, ApiService, StringUtil, StartTasksCloudPage, TaskFormCloudComponent, EditProcessFilterCloudComponentPage, StartProcessPage } from '@alfresco/adf-testing';
|
||||
import { browser, by } from 'protractor';
|
||||
|
||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||
import { TasksCloudDemoPage } from '../../pages/adf/demo-shell/process-services/tasks-cloud-demo.page';
|
||||
import { StartProcessPage } from '../../pages/adf/process-services/start-process.page';
|
||||
import { ProcessCloudDemoPage } from '../../pages/adf/demo-shell/process-services/process-cloud-demo.page';
|
||||
import { ProcessDetailsCloudDemoPage } from '../../pages/adf/demo-shell/process-services-cloud/process-details-cloud-demo.page';
|
||||
|
||||
@@ -90,7 +89,7 @@ describe('Task cloud visibility', async () => {
|
||||
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Number2');
|
||||
});
|
||||
|
||||
it('[C315169] Should be able to start a process with visibility condition for number widgets', async () => {
|
||||
it('[C315169] Should be able to start a process with visibility condition for number widgets ', async () => {
|
||||
|
||||
await processCloudDemoPage.openNewProcessForm();
|
||||
await startProcessPage.clearField(startProcessPage.processNameInput);
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
@@ -46,7 +46,7 @@ describe('Modify applications', () => {
|
||||
hostBpm: browser.params.testConfig.adf_aps.host
|
||||
});
|
||||
|
||||
applicationService = new ApplicationService(this.alfrescoJsApi);
|
||||
applicationService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, Widget, ViewerPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, Widget, ViewerPage, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import { FileModel } from '../models/ACS/file.model';
|
||||
@@ -45,7 +45,7 @@ describe('Start Task - Task App', () => {
|
||||
hostBpm: browser.params.testConfig.adf_aps.host
|
||||
});
|
||||
|
||||
const applicationService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
ApplicationService,
|
||||
ApplicationsUtil,
|
||||
ContentNodeSelectorDialogPage,
|
||||
IntegrationService,
|
||||
LoginPage,
|
||||
@@ -37,7 +37,7 @@ describe('Attach Folder', () => {
|
||||
hostBpm: browser.params.testConfig.adf_aps.host
|
||||
});
|
||||
const integrationService = new IntegrationService(this.alfrescoJsApi);
|
||||
const applicationService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
const users = new UsersActions();
|
||||
const loginPage = new LoginPage();
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { FormFields, LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { FormFields, LoginPage, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser, by } from 'protractor';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
@@ -50,7 +50,7 @@ describe('Attach Form Component', () => {
|
||||
provider: 'BPM',
|
||||
hostBpm: browser.params.testConfig.adf_aps.host
|
||||
});
|
||||
const applicationService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
const users = new UsersActions();
|
||||
|
||||
|
@@ -16,13 +16,12 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||
import { CommentsPage } from '../pages/adf/comments.page';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
|
||||
describe('Comment component for Processes', () => {
|
||||
|
||||
@@ -33,6 +32,7 @@ describe('Comment component for Processes', () => {
|
||||
|
||||
const app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
let user, tenantId, appId, processInstanceId, addedComment;
|
||||
const processName = 'Comment APS';
|
||||
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -40,9 +40,8 @@ describe('Comment component for Processes', () => {
|
||||
hostBpm: browser.params.testConfig.adf_aps.host
|
||||
});
|
||||
|
||||
const apps = new AppsActions();
|
||||
const users = new UsersActions();
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
@@ -55,7 +54,7 @@ describe('Comment component for Processes', () => {
|
||||
const importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
appId = importedApp.id;
|
||||
|
||||
const processWithComment = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Comment APS');
|
||||
const processWithComment = await new ProcessUtil(this.alfrescoJsApi).startProcessOfApp('Task App', processName);
|
||||
processInstanceId = processWithComment.id;
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
@@ -73,7 +72,7 @@ describe('Comment component for Processes', () => {
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||
|
||||
await processFiltersPage.clickRunningFilterButton();
|
||||
await processFiltersPage.selectFromProcessList('Comment APS');
|
||||
await processFiltersPage.selectFromProcessList(processName);
|
||||
|
||||
addedComment = await this.alfrescoJsApi.activiti.commentsApi.getProcessInstanceComments(processInstanceId, { 'latestFirst': true });
|
||||
|
||||
@@ -91,7 +90,7 @@ describe('Comment component for Processes', () => {
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||
|
||||
await processFiltersPage.clickRunningFilterButton();
|
||||
await processFiltersPage.selectFromProcessList('Comment APS');
|
||||
await processFiltersPage.selectFromProcessList(processName);
|
||||
|
||||
const taskQuery = await this.alfrescoJsApi.activiti.taskApi.listTasks({ processInstanceId: processInstanceId });
|
||||
|
||||
@@ -111,7 +110,7 @@ describe('Comment component for Processes', () => {
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||
|
||||
await processFiltersPage.clickRunningFilterButton();
|
||||
await processFiltersPage.selectFromProcessList('Comment APS');
|
||||
await processFiltersPage.selectFromProcessList(processName);
|
||||
|
||||
const addedTaskComment = await this.alfrescoJsApi.activiti.commentsApi.getProcessInstanceComments(processInstanceId, { 'latestFirst': true });
|
||||
|
||||
|
@@ -17,14 +17,13 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
import { CommentsPage } from '../pages/adf/comments.page';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
|
||||
describe('Comment component for Processes', () => {
|
||||
|
||||
@@ -48,7 +47,6 @@ describe('Comment component for Processes', () => {
|
||||
hostBpm: browser.params.testConfig.adf_aps.host
|
||||
});
|
||||
|
||||
const apps = new AppsActions();
|
||||
const users = new UsersActions();
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
@@ -61,7 +59,7 @@ describe('Comment component for Processes', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
|
||||
const importedApp = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
const importedApp = await new ApplicationsUtil(this.alfrescoJsApi).importPublishDeployApp(app.file_path);
|
||||
appId = importedApp.id;
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
@@ -17,13 +17,12 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import { LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||
import { FiltersPage } from '../pages/adf/process-services/filters.page';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
|
||||
describe('Sorting for process filters', () => {
|
||||
|
||||
@@ -32,8 +31,6 @@ describe('Sorting for process filters', () => {
|
||||
const processFiltersPage = new ProcessFiltersPage();
|
||||
const filtersPage = new FiltersPage();
|
||||
|
||||
const apps = new AppsActions();
|
||||
|
||||
const app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
let tenantId, appId, user, processesQuery;
|
||||
|
||||
@@ -60,7 +57,7 @@ describe('Sorting for process filters', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||
tenantId = user.tenantId;
|
||||
@@ -86,9 +83,10 @@ describe('Sorting for process filters', () => {
|
||||
'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');
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||
const secondProc = await processUtil.startProcessOfApp('Task App');
|
||||
const thirdProc = await processUtil.startProcessOfApp('Task App');
|
||||
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||
|
||||
@@ -97,9 +95,9 @@ describe('Sorting for process filters', () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'running', 'sort': 'created-asc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual('Process 1');
|
||||
await expect(processesQuery.data[1].name).toEqual('Process 2');
|
||||
await expect(processesQuery.data[2].name).toEqual('Process 3');
|
||||
await expect(processesQuery.data[0].name).toEqual(firstProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||
});
|
||||
|
||||
it('[C260477] Should be able to create a filter on APS for completed processes - Oldest first and check on ADF', async () => {
|
||||
@@ -108,9 +106,10 @@ describe('Sorting for process filters', () => {
|
||||
'filter': { 'sort': 'created-asc', 'name': '', 'state': 'completed' }
|
||||
});
|
||||
|
||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
const secondProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
||||
const thirdProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||
const secondProc = await processUtil.startProcessOfApp('Task App');
|
||||
const thirdProc = await processUtil.startProcessOfApp('Task App');
|
||||
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(firstProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(secondProc.id);
|
||||
@@ -125,9 +124,9 @@ describe('Sorting for process filters', () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'created-asc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual('Process 1');
|
||||
await expect(processesQuery.data[1].name).toEqual('Process 2');
|
||||
await expect(processesQuery.data[2].name).toEqual('Process 3');
|
||||
await expect(processesQuery.data[0].name).toEqual(firstProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||
});
|
||||
|
||||
it('[C260478] Should be able to create a filter on APS for all processes - Oldest first and check on ADF', async () => {
|
||||
@@ -136,17 +135,18 @@ describe('Sorting for process filters', () => {
|
||||
'filter': { 'sort': 'created-asc', 'name': '', 'state': 'all' }
|
||||
});
|
||||
|
||||
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');
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||
const secondProc = await processUtil.startProcessOfApp('Task App');
|
||||
const thirdProc = await processUtil.startProcessOfApp('Task App');
|
||||
|
||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 4');
|
||||
const secondProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 5');
|
||||
const thirdProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 6');
|
||||
const deleteFirstProc = await processUtil.startProcessOfApp('Task App');
|
||||
const deleteSecondProc = await processUtil.startProcessOfApp('Task App');
|
||||
const deleteThirdProc = await processUtil.startProcessOfApp('Task App');
|
||||
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(firstProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(secondProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(thirdProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(deleteFirstProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(deleteSecondProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(deleteThirdProc.id);
|
||||
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||
|
||||
@@ -157,12 +157,12 @@ describe('Sorting for process filters', () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'all', 'sort': 'created-asc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual('Process 1');
|
||||
await expect(processesQuery.data[1].name).toEqual('Process 2');
|
||||
await expect(processesQuery.data[2].name).toEqual('Process 3');
|
||||
await expect(processesQuery.data[3].name).toEqual('Process 4');
|
||||
await expect(processesQuery.data[4].name).toEqual('Process 5');
|
||||
await expect(processesQuery.data[5].name).toEqual('Process 6');
|
||||
await expect(processesQuery.data[0].name).toEqual(firstProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||
await expect(processesQuery.data[3].name).toEqual(deleteFirstProc.name);
|
||||
await expect(processesQuery.data[4].name).toEqual(deleteSecondProc.name);
|
||||
await expect(processesQuery.data[5].name).toEqual(deleteThirdProc.name);
|
||||
});
|
||||
|
||||
it('[C260479] Should be able to create a filter on APS for running processes - Newest first and check on ADF', async () => {
|
||||
@@ -171,9 +171,10 @@ describe('Sorting for process filters', () => {
|
||||
'filter': { 'sort': 'created-desc', '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');
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||
const secondProc = await processUtil.startProcessOfApp('Task App');
|
||||
const thirdProc = await processUtil.startProcessOfApp('Task App');
|
||||
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||
|
||||
@@ -184,9 +185,9 @@ describe('Sorting for process filters', () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'running', 'sort': 'created-desc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual('Process 3');
|
||||
await expect(processesQuery.data[1].name).toEqual('Process 2');
|
||||
await expect(processesQuery.data[2].name).toEqual('Process 1');
|
||||
await expect(processesQuery.data[0].name).toEqual(thirdProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(firstProc.name);
|
||||
});
|
||||
|
||||
it('[C260480] Should be able to create a filter on APS for completed processes - Newest first and check on ADF', async () => {
|
||||
@@ -195,9 +196,10 @@ describe('Sorting for process filters', () => {
|
||||
'filter': { 'sort': 'created-desc', 'name': '', 'state': 'completed' }
|
||||
});
|
||||
|
||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
const secondProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
||||
const thirdProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||
const secondProc = await processUtil.startProcessOfApp('Task App');
|
||||
const thirdProc = await processUtil.startProcessOfApp('Task App');
|
||||
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(firstProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(secondProc.id);
|
||||
@@ -211,9 +213,9 @@ describe('Sorting for process filters', () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'created-desc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual('Process 3');
|
||||
await expect(processesQuery.data[1].name).toEqual('Process 2');
|
||||
await expect(processesQuery.data[2].name).toEqual('Process 1');
|
||||
await expect(processesQuery.data[0].name).toEqual(thirdProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(firstProc.name);
|
||||
});
|
||||
|
||||
it('[C260481] Should be able to create a filter on APS for all processes - Newest first and check on ADF', async () => {
|
||||
@@ -222,17 +224,18 @@ describe('Sorting for process filters', () => {
|
||||
'filter': { 'sort': 'created-desc', 'name': '', 'state': 'all' }
|
||||
});
|
||||
|
||||
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');
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||
const secondProc = await processUtil.startProcessOfApp('Task App');
|
||||
const thirdProc = await processUtil.startProcessOfApp('Task App');
|
||||
|
||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 4');
|
||||
const secondProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 5');
|
||||
const thirdProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 6');
|
||||
const deleteFirstProc = await processUtil.startProcessOfApp('Task App');
|
||||
const deleteSecondProc = await processUtil.startProcessOfApp('Task App');
|
||||
const deleteThirdProc = await processUtil.startProcessOfApp('Task App');
|
||||
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(firstProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(secondProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(thirdProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(deleteFirstProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(deleteSecondProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(deleteThirdProc.id);
|
||||
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||
|
||||
@@ -243,12 +246,12 @@ describe('Sorting for process filters', () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'all', 'sort': 'created-desc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual('Process 6');
|
||||
await expect(processesQuery.data[1].name).toEqual('Process 5');
|
||||
await expect(processesQuery.data[2].name).toEqual('Process 4');
|
||||
await expect(processesQuery.data[3].name).toEqual('Process 3');
|
||||
await expect(processesQuery.data[4].name).toEqual('Process 2');
|
||||
await expect(processesQuery.data[5].name).toEqual('Process 1');
|
||||
await expect(processesQuery.data[0].name).toEqual(deleteThirdProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(deleteSecondProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(deleteFirstProc.name);
|
||||
await expect(processesQuery.data[3].name).toEqual(thirdProc.name);
|
||||
await expect(processesQuery.data[4].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[5].name).toEqual(firstProc.name);
|
||||
});
|
||||
|
||||
it('[C272815] Should be able to create a filter on APS for completed processes - Completed most recently and check on ADF', async () => {
|
||||
@@ -257,9 +260,10 @@ describe('Sorting for process filters', () => {
|
||||
'filter': { 'sort': 'ended-asc', 'name': '', 'state': 'completed' }
|
||||
});
|
||||
|
||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
const secondProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
||||
const thirdProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||
const secondProc = await processUtil.startProcessOfApp('Task App');
|
||||
const thirdProc = await processUtil.startProcessOfApp('Task App');
|
||||
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(secondProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(firstProc.id);
|
||||
@@ -274,9 +278,9 @@ describe('Sorting for process filters', () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'ended-asc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual('Process 2');
|
||||
await expect(processesQuery.data[1].name).toEqual('Process 1');
|
||||
await expect(processesQuery.data[2].name).toEqual('Process 3');
|
||||
await expect(processesQuery.data[0].name).toEqual(secondProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(firstProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||
});
|
||||
|
||||
it('[C272816] Should be able to create a filter on APS for completed processes - Completed least recently and check on ADF', async () => {
|
||||
@@ -285,9 +289,10 @@ describe('Sorting for process filters', () => {
|
||||
'filter': { 'sort': 'ended-desc', 'name': '', 'state': 'completed' }
|
||||
});
|
||||
|
||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
||||
const secondProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
||||
const thirdProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||
const secondProc = await processUtil.startProcessOfApp('Task App');
|
||||
const thirdProc = await processUtil.startProcessOfApp('Task App');
|
||||
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(secondProc.id);
|
||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(firstProc.id);
|
||||
@@ -302,8 +307,8 @@ describe('Sorting for process filters', () => {
|
||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'ended-desc'
|
||||
});
|
||||
await expect(processesQuery.data[0].name).toEqual('Process 3');
|
||||
await expect(processesQuery.data[1].name).toEqual('Process 1');
|
||||
await expect(processesQuery.data[2].name).toEqual('Process 2');
|
||||
await expect(processesQuery.data[0].name).toEqual(thirdProc.name);
|
||||
await expect(processesQuery.data[1].name).toEqual(firstProc.name);
|
||||
await expect(processesQuery.data[2].name).toEqual(secondProc.name);
|
||||
});
|
||||
});
|
||||
|
@@ -15,10 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DateUtil, LoginPage, PaginationPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { DateUtil, LoginPage, PaginationPage, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser } from 'protractor';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { AppsRuntimeActions } from '../actions/APS/apps-runtime.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { Tenant } from '../models/APS/tenant';
|
||||
@@ -68,7 +67,6 @@ describe('Start Task - Custom App', () => {
|
||||
};
|
||||
|
||||
beforeAll(async () => {
|
||||
const apps = new AppsActions();
|
||||
const appsRuntime = new AppsRuntimeActions();
|
||||
const users = new UsersActions();
|
||||
|
||||
@@ -79,7 +77,7 @@ describe('Start Task - Custom App', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
const newTenant = await this.alfrescoJsApi.activiti.adminTenantsApi.createTenant(new Tenant());
|
||||
|
||||
@@ -95,10 +93,11 @@ describe('Start Task - Custom App', () => {
|
||||
|
||||
secondAppRuntime = await appsRuntime.getRuntimeAppByName(this.alfrescoJsApi, secondApp.title);
|
||||
|
||||
processDefinitionId = await apps.startProcess(this.alfrescoJsApi, appModel);
|
||||
await apps.startProcess(this.alfrescoJsApi, appModel);
|
||||
await apps.startProcess(this.alfrescoJsApi, secondAppModel);
|
||||
await apps.startProcess(this.alfrescoJsApi, secondAppModel);
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
processDefinitionId = await processUtil.startProcessOfApp(appModel.name);
|
||||
await processUtil.startProcessOfApp(appModel.name);
|
||||
await processUtil.startProcessOfApp(secondAppModel.name);
|
||||
await processUtil.startProcessOfApp(secondAppModel.name);
|
||||
|
||||
for (let i = 1; i < paginationTasksName.length; i++) {
|
||||
await this.alfrescoJsApi.activiti.taskApi.createNewTask({ 'name': paginationTasksName[i] });
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, Widget, DatePickerCalendarPage, DateUtil, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, Widget, DatePickerCalendarPage, DateUtil, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
@@ -66,7 +66,7 @@ describe('Dynamic Table', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await alfrescoJsApi.login(user.email, user.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
const importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
appId = importedApp.id;
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
@@ -127,7 +127,7 @@ describe('Dynamic Table', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await alfrescoJsApi.login(user.email, user.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
|
||||
const importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
appId = importedApp.id;
|
||||
|
@@ -16,13 +16,12 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ApplicationsUtil, StartProcessPage } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||
import { ProcessListPage } from '../pages/adf/process-services/process-list.page';
|
||||
import { StartProcessPage } from '../pages/adf/process-services/start-process.page';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
|
||||
@@ -51,7 +50,7 @@ describe('Empty Process List Test', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||
|
||||
|
@@ -15,9 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, Widget, ApplicationsUtil, StartProcessPage } from '@alfresco/adf-testing';
|
||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||
import { StartProcessPage } from '../pages/adf/process-services/start-process.page';
|
||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||
import { TaskDetailsPage } from '../pages/adf/process-services/task-details.page';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
@@ -54,7 +53,7 @@ describe('Form widgets - People ', () => {
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
|
||||
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
|
@@ -15,14 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import FormDefinitionModel = require('../models/APS/FormDefinitionModel');
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { browser } from 'protractor';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
|
||||
const formInstance = new FormDefinitionModel();
|
||||
@@ -54,7 +53,7 @@ describe('Form widgets', () => {
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
|
||||
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
@@ -195,7 +194,6 @@ describe('Form widgets', () => {
|
||||
|
||||
describe('with fields involving other people', () => {
|
||||
|
||||
const appsActions = new AppsActions();
|
||||
const app = browser.params.resources.Files.FORM_ADF;
|
||||
let deployedApp, process;
|
||||
const appFields = app.form_fields;
|
||||
@@ -213,14 +211,15 @@ describe('Form widgets', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
const processUtil = new ProcessUtil(alfrescoJsApi);
|
||||
process = await processUtil.startProcessOfApp(appModel.name);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
||||
});
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, LocalStorageUtil, LoginPage, StringUtil, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { BrowserActions, BrowserVisibility, LocalStorageUtil, LoginPage, StringUtil, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import {
|
||||
AlfrescoApiCompatibility as AlfrescoApi,
|
||||
AppDefinitionRepresentation,
|
||||
@@ -77,7 +77,7 @@ describe('Info Drawer', () => {
|
||||
const processUserModel = await users.createApsUser(this.alfrescoJsApi, newTenant.id);
|
||||
processUserModelFullName = processUserModel.firstName + ' ' + processUserModel.lastName;
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
appCreated = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
@@ -15,10 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, PaginationPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, PaginationPage, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser } from 'protractor';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||
@@ -41,7 +40,6 @@ describe('Process List - Pagination when adding processes', () => {
|
||||
const nrOfProcesses = 25;
|
||||
let page, totalPages;
|
||||
let i;
|
||||
const apps = new AppsActions();
|
||||
let resultApp;
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -58,12 +56,13 @@ describe('Process List - Pagination when adding processes', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
resultApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
for (i = 0; i < (nrOfProcesses - 5); i++) {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
await processUtil.startProcessOfApp(resultApp.name);
|
||||
}
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
@@ -89,8 +88,9 @@ describe('Process List - Pagination when adding processes', () => {
|
||||
await paginationPage.checkNextPageButtonIsEnabled();
|
||||
await paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
for (i; i < nrOfProcesses; i++) {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
await processUtil.startProcessOfApp(resultApp.name);
|
||||
}
|
||||
|
||||
page++;
|
||||
|
@@ -15,10 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, PaginationPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, PaginationPage, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser } from 'protractor';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
@@ -38,8 +37,6 @@ describe('Items per page set to 15 and adding of tasks', () => {
|
||||
let i;
|
||||
let resultApp;
|
||||
|
||||
const apps = new AppsActions();
|
||||
|
||||
const itemsPerPage = {
|
||||
fifteen: '15',
|
||||
fifteenValue: 15
|
||||
@@ -59,12 +56,13 @@ describe('Items per page set to 15 and adding of tasks', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
resultApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
for (i = 0; i < (nrOfTasks - 5); i++) {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
await processUtil.startProcessOfApp(resultApp.name);
|
||||
}
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
@@ -81,8 +79,9 @@ describe('Items per page set to 15 and adding of tasks', () => {
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue + ' of ' + (nrOfTasks - 5));
|
||||
await expect(await taskPage.tasksListPage().getDataTable().numberOfRows()).toBe(itemsPerPage.fifteenValue);
|
||||
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
for (i; i < nrOfTasks; i++) {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
await processUtil.startProcessOfApp(resultApp.name);
|
||||
}
|
||||
|
||||
currentPage++;
|
||||
|
@@ -15,14 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, FileBrowserUtil, ViewerPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, FileBrowserUtil, ViewerPage, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||
import { AttachmentListPage } from '../pages/adf/process-services/attachment-list.page';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { FileModel } from '../models/ACS/file.model';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
@@ -51,7 +50,6 @@ describe('Attachment list action menu for processes', () => {
|
||||
};
|
||||
|
||||
beforeAll(async () => {
|
||||
const apps = new AppsActions();
|
||||
const users = new UsersActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -67,16 +65,17 @@ describe('Attachment list action menu for processes', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
const importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
appId = importedApp.id;
|
||||
|
||||
await apps.startProcess(this.alfrescoJsApi, importedApp, processName.completed);
|
||||
await apps.startProcess(this.alfrescoJsApi, importedApp, processName.active);
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', processName.taskApp);
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', processName.emptyList);
|
||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', processName.dragDrop);
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
await processUtil.startProcessOfApp(importedApp.name, processName.completed);
|
||||
await processUtil.startProcessOfApp(importedApp.name, processName.active);
|
||||
await processUtil.startProcessOfApp('Task App', processName.taskApp);
|
||||
await processUtil.startProcessOfApp('Task App', processName.emptyList);
|
||||
await processUtil.startProcessOfApp('Task App', processName.dragDrop);
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
});
|
||||
|
@@ -15,10 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, BrowserActions, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, ApplicationsUtil, StartProcessPage } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||
import { StartProcessPage } from '../pages/adf/process-services/start-process.page';
|
||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||
@@ -69,7 +68,7 @@ describe('Process Filters Test', () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
});
|
||||
|
@@ -19,8 +19,7 @@ import { browser } from 'protractor';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
||||
import { ProcessListPage } from '../pages/adf/process-services/process-list.page';
|
||||
@@ -41,7 +40,6 @@ describe('Process Instance Details', () => {
|
||||
const PROCESS_DATE_FORMAT = 'll';
|
||||
|
||||
beforeAll(async () => {
|
||||
const apps = new AppsActions();
|
||||
const users = new UsersActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -55,9 +53,9 @@ describe('Process Instance Details', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
const processModel = await apps.startProcess(this.alfrescoJsApi, appModel, 'process');
|
||||
const processModel = await new ProcessUtil(this.alfrescoJsApi).startProcessOfApp(appModel.name);
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, BrowserActions, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { ProcessListDemoPage } from '../pages/adf/demo-shell/process-services/process-list-demo.page';
|
||||
import { browser } from 'protractor';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
@@ -63,17 +63,18 @@ describe('Process List Test', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
appDateModel = await applicationsService.importPublishDeployApp(appWithDateField.file_path);
|
||||
|
||||
procWithDate = await apps.startProcess(this.alfrescoJsApi, appDateModel, processName.procWithDate);
|
||||
completedProcWithDate = await apps.startProcess(this.alfrescoJsApi, appDateModel, processName.completedProcWithDate);
|
||||
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||
procWithDate = await processUtil.startProcessOfApp(appDateModel.name, processName.procWithDate);
|
||||
completedProcWithDate = await processUtil.startProcessOfApp(appDateModel.name, processName.completedProcWithDate);
|
||||
|
||||
appUserWidgetModel = await applicationsService.importPublishDeployApp(appWithUserWidget.file_path);
|
||||
|
||||
await apps.startProcess(this.alfrescoJsApi, appUserWidgetModel, processName.procWithUserWidget);
|
||||
completedProcWithUserWidget = await apps.startProcess(this.alfrescoJsApi, appUserWidgetModel, processName.completedProcWithUserWidget);
|
||||
await processUtil.startProcessOfApp(appUserWidgetModel.name, processName.procWithUserWidget);
|
||||
completedProcWithUserWidget = await processUtil.startProcessOfApp(appUserWidgetModel.name, processName.completedProcWithUserWidget);
|
||||
|
||||
appWithDateFieldId = await apps.getAppDefinitionId(this.alfrescoJsApi, appDateModel.id);
|
||||
|
||||
|
@@ -15,10 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, PaginationPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, PaginationPage, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser } from 'protractor';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||
@@ -51,7 +50,6 @@ describe('Process List - Pagination', () => {
|
||||
const nrOfProcesses = 20;
|
||||
let page;
|
||||
let totalPages;
|
||||
const processNameBase = 'process';
|
||||
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
@@ -67,7 +65,7 @@ describe('Process List - Pagination', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
deployedTestApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
@@ -77,7 +75,6 @@ describe('Process List - Pagination', () => {
|
||||
describe('With processes Pagination', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
const apps = new AppsActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'BPM',
|
||||
@@ -87,7 +84,7 @@ describe('Process List - Pagination', () => {
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
for (let i = 0; i < nrOfProcesses; i++) {
|
||||
await apps.startProcess(this.alfrescoJsApi, deployedTestApp, processNameBase + (i < 10 ? `0${i}` : i));
|
||||
await new ProcessUtil(this.alfrescoJsApi).startProcessOfApp(deployedTestApp.name);
|
||||
}
|
||||
|
||||
});
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, PaginationPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, PaginationPage, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser } from 'protractor';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
@@ -59,7 +59,7 @@ describe('Task List Pagination - Sorting', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
|
@@ -19,10 +19,11 @@ import CONSTANTS = require('../util/constants');
|
||||
import {
|
||||
FileBrowserUtil,
|
||||
LoginPage, SelectAppsDialog,
|
||||
StartProcessDialog,
|
||||
ProcessInstanceTasksPage,
|
||||
StringUtil,
|
||||
Widget,
|
||||
ApplicationService
|
||||
ApplicationsUtil,
|
||||
StartProcessPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser } from 'protractor';
|
||||
@@ -35,7 +36,6 @@ import { ProcessDetailsPage } from '../pages/adf/process-services/process-detail
|
||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
||||
import { StartProcessPage } from '../pages/adf/process-services/start-process.page';
|
||||
import { ContentServicesPage } from '../pages/adf/content-services.page';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { AcsUserModel } from '../models/ACS/acs-user.model';
|
||||
@@ -50,7 +50,7 @@ describe('Start Process Component', () => {
|
||||
const processServiceTabBarPage = new ProcessServiceTabBarPage();
|
||||
const processDetailsPage = new ProcessDetailsPage();
|
||||
const attachmentListPage = new AttachmentListPage();
|
||||
const startProcessDialog = new StartProcessDialog();
|
||||
const processInstanceTasksPage = new ProcessInstanceTasksPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const selectAppsDialog = new SelectAppsDialog();
|
||||
const widget = new Widget();
|
||||
@@ -98,7 +98,7 @@ describe('Start Process Component', () => {
|
||||
|
||||
await this.alfrescoJsApiUserTwo.login(secondProcUserModel.email, secondProcUserModel.password);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApiUserTwo);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApiUserTwo);
|
||||
|
||||
const appCreated = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
@@ -469,12 +469,12 @@ describe('Start Process Component', () => {
|
||||
|
||||
await processFiltersPage.clickRunningFilterButton();
|
||||
await processFiltersPage.selectFromProcessList('DateFormProcess');
|
||||
await processDetailsPage.clickOnStartForm();
|
||||
await startProcessDialog.checkStartProcessDialogIsDisplayed();
|
||||
await expect(await startProcessDialog.getTitle()).toBe('Start Form');
|
||||
await processInstanceTasksPage.clickOnStartForm();
|
||||
await processInstanceTasksPage.checkStartProcessDialogIsDisplayed();
|
||||
await expect(await processInstanceTasksPage.getTitle()).toBe('Start Form');
|
||||
await expect(await (await widget.dateWidget()).getDateInput('testdate')).toBe('15-7-2019');
|
||||
await startProcessDialog.clickCloseButton();
|
||||
await startProcessDialog.checkStartProcessDialogIsNotDisplayed();
|
||||
await processInstanceTasksPage.clickCloseButton();
|
||||
await processInstanceTasksPage.checkStartProcessDialogIsNotDisplayed();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -516,7 +516,7 @@ describe('Start Process Component', () => {
|
||||
});
|
||||
await this.alfrescoJsBPMAdminUser.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsBPMAdminUser);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsBPMAdminUser);
|
||||
|
||||
const appCreated = await applicationsService.importPublishDeployApp(startProcessAttachFileApp.file_path);
|
||||
appId = appCreated.id;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser, by } from 'protractor';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
@@ -66,7 +66,7 @@ describe('Start Task - Custom App', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
|
||||
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
|
@@ -17,13 +17,12 @@
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ApplicationsUtil, StartProcessPage } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import { User } from '../models/APS/user';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
||||
import { StartProcessPage } from '../pages/adf/process-services/start-process.page';
|
||||
import { ProcessListDemoPage } from '../pages/adf/demo-shell/process-services/process-list-demo.page';
|
||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||
@@ -55,7 +54,7 @@ describe('Stencil', () => {
|
||||
user = await usersActions.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(user.email, user.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
await applicationsService.importPublishDeployApp(app.file_path);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
});
|
||||
|
@@ -15,16 +15,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ApplicationsUtil, ProcessUtil, StartProcessPage } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||
import { StartProcessPage } from '../pages/adf/process-services/start-process.page';
|
||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||
import { ProcessListPage } from '../pages/adf/process-services/process-list.page';
|
||||
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 { User } from '../models/APS/user';
|
||||
@@ -36,7 +34,6 @@ describe('Task Assignee', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const processServicesPage = new ProcessServicesPage();
|
||||
const taskPage = new TasksPage();
|
||||
const apps = new AppsActions();
|
||||
const users = new UsersActions();
|
||||
|
||||
const app = browser.params.resources.Files.TEST_ASSIGNEE;
|
||||
@@ -65,7 +62,7 @@ describe('Task Assignee', () => {
|
||||
} catch (e) {}
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
try {
|
||||
await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
||||
} catch (e) {
|
||||
@@ -144,9 +141,9 @@ describe('Task Assignee', () => {
|
||||
} catch (e) {}
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
const appModel = await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
||||
await apps.startProcess(this.alfrescoJsApi, appModel, app.processNames[1]);
|
||||
await new ProcessUtil(this.alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processNames[1]);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { LoginPage, FileBrowserUtil, ViewerPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, FileBrowserUtil, ViewerPage, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
import { AttachmentListPage } from '../pages/adf/process-services/attachment-list.page';
|
||||
@@ -61,7 +61,7 @@ describe('Attachment list action menu for tasks', () => {
|
||||
tenantId = user.tenantId;
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
const { id } = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
appId = id;
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, BrowserActions, FileBrowserUtil, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, FileBrowserUtil, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
@@ -50,7 +50,7 @@ describe('Task Audit', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
this.alfrescoJsApi.activiti.taskApi.createNewTask({ name: taskTaskApp });
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
@@ -15,10 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, StringUtil, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, StringUtil, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser } from 'protractor';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { FormModelActions } from '../actions/APS/form-model.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { StandaloneTask } from '../models/APS/standalone-task';
|
||||
@@ -170,12 +169,11 @@ describe('Task Details - Form', () => {
|
||||
};
|
||||
|
||||
const formActions = new FormModelActions();
|
||||
let app, appActions: AppsActions;
|
||||
let app;
|
||||
|
||||
beforeAll(async () => {
|
||||
app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
appActions = new AppsActions();
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
await applicationsService.importPublishDeployApp(app.file_path);
|
||||
});
|
||||
|
||||
@@ -344,7 +342,7 @@ describe('Task Details - Form', () => {
|
||||
});
|
||||
|
||||
it('[C315197] Should be able to complete a process task with visible tab with empty value for field', async () => {
|
||||
await appActions.startProcess(this.alfrescoJsApi, app, app.visibilityProcess.name);
|
||||
await new ProcessUtil(this.alfrescoJsApi).startProcessByDefinitionName(app.name, app.visibilityProcess.name);
|
||||
|
||||
await filtersPage.goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await tasksListPage.checkTaskListIsLoaded();
|
||||
@@ -378,7 +376,7 @@ describe('Task Details - Form', () => {
|
||||
});
|
||||
|
||||
it('[C212922] Should a User task form be refreshed, saved or completed.', async () => {
|
||||
await appActions.startProcess(this.alfrescoJsApi, app, app.processName);
|
||||
await new ProcessUtil(this.alfrescoJsApi).startProcessByDefinitionName(app.name, app.processName);
|
||||
|
||||
await filtersPage.goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await tasksListPage.checkTaskListIsLoaded();
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
@@ -23,7 +23,6 @@ import { Tenant } from '../models/APS/tenant';
|
||||
import { browser } from 'protractor';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
|
||||
describe('Task Details - No form', () => {
|
||||
|
||||
@@ -33,7 +32,6 @@ describe('Task Details - No form', () => {
|
||||
const app = browser.params.resources.Files.NO_FORM_APP;
|
||||
const taskPage = new TasksPage();
|
||||
const noFormMessage = 'No forms attached';
|
||||
const apps = new AppsActions();
|
||||
let importedApp;
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -48,9 +46,9 @@ describe('Task Details - No form', () => {
|
||||
processUserModel = await users.createApsUser(this.alfrescoJsApi, id);
|
||||
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
await apps.startProcess(this.alfrescoJsApi, importedApp);
|
||||
await new ProcessUtil(this.alfrescoJsApi).startProcessOfApp(importedApp.name);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -21,11 +21,10 @@ import { Tenant } from '../models/APS/tenant';
|
||||
import Task = require('../models/APS/Task');
|
||||
import TaskModel = require('../models/APS/TaskModel');
|
||||
import FormModel = require('../models/APS/FormModel');
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import moment = require('moment');
|
||||
import { LoginPage, BrowserActions, StringUtil, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, StringUtil, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
@@ -37,7 +36,6 @@ describe('Task Details component', () => {
|
||||
const tasks = ['Modifying task', 'Information box', 'No form', 'Not Created', 'Refreshing form', 'Assignee task', 'Attach File'];
|
||||
const TASK_DATE_FORMAT = 'll';
|
||||
let formModel;
|
||||
let apps;
|
||||
|
||||
const taskFormModel = {
|
||||
'name': StringUtil.generateRandomString(),
|
||||
@@ -51,7 +49,6 @@ describe('Task Details component', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
apps = new AppsActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'BPM',
|
||||
@@ -63,7 +60,7 @@ describe('Task Details component', () => {
|
||||
processUserModel = await users.createApsUser(this.alfrescoJsApi, id);
|
||||
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
@@ -140,7 +137,7 @@ describe('Task Details component', () => {
|
||||
});
|
||||
|
||||
it('[C286706] Should display task details for task - Task App', async () => {
|
||||
await apps.startProcess(this.alfrescoJsApi, appModel);
|
||||
await new ProcessUtil(this.alfrescoJsApi).startProcessOfApp(appModel.name);
|
||||
|
||||
await (await processServices.goToTaskApp()).clickTasksButton();
|
||||
|
||||
@@ -174,7 +171,7 @@ describe('Task Details component', () => {
|
||||
});
|
||||
|
||||
it('[C286705] Should display task details for task - Custom App', async () => {
|
||||
await apps.startProcess(this.alfrescoJsApi, appModel);
|
||||
await new ProcessUtil(this.alfrescoJsApi).startProcessOfApp(appModel.name);
|
||||
|
||||
await (await processServices.goToTaskApp()).clickTasksButton();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
@@ -245,7 +242,7 @@ describe('Task Details component', () => {
|
||||
it('[C286707] Should display task details for subtask - Custom App', async () => {
|
||||
const checklistName = 'CustomAppChecklist';
|
||||
|
||||
await apps.startProcess(this.alfrescoJsApi, appModel);
|
||||
await new ProcessUtil(this.alfrescoJsApi).startProcessOfApp(appModel.name);
|
||||
|
||||
await (await processServices.goToTaskApp()).clickTasksButton();
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
@@ -59,7 +59,7 @@ describe('Task', () => {
|
||||
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
const { id } = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
appId = id;
|
||||
|
||||
@@ -112,11 +112,6 @@ describe('Task', () => {
|
||||
await taskFiltersDemoPage.involvedTasksFilter().checkTaskFilterIsDisplayed();
|
||||
await taskFiltersDemoPage.completedTasksFilter().checkTaskFilterIsDisplayed();
|
||||
|
||||
await taskFiltersDemoPage.myTasksFilter().checkTaskFilterIsDisplayed();
|
||||
await taskFiltersDemoPage.queuedTasksFilter().checkTaskFilterIsDisplayed();
|
||||
await taskFiltersDemoPage.involvedTasksFilter().checkTaskFilterIsDisplayed();
|
||||
await taskFiltersDemoPage.completedTasksFilter().checkTaskFilterIsDisplayed();
|
||||
|
||||
const task = await tasksPage.createNewTask();
|
||||
await task.addName('Test');
|
||||
await task.clickStartButton();
|
||||
@@ -209,7 +204,7 @@ describe('Task', () => {
|
||||
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
const importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
const appDefinitions = await this.alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
appId = appDefinitions.data.find((currentApp) => currentApp.modelId === importedApp.id).id;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
@@ -61,7 +61,7 @@ describe('Task Filters Sorting', () => {
|
||||
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
const importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
const appDefinitions = await this.alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
appId = appDefinitions.data.find((currentApp) => currentApp.modelId === importedApp.id).id;
|
||||
|
@@ -15,10 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, PaginationPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, PaginationPage, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser } from 'protractor';
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||
@@ -51,7 +50,6 @@ describe('Task List Pagination', () => {
|
||||
};
|
||||
|
||||
beforeAll(async () => {
|
||||
const apps = new AppsActions();
|
||||
const users = new UsersActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -63,11 +61,11 @@ describe('Task List Pagination', () => {
|
||||
processUserModel = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
const resultApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
for (let i = 0; i < nrOfTasks; i++) {
|
||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
||||
await new ProcessUtil(this.alfrescoJsApi).startProcessOfApp(resultApp.name);
|
||||
}
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -31,7 +30,6 @@ describe('Amount Widget', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.AMOUNT;
|
||||
let deployedApp, process;
|
||||
@@ -49,14 +47,15 @@ describe('Amount Widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
const processUtil = new ProcessUtil(alfrescoJsApi);
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, Widget, ViewerPage, FileBrowserUtil, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, Widget, ViewerPage, FileBrowserUtil, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
@@ -54,7 +54,7 @@ describe('Attach widget - File', () => {
|
||||
processUserModel = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
|
||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||
await applicationsService.importPublishDeployApp(app.file_path);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -29,7 +28,6 @@ describe('Attach Folder widget', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.ATTACH_FOLDER;
|
||||
let deployedApp, process;
|
||||
@@ -47,14 +45,15 @@ describe('Attach Folder widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
const processUtil = new ProcessUtil(alfrescoJsApi);
|
||||
process = await processUtil.startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -30,7 +29,6 @@ describe('Checkbox Widget', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.CHECKBOX;
|
||||
let deployedApp, process;
|
||||
@@ -48,14 +46,14 @@ describe('Checkbox Widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -30,7 +29,6 @@ describe('Date and time widget', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DATETIME;
|
||||
let deployedApp, process;
|
||||
@@ -48,14 +46,14 @@ describe('Date and time widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, FormPage, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, FormPage, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -33,7 +32,6 @@ describe('Date widget', () => {
|
||||
const widget = new Widget();
|
||||
const dateWidget = widget.dateWidget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DATE;
|
||||
let deployedApp, process;
|
||||
@@ -51,14 +49,14 @@ describe('Date widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -30,7 +29,6 @@ describe('Document Template widget', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.FILE_FORM_ADF;
|
||||
let deployedApp, process;
|
||||
@@ -48,14 +46,14 @@ describe('Document Template widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp( app.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessOfApp(appModel.name);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -30,7 +29,6 @@ describe('Dropdown widget', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DROPDOWN;
|
||||
let deployedApp, process;
|
||||
@@ -48,14 +46,14 @@ describe('Dropdown widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -29,7 +28,6 @@ describe('Dynamic Table widget ', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const appsActions = new AppsActions();
|
||||
const users = new UsersActions();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -49,12 +47,12 @@ describe('Dynamic Table widget ', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => currentApp.modelId === appModel.id);
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
@@ -99,12 +97,12 @@ describe('Dynamic Table widget ', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => currentApp.modelId === appModel.id);
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
@@ -156,12 +154,12 @@ describe('Dynamic Table widget ', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
const application = await applicationsService.importPublishDeployApp(app.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => currentApp.modelId === application.id);
|
||||
process = await appsActions.startProcess(alfrescoJsApi, application, app.CUSTOM_VALIDATOR.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(application.name, app.CUSTOM_VALIDATOR.processName);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -30,7 +29,6 @@ describe('Header widget', async () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.HEADER;
|
||||
let deployedApp, process;
|
||||
@@ -48,14 +46,14 @@ describe('Header widget', async () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -30,7 +29,6 @@ describe('Hyperlink widget', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.HYPERLINK;
|
||||
let deployedApp, process;
|
||||
@@ -48,14 +46,14 @@ describe('Hyperlink widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -30,7 +29,6 @@ describe('Multi-line Widget', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.MULTILINE_TEXT;
|
||||
let deployedApp, process;
|
||||
@@ -48,14 +46,14 @@ describe('Multi-line Widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -30,7 +29,6 @@ describe('Number widget', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.NUMBER;
|
||||
let deployedApp, process;
|
||||
@@ -48,14 +46,14 @@ describe('Number widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, StringUtil, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, StringUtil, Widget, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import { User } from '../../models/APS/user';
|
||||
@@ -46,7 +46,7 @@ describe('People and Group widget', () => {
|
||||
|
||||
await alfrescoJsApi.login(user.email, user.password);
|
||||
try {
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
||||
} catch (e) { console.error('failed to deploy the application'); }
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -30,7 +29,6 @@ describe('People widget', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.ADD_PEOPLE;
|
||||
let deployedApp, process;
|
||||
@@ -48,14 +46,14 @@ describe('People widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessOfApp(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -30,7 +29,6 @@ describe('Radio Buttons Widget', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.RADIO_BUTTONS;
|
||||
let deployedApp, process;
|
||||
@@ -48,7 +46,7 @@ describe('Radio Buttons Widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
@@ -56,7 +54,7 @@ describe('Radio Buttons Widget', () => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -16,9 +16,8 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, Widget, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { browser } from 'protractor';
|
||||
@@ -30,7 +29,6 @@ describe('Text widget', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.TEXT;
|
||||
let deployedApp, process;
|
||||
@@ -48,14 +46,14 @@ describe('Text widget', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import { LoginPage, Widget, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, Widget, ApplicationsUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import { User } from '../../models/APS/user';
|
||||
@@ -44,7 +44,7 @@ describe('Typeahead widget', () => {
|
||||
user = await usersActions.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(user.email, user.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
});
|
||||
|
@@ -16,11 +16,10 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { LoginPage, Widget, BrowserActions, ApplicationService } from '@alfresco/adf-testing';
|
||||
import { LoginPage, Widget, BrowserActions, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||
|
||||
const widgets = {
|
||||
@@ -53,7 +52,6 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
let alfrescoJsApi;
|
||||
const appsActions = new AppsActions();
|
||||
let appModel;
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.VISIBILITY;
|
||||
let deployedApp, process;
|
||||
@@ -71,14 +69,14 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||
|
||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
||||
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||
|
||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
|
||||
process = await new ProcessUtil(alfrescoJsApi).startProcessByDefinitionName(appModel.name, app.processName);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user