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;
|
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) {
|
async publishDeployApp(alfrescoJsApi, appId) {
|
||||||
browser.setFileDetector(new remote.FileDetector());
|
browser.setFileDetector(new remote.FileDetector());
|
||||||
|
|
||||||
@@ -92,32 +73,4 @@ export class AppsActions {
|
|||||||
|
|
||||||
return appCreated;
|
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> {
|
async checkActiveFilterActive(): Promise<string> {
|
||||||
return BrowserActions.getText(this.activeFilter);
|
return BrowserActions.getText(this.activeFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,6 @@ export class ProcessDetailsPage {
|
|||||||
auditLogEmptyListMessage: ElementFinder = element(by.css('.app-empty-list-header'));
|
auditLogEmptyListMessage: ElementFinder = element(by.css('.app-empty-list-header'));
|
||||||
cancelProcessButton: ElementFinder = element(by.css('div[data-automation-id="header-status"] > button'));
|
cancelProcessButton: ElementFinder = element(by.css('div[data-automation-id="header-status"] > button'));
|
||||||
activeTask: ElementFinder = element(by.css('div[data-automation-id="active-tasks"]'));
|
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"]'));
|
completedTask: ElementFinder = element(by.css('div[data-automation-id="completed-tasks"]'));
|
||||||
taskTitle: ElementFinder = element(by.css('h2[class="adf-activiti-task-details__header"]'));
|
taskTitle: ElementFinder = element(by.css('h2[class="adf-activiti-task-details__header"]'));
|
||||||
|
|
||||||
@@ -137,10 +136,6 @@ export class ProcessDetailsPage {
|
|||||||
await BrowserActions.click(this.activeTask);
|
await BrowserActions.click(this.activeTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickOnStartForm(): Promise<void> {
|
|
||||||
await BrowserActions.click(this.startForm);
|
|
||||||
}
|
|
||||||
|
|
||||||
async clickOnCompletedTask(): Promise<void> {
|
async clickOnCompletedTask(): Promise<void> {
|
||||||
await BrowserActions.click(this.completedTask);
|
await BrowserActions.click(this.completedTask);
|
||||||
}
|
}
|
||||||
|
@@ -15,9 +15,8 @@
|
|||||||
* limitations under the License.
|
* 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 { by, element, ElementFinder, Locator } from 'protractor';
|
||||||
import { StartProcessPage } from './start-process.page';
|
|
||||||
|
|
||||||
export class ProcessFiltersPage {
|
export class ProcessFiltersPage {
|
||||||
|
|
||||||
|
@@ -15,12 +15,11 @@
|
|||||||
* limitations under the License.
|
* 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 { browser, by } from 'protractor';
|
||||||
|
|
||||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||||
import { TasksCloudDemoPage } from '../../pages/adf/demo-shell/process-services/tasks-cloud-demo.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 { 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';
|
import { ProcessDetailsCloudDemoPage } from '../../pages/adf/demo-shell/process-services-cloud/process-details-cloud-demo.page';
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { browser } from 'protractor';
|
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 { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import CONSTANTS = require('../util/constants');
|
import CONSTANTS = require('../util/constants');
|
||||||
@@ -46,7 +46,7 @@ describe('Modify applications', () => {
|
|||||||
hostBpm: browser.params.testConfig.adf_aps.host
|
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);
|
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../util/constants');
|
import CONSTANTS = require('../util/constants');
|
||||||
import { FileModel } from '../models/ACS/file.model';
|
import { FileModel } from '../models/ACS/file.model';
|
||||||
@@ -45,7 +45,7 @@ describe('Start Task - Task App', () => {
|
|||||||
hostBpm: browser.params.testConfig.adf_aps.host
|
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);
|
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ApplicationService,
|
ApplicationsUtil,
|
||||||
ContentNodeSelectorDialogPage,
|
ContentNodeSelectorDialogPage,
|
||||||
IntegrationService,
|
IntegrationService,
|
||||||
LoginPage,
|
LoginPage,
|
||||||
@@ -37,7 +37,7 @@ describe('Attach Folder', () => {
|
|||||||
hostBpm: browser.params.testConfig.adf_aps.host
|
hostBpm: browser.params.testConfig.adf_aps.host
|
||||||
});
|
});
|
||||||
const integrationService = new IntegrationService(this.alfrescoJsApi);
|
const integrationService = new IntegrationService(this.alfrescoJsApi);
|
||||||
const applicationService = new ApplicationService(this.alfrescoJsApi);
|
const applicationService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||||
|
|
||||||
const users = new UsersActions();
|
const users = new UsersActions();
|
||||||
const loginPage = new LoginPage();
|
const loginPage = new LoginPage();
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { browser, by } from 'protractor';
|
import { browser, by } from 'protractor';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
@@ -50,7 +50,7 @@ describe('Attach Form Component', () => {
|
|||||||
provider: 'BPM',
|
provider: 'BPM',
|
||||||
hostBpm: browser.params.testConfig.adf_aps.host
|
hostBpm: browser.params.testConfig.adf_aps.host
|
||||||
});
|
});
|
||||||
const applicationService = new ApplicationService(this.alfrescoJsApi);
|
const applicationService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||||
|
|
||||||
const users = new UsersActions();
|
const users = new UsersActions();
|
||||||
|
|
||||||
|
@@ -16,13 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { browser } from 'protractor';
|
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 { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||||
import { CommentsPage } from '../pages/adf/comments.page';
|
import { CommentsPage } from '../pages/adf/comments.page';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
|
|
||||||
describe('Comment component for Processes', () => {
|
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;
|
const app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||||
let user, tenantId, appId, processInstanceId, addedComment;
|
let user, tenantId, appId, processInstanceId, addedComment;
|
||||||
|
const processName = 'Comment APS';
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
this.alfrescoJsApi = new AlfrescoApi({
|
this.alfrescoJsApi = new AlfrescoApi({
|
||||||
@@ -40,9 +40,8 @@ describe('Comment component for Processes', () => {
|
|||||||
hostBpm: browser.params.testConfig.adf_aps.host
|
hostBpm: browser.params.testConfig.adf_aps.host
|
||||||
});
|
});
|
||||||
|
|
||||||
const apps = new AppsActions();
|
|
||||||
const users = new UsersActions();
|
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);
|
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);
|
const importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
appId = importedApp.id;
|
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;
|
processInstanceId = processWithComment.id;
|
||||||
|
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||||
@@ -73,7 +72,7 @@ describe('Comment component for Processes', () => {
|
|||||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||||
|
|
||||||
await processFiltersPage.clickRunningFilterButton();
|
await processFiltersPage.clickRunningFilterButton();
|
||||||
await processFiltersPage.selectFromProcessList('Comment APS');
|
await processFiltersPage.selectFromProcessList(processName);
|
||||||
|
|
||||||
addedComment = await this.alfrescoJsApi.activiti.commentsApi.getProcessInstanceComments(processInstanceId, { 'latestFirst': true });
|
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 (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||||
|
|
||||||
await processFiltersPage.clickRunningFilterButton();
|
await processFiltersPage.clickRunningFilterButton();
|
||||||
await processFiltersPage.selectFromProcessList('Comment APS');
|
await processFiltersPage.selectFromProcessList(processName);
|
||||||
|
|
||||||
const taskQuery = await this.alfrescoJsApi.activiti.taskApi.listTasks({ processInstanceId: processInstanceId });
|
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 (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||||
|
|
||||||
await processFiltersPage.clickRunningFilterButton();
|
await processFiltersPage.clickRunningFilterButton();
|
||||||
await processFiltersPage.selectFromProcessList('Comment APS');
|
await processFiltersPage.selectFromProcessList(processName);
|
||||||
|
|
||||||
const addedTaskComment = await this.alfrescoJsApi.activiti.commentsApi.getProcessInstanceComments(processInstanceId, { 'latestFirst': true });
|
const addedTaskComment = await this.alfrescoJsApi.activiti.commentsApi.getProcessInstanceComments(processInstanceId, { 'latestFirst': true });
|
||||||
|
|
||||||
|
@@ -17,14 +17,13 @@
|
|||||||
|
|
||||||
import { browser } from 'protractor';
|
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 { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||||
import { CommentsPage } from '../pages/adf/comments.page';
|
import { CommentsPage } from '../pages/adf/comments.page';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import CONSTANTS = require('../util/constants');
|
import CONSTANTS = require('../util/constants');
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
|
|
||||||
describe('Comment component for Processes', () => {
|
describe('Comment component for Processes', () => {
|
||||||
|
|
||||||
@@ -48,7 +47,6 @@ describe('Comment component for Processes', () => {
|
|||||||
hostBpm: browser.params.testConfig.adf_aps.host
|
hostBpm: browser.params.testConfig.adf_aps.host
|
||||||
});
|
});
|
||||||
|
|
||||||
const apps = new AppsActions();
|
|
||||||
const users = new UsersActions();
|
const users = new UsersActions();
|
||||||
|
|
||||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
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);
|
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;
|
appId = importedApp.id;
|
||||||
|
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||||
|
@@ -17,13 +17,12 @@
|
|||||||
|
|
||||||
import { browser } from 'protractor';
|
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 { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||||
import { FiltersPage } from '../pages/adf/process-services/filters.page';
|
import { FiltersPage } from '../pages/adf/process-services/filters.page';
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
|
|
||||||
describe('Sorting for process filters', () => {
|
describe('Sorting for process filters', () => {
|
||||||
|
|
||||||
@@ -32,8 +31,6 @@ describe('Sorting for process filters', () => {
|
|||||||
const processFiltersPage = new ProcessFiltersPage();
|
const processFiltersPage = new ProcessFiltersPage();
|
||||||
const filtersPage = new FiltersPage();
|
const filtersPage = new FiltersPage();
|
||||||
|
|
||||||
const apps = new AppsActions();
|
|
||||||
|
|
||||||
const app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
const app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||||
let tenantId, appId, user, processesQuery;
|
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);
|
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);
|
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||||
tenantId = user.tenantId;
|
tenantId = user.tenantId;
|
||||||
@@ -86,9 +83,10 @@ describe('Sorting for process filters', () => {
|
|||||||
'appId': null, 'name': processFilter.running_old_first, 'icon': 'glyphicon-random',
|
'appId': null, 'name': processFilter.running_old_first, 'icon': 'glyphicon-random',
|
||||||
'filter': { 'sort': 'created-asc', 'name': '', 'state': 'running' }
|
'filter': { 'sort': 'created-asc', 'name': '', 'state': 'running' }
|
||||||
});
|
});
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
const secondProc = await processUtil.startProcessOfApp('Task App');
|
||||||
|
const thirdProc = await processUtil.startProcessOfApp('Task App');
|
||||||
|
|
||||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||||
|
|
||||||
@@ -97,9 +95,9 @@ describe('Sorting for process filters', () => {
|
|||||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'running', 'sort': 'created-asc'
|
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'running', 'sort': 'created-asc'
|
||||||
});
|
});
|
||||||
await expect(processesQuery.data[0].name).toEqual('Process 1');
|
await expect(processesQuery.data[0].name).toEqual(firstProc.name);
|
||||||
await expect(processesQuery.data[1].name).toEqual('Process 2');
|
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||||
await expect(processesQuery.data[2].name).toEqual('Process 3');
|
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 () => {
|
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' }
|
'filter': { 'sort': 'created-asc', 'name': '', 'state': 'completed' }
|
||||||
});
|
});
|
||||||
|
|
||||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
const secondProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||||
const thirdProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
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(firstProc.id);
|
||||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(secondProc.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({
|
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'created-asc'
|
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'created-asc'
|
||||||
});
|
});
|
||||||
await expect(processesQuery.data[0].name).toEqual('Process 1');
|
await expect(processesQuery.data[0].name).toEqual(firstProc.name);
|
||||||
await expect(processesQuery.data[1].name).toEqual('Process 2');
|
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||||
await expect(processesQuery.data[2].name).toEqual('Process 3');
|
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 () => {
|
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' }
|
'filter': { 'sort': 'created-asc', 'name': '', 'state': 'all' }
|
||||||
});
|
});
|
||||||
|
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
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 deleteFirstProc = await processUtil.startProcessOfApp('Task App');
|
||||||
const secondProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 5');
|
const deleteSecondProc = await processUtil.startProcessOfApp('Task App');
|
||||||
const thirdProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 6');
|
const deleteThirdProc = await processUtil.startProcessOfApp('Task App');
|
||||||
|
|
||||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(firstProc.id);
|
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(deleteFirstProc.id);
|
||||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(secondProc.id);
|
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(deleteSecondProc.id);
|
||||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(thirdProc.id);
|
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(deleteThirdProc.id);
|
||||||
|
|
||||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||||
|
|
||||||
@@ -157,12 +157,12 @@ describe('Sorting for process filters', () => {
|
|||||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'all', 'sort': 'created-asc'
|
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'all', 'sort': 'created-asc'
|
||||||
});
|
});
|
||||||
await expect(processesQuery.data[0].name).toEqual('Process 1');
|
await expect(processesQuery.data[0].name).toEqual(firstProc.name);
|
||||||
await expect(processesQuery.data[1].name).toEqual('Process 2');
|
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||||
await expect(processesQuery.data[2].name).toEqual('Process 3');
|
await expect(processesQuery.data[2].name).toEqual(thirdProc.name);
|
||||||
await expect(processesQuery.data[3].name).toEqual('Process 4');
|
await expect(processesQuery.data[3].name).toEqual(deleteFirstProc.name);
|
||||||
await expect(processesQuery.data[4].name).toEqual('Process 5');
|
await expect(processesQuery.data[4].name).toEqual(deleteSecondProc.name);
|
||||||
await expect(processesQuery.data[5].name).toEqual('Process 6');
|
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 () => {
|
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' }
|
'filter': { 'sort': 'created-desc', 'name': '', 'state': 'running' }
|
||||||
});
|
});
|
||||||
|
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
const secondProc = await processUtil.startProcessOfApp('Task App');
|
||||||
|
const thirdProc = await processUtil.startProcessOfApp('Task App');
|
||||||
|
|
||||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||||
|
|
||||||
@@ -184,9 +185,9 @@ describe('Sorting for process filters', () => {
|
|||||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'running', 'sort': 'created-desc'
|
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'running', 'sort': 'created-desc'
|
||||||
});
|
});
|
||||||
await expect(processesQuery.data[0].name).toEqual('Process 3');
|
await expect(processesQuery.data[0].name).toEqual(thirdProc.name);
|
||||||
await expect(processesQuery.data[1].name).toEqual('Process 2');
|
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||||
await expect(processesQuery.data[2].name).toEqual('Process 1');
|
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 () => {
|
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' }
|
'filter': { 'sort': 'created-desc', 'name': '', 'state': 'completed' }
|
||||||
});
|
});
|
||||||
|
|
||||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
const secondProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||||
const thirdProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
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(firstProc.id);
|
||||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(secondProc.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({
|
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'created-desc'
|
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'created-desc'
|
||||||
});
|
});
|
||||||
await expect(processesQuery.data[0].name).toEqual('Process 3');
|
await expect(processesQuery.data[0].name).toEqual(thirdProc.name);
|
||||||
await expect(processesQuery.data[1].name).toEqual('Process 2');
|
await expect(processesQuery.data[1].name).toEqual(secondProc.name);
|
||||||
await expect(processesQuery.data[2].name).toEqual('Process 1');
|
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 () => {
|
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' }
|
'filter': { 'sort': 'created-desc', 'name': '', 'state': 'all' }
|
||||||
});
|
});
|
||||||
|
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
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 deleteFirstProc = await processUtil.startProcessOfApp('Task App');
|
||||||
const secondProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 5');
|
const deleteSecondProc = await processUtil.startProcessOfApp('Task App');
|
||||||
const thirdProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 6');
|
const deleteThirdProc = await processUtil.startProcessOfApp('Task App');
|
||||||
|
|
||||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(firstProc.id);
|
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(deleteFirstProc.id);
|
||||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(secondProc.id);
|
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(deleteSecondProc.id);
|
||||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(thirdProc.id);
|
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(deleteThirdProc.id);
|
||||||
|
|
||||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||||
|
|
||||||
@@ -243,12 +246,12 @@ describe('Sorting for process filters', () => {
|
|||||||
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'all', 'sort': 'created-desc'
|
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'all', 'sort': 'created-desc'
|
||||||
});
|
});
|
||||||
await expect(processesQuery.data[0].name).toEqual('Process 6');
|
await expect(processesQuery.data[0].name).toEqual(deleteThirdProc.name);
|
||||||
await expect(processesQuery.data[1].name).toEqual('Process 5');
|
await expect(processesQuery.data[1].name).toEqual(deleteSecondProc.name);
|
||||||
await expect(processesQuery.data[2].name).toEqual('Process 4');
|
await expect(processesQuery.data[2].name).toEqual(deleteFirstProc.name);
|
||||||
await expect(processesQuery.data[3].name).toEqual('Process 3');
|
await expect(processesQuery.data[3].name).toEqual(thirdProc.name);
|
||||||
await expect(processesQuery.data[4].name).toEqual('Process 2');
|
await expect(processesQuery.data[4].name).toEqual(secondProc.name);
|
||||||
await expect(processesQuery.data[5].name).toEqual('Process 1');
|
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 () => {
|
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' }
|
'filter': { 'sort': 'ended-asc', 'name': '', 'state': 'completed' }
|
||||||
});
|
});
|
||||||
|
|
||||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
const secondProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||||
const thirdProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
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(secondProc.id);
|
||||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(firstProc.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({
|
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'ended-asc'
|
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'ended-asc'
|
||||||
});
|
});
|
||||||
await expect(processesQuery.data[0].name).toEqual('Process 2');
|
await expect(processesQuery.data[0].name).toEqual(secondProc.name);
|
||||||
await expect(processesQuery.data[1].name).toEqual('Process 1');
|
await expect(processesQuery.data[1].name).toEqual(firstProc.name);
|
||||||
await expect(processesQuery.data[2].name).toEqual('Process 3');
|
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 () => {
|
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' }
|
'filter': { 'sort': 'ended-desc', 'name': '', 'state': 'completed' }
|
||||||
});
|
});
|
||||||
|
|
||||||
const firstProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 1');
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
const secondProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 2');
|
const firstProc = await processUtil.startProcessOfApp('Task App');
|
||||||
const thirdProc = await apps.startProcess(this.alfrescoJsApi, 'Task App', 'Process 3');
|
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(secondProc.id);
|
||||||
await this.alfrescoJsApi.activiti.processInstancesApi.deleteProcessInstance(firstProc.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({
|
processesQuery = await this.alfrescoJsApi.activiti.processApi.getProcessInstances({
|
||||||
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'ended-desc'
|
'processDefinitionId': null, 'appDefinitionId': null, 'state': 'completed', 'sort': 'ended-desc'
|
||||||
});
|
});
|
||||||
await expect(processesQuery.data[0].name).toEqual('Process 3');
|
await expect(processesQuery.data[0].name).toEqual(thirdProc.name);
|
||||||
await expect(processesQuery.data[1].name).toEqual('Process 1');
|
await expect(processesQuery.data[1].name).toEqual(firstProc.name);
|
||||||
await expect(processesQuery.data[2].name).toEqual('Process 2');
|
await expect(processesQuery.data[2].name).toEqual(secondProc.name);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -15,10 +15,9 @@
|
|||||||
* limitations under the License.
|
* 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 { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
import { AppsRuntimeActions } from '../actions/APS/apps-runtime.actions';
|
import { AppsRuntimeActions } from '../actions/APS/apps-runtime.actions';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { Tenant } from '../models/APS/tenant';
|
import { Tenant } from '../models/APS/tenant';
|
||||||
@@ -68,7 +67,6 @@ describe('Start Task - Custom App', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const apps = new AppsActions();
|
|
||||||
const appsRuntime = new AppsRuntimeActions();
|
const appsRuntime = new AppsRuntimeActions();
|
||||||
const users = new UsersActions();
|
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);
|
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());
|
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);
|
secondAppRuntime = await appsRuntime.getRuntimeAppByName(this.alfrescoJsApi, secondApp.title);
|
||||||
|
|
||||||
processDefinitionId = await apps.startProcess(this.alfrescoJsApi, appModel);
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
await apps.startProcess(this.alfrescoJsApi, appModel);
|
processDefinitionId = await processUtil.startProcessOfApp(appModel.name);
|
||||||
await apps.startProcess(this.alfrescoJsApi, secondAppModel);
|
await processUtil.startProcessOfApp(appModel.name);
|
||||||
await apps.startProcess(this.alfrescoJsApi, secondAppModel);
|
await processUtil.startProcessOfApp(secondAppModel.name);
|
||||||
|
await processUtil.startProcessOfApp(secondAppModel.name);
|
||||||
|
|
||||||
for (let i = 1; i < paginationTasksName.length; i++) {
|
for (let i = 1; i < paginationTasksName.length; i++) {
|
||||||
await this.alfrescoJsApi.activiti.taskApi.createNewTask({ 'name': paginationTasksName[i] });
|
await this.alfrescoJsApi.activiti.taskApi.createNewTask({ 'name': paginationTasksName[i] });
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||||
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
@@ -66,7 +66,7 @@ describe('Dynamic Table', () => {
|
|||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await alfrescoJsApi.login(user.email, user.password);
|
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);
|
const importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
appId = importedApp.id;
|
appId = importedApp.id;
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||||
@@ -127,7 +127,7 @@ describe('Dynamic Table', () => {
|
|||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await alfrescoJsApi.login(user.email, user.password);
|
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);
|
const importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
appId = importedApp.id;
|
appId = importedApp.id;
|
||||||
|
@@ -16,13 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { browser } from 'protractor';
|
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 { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||||
import { ProcessListPage } from '../pages/adf/process-services/process-list.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 { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
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);
|
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);
|
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||||
|
|
||||||
|
@@ -15,9 +15,8 @@
|
|||||||
* limitations under the License.
|
* 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 { 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 { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||||
import { TaskDetailsPage } from '../pages/adf/process-services/task-details.page';
|
import { TaskDetailsPage } from '../pages/adf/process-services/task-details.page';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
@@ -54,7 +53,7 @@ describe('Form widgets - People ', () => {
|
|||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||||
|
|
||||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||||
|
|
||||||
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
|
@@ -15,14 +15,13 @@
|
|||||||
* limitations under the License.
|
* 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 { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../util/constants');
|
import CONSTANTS = require('../util/constants');
|
||||||
import FormDefinitionModel = require('../models/APS/FormDefinitionModel');
|
import FormDefinitionModel = require('../models/APS/FormDefinitionModel');
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
|
|
||||||
const formInstance = new FormDefinitionModel();
|
const formInstance = new FormDefinitionModel();
|
||||||
@@ -54,7 +53,7 @@ describe('Form widgets', () => {
|
|||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||||
|
|
||||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||||
|
|
||||||
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
@@ -195,7 +194,6 @@ describe('Form widgets', () => {
|
|||||||
|
|
||||||
describe('with fields involving other people', () => {
|
describe('with fields involving other people', () => {
|
||||||
|
|
||||||
const appsActions = new AppsActions();
|
|
||||||
const app = browser.params.resources.Files.FORM_ADF;
|
const app = browser.params.resources.Files.FORM_ADF;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
const appFields = app.form_fields;
|
const appFields = app.form_fields;
|
||||||
@@ -213,14 +211,15 @@ describe('Form widgets', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||||
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 {
|
import {
|
||||||
AlfrescoApiCompatibility as AlfrescoApi,
|
AlfrescoApiCompatibility as AlfrescoApi,
|
||||||
AppDefinitionRepresentation,
|
AppDefinitionRepresentation,
|
||||||
@@ -77,7 +77,7 @@ describe('Info Drawer', () => {
|
|||||||
const processUserModel = await users.createApsUser(this.alfrescoJsApi, newTenant.id);
|
const processUserModel = await users.createApsUser(this.alfrescoJsApi, newTenant.id);
|
||||||
processUserModelFullName = processUserModel.firstName + ' ' + processUserModel.lastName;
|
processUserModelFullName = processUserModel.firstName + ' ' + processUserModel.lastName;
|
||||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appCreated = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
|
@@ -15,10 +15,9 @@
|
|||||||
* limitations under the License.
|
* 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 { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.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;
|
const nrOfProcesses = 25;
|
||||||
let page, totalPages;
|
let page, totalPages;
|
||||||
let i;
|
let i;
|
||||||
const apps = new AppsActions();
|
|
||||||
let resultApp;
|
let resultApp;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
@@ -58,12 +56,13 @@ describe('Process List - Pagination when adding processes', () => {
|
|||||||
|
|
||||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
resultApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
for (i = 0; i < (nrOfProcesses - 5); i++) {
|
for (i = 0; i < (nrOfProcesses - 5); i++) {
|
||||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
await processUtil.startProcessOfApp(resultApp.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
@@ -89,8 +88,9 @@ describe('Process List - Pagination when adding processes', () => {
|
|||||||
await paginationPage.checkNextPageButtonIsEnabled();
|
await paginationPage.checkNextPageButtonIsEnabled();
|
||||||
await paginationPage.checkPreviousPageButtonIsDisabled();
|
await paginationPage.checkPreviousPageButtonIsDisabled();
|
||||||
|
|
||||||
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
for (i; i < nrOfProcesses; i++) {
|
for (i; i < nrOfProcesses; i++) {
|
||||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
await processUtil.startProcessOfApp(resultApp.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
page++;
|
page++;
|
||||||
|
@@ -15,10 +15,9 @@
|
|||||||
* limitations under the License.
|
* 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 { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { TasksPage } from '../pages/adf/process-services/tasks.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 i;
|
||||||
let resultApp;
|
let resultApp;
|
||||||
|
|
||||||
const apps = new AppsActions();
|
|
||||||
|
|
||||||
const itemsPerPage = {
|
const itemsPerPage = {
|
||||||
fifteen: '15',
|
fifteen: '15',
|
||||||
fifteenValue: 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);
|
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);
|
resultApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
for (i = 0; i < (nrOfTasks - 5); i++) {
|
for (i = 0; i < (nrOfTasks - 5); i++) {
|
||||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
await processUtil.startProcessOfApp(resultApp.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
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 paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue + ' of ' + (nrOfTasks - 5));
|
||||||
await expect(await taskPage.tasksListPage().getDataTable().numberOfRows()).toBe(itemsPerPage.fifteenValue);
|
await expect(await taskPage.tasksListPage().getDataTable().numberOfRows()).toBe(itemsPerPage.fifteenValue);
|
||||||
|
|
||||||
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
for (i; i < nrOfTasks; i++) {
|
for (i; i < nrOfTasks; i++) {
|
||||||
await apps.startProcess(this.alfrescoJsApi, resultApp);
|
await processUtil.startProcessOfApp(resultApp.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
currentPage++;
|
currentPage++;
|
||||||
|
@@ -15,14 +15,13 @@
|
|||||||
* limitations under the License.
|
* 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 { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||||
import { AttachmentListPage } from '../pages/adf/process-services/attachment-list.page';
|
import { AttachmentListPage } from '../pages/adf/process-services/attachment-list.page';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
import { FileModel } from '../models/ACS/file.model';
|
import { FileModel } from '../models/ACS/file.model';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
|
||||||
@@ -51,7 +50,6 @@ describe('Attachment list action menu for processes', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const apps = new AppsActions();
|
|
||||||
const users = new UsersActions();
|
const users = new UsersActions();
|
||||||
|
|
||||||
this.alfrescoJsApi = new AlfrescoApi({
|
this.alfrescoJsApi = new AlfrescoApi({
|
||||||
@@ -67,16 +65,17 @@ describe('Attachment list action menu for processes', () => {
|
|||||||
|
|
||||||
await this.alfrescoJsApi.login(user.email, user.password);
|
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 importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
appId = importedApp.id;
|
appId = importedApp.id;
|
||||||
|
|
||||||
await apps.startProcess(this.alfrescoJsApi, importedApp, processName.completed);
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
await apps.startProcess(this.alfrescoJsApi, importedApp, processName.active);
|
await processUtil.startProcessOfApp(importedApp.name, processName.completed);
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', processName.taskApp);
|
await processUtil.startProcessOfApp(importedApp.name, processName.active);
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', processName.emptyList);
|
await processUtil.startProcessOfApp('Task App', processName.taskApp);
|
||||||
await apps.startProcess(this.alfrescoJsApi, 'Task App', processName.dragDrop);
|
await processUtil.startProcessOfApp('Task App', processName.emptyList);
|
||||||
|
await processUtil.startProcessOfApp('Task App', processName.dragDrop);
|
||||||
|
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||||
});
|
});
|
||||||
|
@@ -15,10 +15,9 @@
|
|||||||
* limitations under the License.
|
* 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 { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.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 { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||||
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
||||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.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);
|
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||||
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||||
await this.alfrescoJsApi.login(user.email, user.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||||
});
|
});
|
||||||
|
@@ -19,8 +19,7 @@ import { browser } from 'protractor';
|
|||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
import { LoginPage, ApplicationsUtil, ProcessUtil } from '@alfresco/adf-testing';
|
||||||
import { LoginPage, ApplicationService } from '@alfresco/adf-testing';
|
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
||||||
import { ProcessListPage } from '../pages/adf/process-services/process-list.page';
|
import { ProcessListPage } from '../pages/adf/process-services/process-list.page';
|
||||||
@@ -41,7 +40,6 @@ describe('Process Instance Details', () => {
|
|||||||
const PROCESS_DATE_FORMAT = 'll';
|
const PROCESS_DATE_FORMAT = 'll';
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const apps = new AppsActions();
|
|
||||||
const users = new UsersActions();
|
const users = new UsersActions();
|
||||||
|
|
||||||
this.alfrescoJsApi = new AlfrescoApi({
|
this.alfrescoJsApi = new AlfrescoApi({
|
||||||
@@ -55,9 +53,9 @@ describe('Process Instance Details', () => {
|
|||||||
|
|
||||||
await this.alfrescoJsApi.login(user.email, user.password);
|
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);
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { ProcessListDemoPage } from '../pages/adf/demo-shell/process-services/process-list-demo.page';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
@@ -63,17 +63,18 @@ describe('Process List Test', () => {
|
|||||||
|
|
||||||
await this.alfrescoJsApi.login(user.email, user.password);
|
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);
|
appDateModel = await applicationsService.importPublishDeployApp(appWithDateField.file_path);
|
||||||
|
|
||||||
procWithDate = await apps.startProcess(this.alfrescoJsApi, appDateModel, processName.procWithDate);
|
const processUtil = new ProcessUtil(this.alfrescoJsApi);
|
||||||
completedProcWithDate = await apps.startProcess(this.alfrescoJsApi, appDateModel, processName.completedProcWithDate);
|
procWithDate = await processUtil.startProcessOfApp(appDateModel.name, processName.procWithDate);
|
||||||
|
completedProcWithDate = await processUtil.startProcessOfApp(appDateModel.name, processName.completedProcWithDate);
|
||||||
|
|
||||||
appUserWidgetModel = await applicationsService.importPublishDeployApp(appWithUserWidget.file_path);
|
appUserWidgetModel = await applicationsService.importPublishDeployApp(appWithUserWidget.file_path);
|
||||||
|
|
||||||
await apps.startProcess(this.alfrescoJsApi, appUserWidgetModel, processName.procWithUserWidget);
|
await processUtil.startProcessOfApp(appUserWidgetModel.name, processName.procWithUserWidget);
|
||||||
completedProcWithUserWidget = await apps.startProcess(this.alfrescoJsApi, appUserWidgetModel, processName.completedProcWithUserWidget);
|
completedProcWithUserWidget = await processUtil.startProcessOfApp(appUserWidgetModel.name, processName.completedProcWithUserWidget);
|
||||||
|
|
||||||
appWithDateFieldId = await apps.getAppDefinitionId(this.alfrescoJsApi, appDateModel.id);
|
appWithDateFieldId = await apps.getAppDefinitionId(this.alfrescoJsApi, appDateModel.id);
|
||||||
|
|
||||||
|
@@ -15,10 +15,9 @@
|
|||||||
* limitations under the License.
|
* 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 { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||||
@@ -51,7 +50,6 @@ describe('Process List - Pagination', () => {
|
|||||||
const nrOfProcesses = 20;
|
const nrOfProcesses = 20;
|
||||||
let page;
|
let page;
|
||||||
let totalPages;
|
let totalPages;
|
||||||
const processNameBase = 'process';
|
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const users = new UsersActions();
|
const users = new UsersActions();
|
||||||
@@ -67,7 +65,7 @@ describe('Process List - Pagination', () => {
|
|||||||
|
|
||||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
deployedTestApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
@@ -77,7 +75,6 @@ describe('Process List - Pagination', () => {
|
|||||||
describe('With processes Pagination', () => {
|
describe('With processes Pagination', () => {
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const apps = new AppsActions();
|
|
||||||
|
|
||||||
this.alfrescoJsApi = new AlfrescoApi({
|
this.alfrescoJsApi = new AlfrescoApi({
|
||||||
provider: 'BPM',
|
provider: 'BPM',
|
||||||
@@ -87,7 +84,7 @@ describe('Process List - Pagination', () => {
|
|||||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||||
|
|
||||||
for (let i = 0; i < nrOfProcesses; i++) {
|
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.
|
* 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 { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
@@ -59,7 +59,7 @@ describe('Task List Pagination - Sorting', () => {
|
|||||||
|
|
||||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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 applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
|
@@ -19,10 +19,11 @@ import CONSTANTS = require('../util/constants');
|
|||||||
import {
|
import {
|
||||||
FileBrowserUtil,
|
FileBrowserUtil,
|
||||||
LoginPage, SelectAppsDialog,
|
LoginPage, SelectAppsDialog,
|
||||||
StartProcessDialog,
|
ProcessInstanceTasksPage,
|
||||||
StringUtil,
|
StringUtil,
|
||||||
Widget,
|
Widget,
|
||||||
ApplicationService
|
ApplicationsUtil,
|
||||||
|
StartProcessPage
|
||||||
} from '@alfresco/adf-testing';
|
} from '@alfresco/adf-testing';
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { browser } from 'protractor';
|
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 { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||||
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-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 { ContentServicesPage } from '../pages/adf/content-services.page';
|
import { ContentServicesPage } from '../pages/adf/content-services.page';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { AcsUserModel } from '../models/ACS/acs-user.model';
|
import { AcsUserModel } from '../models/ACS/acs-user.model';
|
||||||
@@ -50,7 +50,7 @@ describe('Start Process Component', () => {
|
|||||||
const processServiceTabBarPage = new ProcessServiceTabBarPage();
|
const processServiceTabBarPage = new ProcessServiceTabBarPage();
|
||||||
const processDetailsPage = new ProcessDetailsPage();
|
const processDetailsPage = new ProcessDetailsPage();
|
||||||
const attachmentListPage = new AttachmentListPage();
|
const attachmentListPage = new AttachmentListPage();
|
||||||
const startProcessDialog = new StartProcessDialog();
|
const processInstanceTasksPage = new ProcessInstanceTasksPage();
|
||||||
const contentServicesPage = new ContentServicesPage();
|
const contentServicesPage = new ContentServicesPage();
|
||||||
const selectAppsDialog = new SelectAppsDialog();
|
const selectAppsDialog = new SelectAppsDialog();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
@@ -98,7 +98,7 @@ describe('Start Process Component', () => {
|
|||||||
|
|
||||||
await this.alfrescoJsApiUserTwo.login(secondProcUserModel.email, secondProcUserModel.password);
|
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);
|
const appCreated = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
@@ -469,12 +469,12 @@ describe('Start Process Component', () => {
|
|||||||
|
|
||||||
await processFiltersPage.clickRunningFilterButton();
|
await processFiltersPage.clickRunningFilterButton();
|
||||||
await processFiltersPage.selectFromProcessList('DateFormProcess');
|
await processFiltersPage.selectFromProcessList('DateFormProcess');
|
||||||
await processDetailsPage.clickOnStartForm();
|
await processInstanceTasksPage.clickOnStartForm();
|
||||||
await startProcessDialog.checkStartProcessDialogIsDisplayed();
|
await processInstanceTasksPage.checkStartProcessDialogIsDisplayed();
|
||||||
await expect(await startProcessDialog.getTitle()).toBe('Start Form');
|
await expect(await processInstanceTasksPage.getTitle()).toBe('Start Form');
|
||||||
await expect(await (await widget.dateWidget()).getDateInput('testdate')).toBe('15-7-2019');
|
await expect(await (await widget.dateWidget()).getDateInput('testdate')).toBe('15-7-2019');
|
||||||
await startProcessDialog.clickCloseButton();
|
await processInstanceTasksPage.clickCloseButton();
|
||||||
await startProcessDialog.checkStartProcessDialogIsNotDisplayed();
|
await processInstanceTasksPage.checkStartProcessDialogIsNotDisplayed();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -516,7 +516,7 @@ describe('Start Process Component', () => {
|
|||||||
});
|
});
|
||||||
await this.alfrescoJsBPMAdminUser.login(processUserModel.email, processUserModel.password);
|
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);
|
const appCreated = await applicationsService.importPublishDeployApp(startProcessAttachFileApp.file_path);
|
||||||
appId = appCreated.id;
|
appId = appCreated.id;
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { browser, by } from 'protractor';
|
import { browser, by } from 'protractor';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
@@ -66,7 +66,7 @@ describe('Start Task - Custom App', () => {
|
|||||||
|
|
||||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
|
@@ -17,13 +17,12 @@
|
|||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
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 { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { User } from '../models/APS/user';
|
import { User } from '../models/APS/user';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-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 { ProcessListDemoPage } from '../pages/adf/demo-shell/process-services/process-list-demo.page';
|
||||||
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
import { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||||
@@ -55,7 +54,7 @@ describe('Stencil', () => {
|
|||||||
user = await usersActions.createTenantAndUser(alfrescoJsApi);
|
user = await usersActions.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(user.email, user.password);
|
await alfrescoJsApi.login(user.email, user.password);
|
||||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||||
await applicationsService.importPublishDeployApp(app.file_path);
|
await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||||
});
|
});
|
||||||
|
@@ -15,16 +15,14 @@
|
|||||||
* limitations under the License.
|
* 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 { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.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 { ProcessFiltersPage } from '../pages/adf/process-services/process-filters.page';
|
||||||
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
import { ProcessServiceTabBarPage } from '../pages/adf/process-services/process-service-tab-bar.page';
|
||||||
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
import { ProcessDetailsPage } from '../pages/adf/process-services/process-details.page';
|
||||||
import { ProcessListPage } from '../pages/adf/process-services/process-list.page';
|
import { ProcessListPage } from '../pages/adf/process-services/process-list.page';
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { User } from '../models/APS/user';
|
import { User } from '../models/APS/user';
|
||||||
@@ -36,7 +34,6 @@ describe('Task Assignee', () => {
|
|||||||
const navigationBarPage = new NavigationBarPage();
|
const navigationBarPage = new NavigationBarPage();
|
||||||
const processServicesPage = new ProcessServicesPage();
|
const processServicesPage = new ProcessServicesPage();
|
||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const apps = new AppsActions();
|
|
||||||
const users = new UsersActions();
|
const users = new UsersActions();
|
||||||
|
|
||||||
const app = browser.params.resources.Files.TEST_ASSIGNEE;
|
const app = browser.params.resources.Files.TEST_ASSIGNEE;
|
||||||
@@ -65,7 +62,7 @@ describe('Task Assignee', () => {
|
|||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
await this.alfrescoJsApi.login(user.email, user.password);
|
await this.alfrescoJsApi.login(user.email, user.password);
|
||||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||||
try {
|
try {
|
||||||
await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -144,9 +141,9 @@ describe('Task Assignee', () => {
|
|||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
await this.alfrescoJsApi.login(user.email, user.password);
|
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 });
|
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 () => {
|
afterAll(async () => {
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { browser } from 'protractor';
|
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 { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||||
import { AttachmentListPage } from '../pages/adf/process-services/attachment-list.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;
|
tenantId = user.tenantId;
|
||||||
|
|
||||||
await this.alfrescoJsApi.login(user.email, user.password);
|
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);
|
const { id } = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
appId = id;
|
appId = id;
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||||
import CONSTANTS = require('../util/constants');
|
import CONSTANTS = require('../util/constants');
|
||||||
@@ -50,7 +50,7 @@ describe('Task Audit', () => {
|
|||||||
|
|
||||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||||
this.alfrescoJsApi.activiti.taskApi.createNewTask({ name: taskTaskApp });
|
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 applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
|
@@ -15,10 +15,9 @@
|
|||||||
* limitations under the License.
|
* 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 { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
import { FormModelActions } from '../actions/APS/form-model.actions';
|
import { FormModelActions } from '../actions/APS/form-model.actions';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { StandaloneTask } from '../models/APS/standalone-task';
|
import { StandaloneTask } from '../models/APS/standalone-task';
|
||||||
@@ -170,12 +169,11 @@ describe('Task Details - Form', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const formActions = new FormModelActions();
|
const formActions = new FormModelActions();
|
||||||
let app, appActions: AppsActions;
|
let app;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||||
appActions = new AppsActions();
|
const applicationsService = new ApplicationsUtil(this.alfrescoJsApi);
|
||||||
const applicationsService = new ApplicationService(this.alfrescoJsApi);
|
|
||||||
await applicationsService.importPublishDeployApp(app.file_path);
|
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 () => {
|
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 filtersPage.goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||||
await tasksListPage.checkTaskListIsLoaded();
|
await tasksListPage.checkTaskListIsLoaded();
|
||||||
@@ -378,7 +376,7 @@ describe('Task Details - Form', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C212922] Should a User task form be refreshed, saved or completed.', async () => {
|
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 filtersPage.goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||||
await tasksListPage.checkTaskListIsLoaded();
|
await tasksListPage.checkTaskListIsLoaded();
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../util/constants');
|
import CONSTANTS = require('../util/constants');
|
||||||
@@ -23,7 +23,6 @@ import { Tenant } from '../models/APS/tenant';
|
|||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
|
|
||||||
describe('Task Details - No form', () => {
|
describe('Task Details - No form', () => {
|
||||||
|
|
||||||
@@ -33,7 +32,6 @@ describe('Task Details - No form', () => {
|
|||||||
const app = browser.params.resources.Files.NO_FORM_APP;
|
const app = browser.params.resources.Files.NO_FORM_APP;
|
||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const noFormMessage = 'No forms attached';
|
const noFormMessage = 'No forms attached';
|
||||||
const apps = new AppsActions();
|
|
||||||
let importedApp;
|
let importedApp;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
@@ -48,9 +46,9 @@ describe('Task Details - No form', () => {
|
|||||||
processUserModel = await users.createApsUser(this.alfrescoJsApi, id);
|
processUserModel = await users.createApsUser(this.alfrescoJsApi, id);
|
||||||
|
|
||||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -21,11 +21,10 @@ import { Tenant } from '../models/APS/tenant';
|
|||||||
import Task = require('../models/APS/Task');
|
import Task = require('../models/APS/Task');
|
||||||
import TaskModel = require('../models/APS/TaskModel');
|
import TaskModel = require('../models/APS/TaskModel');
|
||||||
import FormModel = require('../models/APS/FormModel');
|
import FormModel = require('../models/APS/FormModel');
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||||
import CONSTANTS = require('../util/constants');
|
import CONSTANTS = require('../util/constants');
|
||||||
import moment = require('moment');
|
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 { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||||
import { browser } from 'protractor';
|
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 tasks = ['Modifying task', 'Information box', 'No form', 'Not Created', 'Refreshing form', 'Assignee task', 'Attach File'];
|
||||||
const TASK_DATE_FORMAT = 'll';
|
const TASK_DATE_FORMAT = 'll';
|
||||||
let formModel;
|
let formModel;
|
||||||
let apps;
|
|
||||||
|
|
||||||
const taskFormModel = {
|
const taskFormModel = {
|
||||||
'name': StringUtil.generateRandomString(),
|
'name': StringUtil.generateRandomString(),
|
||||||
@@ -51,7 +49,6 @@ describe('Task Details component', () => {
|
|||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const users = new UsersActions();
|
const users = new UsersActions();
|
||||||
apps = new AppsActions();
|
|
||||||
|
|
||||||
this.alfrescoJsApi = new AlfrescoApi({
|
this.alfrescoJsApi = new AlfrescoApi({
|
||||||
provider: 'BPM',
|
provider: 'BPM',
|
||||||
@@ -63,7 +60,7 @@ describe('Task Details component', () => {
|
|||||||
processUserModel = await users.createApsUser(this.alfrescoJsApi, id);
|
processUserModel = await users.createApsUser(this.alfrescoJsApi, id);
|
||||||
|
|
||||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
@@ -140,7 +137,7 @@ describe('Task Details component', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C286706] Should display task details for task - Task App', async () => {
|
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();
|
await (await processServices.goToTaskApp()).clickTasksButton();
|
||||||
|
|
||||||
@@ -174,7 +171,7 @@ describe('Task Details component', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C286705] Should display task details for task - Custom App', async () => {
|
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 (await processServices.goToTaskApp()).clickTasksButton();
|
||||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
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 () => {
|
it('[C286707] Should display task details for subtask - Custom App', async () => {
|
||||||
const checklistName = 'CustomAppChecklist';
|
const checklistName = 'CustomAppChecklist';
|
||||||
|
|
||||||
await apps.startProcess(this.alfrescoJsApi, appModel);
|
await new ProcessUtil(this.alfrescoJsApi).startProcessOfApp(appModel.name);
|
||||||
|
|
||||||
await (await processServices.goToTaskApp()).clickTasksButton();
|
await (await processServices.goToTaskApp()).clickTasksButton();
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||||
@@ -59,7 +59,7 @@ describe('Task', () => {
|
|||||||
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||||
|
|
||||||
await this.alfrescoJsApi.login(user.email, user.password);
|
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);
|
const { id } = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
appId = id;
|
appId = id;
|
||||||
|
|
||||||
@@ -112,11 +112,6 @@ describe('Task', () => {
|
|||||||
await taskFiltersDemoPage.involvedTasksFilter().checkTaskFilterIsDisplayed();
|
await taskFiltersDemoPage.involvedTasksFilter().checkTaskFilterIsDisplayed();
|
||||||
await taskFiltersDemoPage.completedTasksFilter().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();
|
const task = await tasksPage.createNewTask();
|
||||||
await task.addName('Test');
|
await task.addName('Test');
|
||||||
await task.clickStartButton();
|
await task.clickStartButton();
|
||||||
@@ -209,7 +204,7 @@ describe('Task', () => {
|
|||||||
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||||
|
|
||||||
await this.alfrescoJsApi.login(user.email, user.password);
|
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 importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
const appDefinitions = await this.alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await this.alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
appId = appDefinitions.data.find((currentApp) => currentApp.modelId === importedApp.id).id;
|
appId = appDefinitions.data.find((currentApp) => currentApp.modelId === importedApp.id).id;
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
import { ProcessServicesPage } from '../pages/adf/process-services/process-services.page';
|
||||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||||
@@ -61,7 +61,7 @@ describe('Task Filters Sorting', () => {
|
|||||||
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||||
|
|
||||||
await this.alfrescoJsApi.login(user.email, user.password);
|
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 importedApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
const appDefinitions = await this.alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await this.alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
appId = appDefinitions.data.find((currentApp) => currentApp.modelId === importedApp.id).id;
|
appId = appDefinitions.data.find((currentApp) => currentApp.modelId === importedApp.id).id;
|
||||||
|
@@ -15,10 +15,9 @@
|
|||||||
* limitations under the License.
|
* 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 { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { AppsActions } from '../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../actions/users.actions';
|
import { UsersActions } from '../actions/users.actions';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||||
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
import { TasksPage } from '../pages/adf/process-services/tasks.page';
|
||||||
@@ -51,7 +50,6 @@ describe('Task List Pagination', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const apps = new AppsActions();
|
|
||||||
const users = new UsersActions();
|
const users = new UsersActions();
|
||||||
|
|
||||||
this.alfrescoJsApi = new AlfrescoApi({
|
this.alfrescoJsApi = new AlfrescoApi({
|
||||||
@@ -63,11 +61,11 @@ describe('Task List Pagination', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(this.alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||||
|
|
||||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
const resultApp = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
for (let i = 0; i < nrOfTasks; i++) {
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -31,7 +30,6 @@ describe('Amount Widget', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.AMOUNT;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.AMOUNT;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -49,14 +47,15 @@ describe('Amount Widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { FileModel } from '../../models/ACS/file.model';
|
import { FileModel } from '../../models/ACS/file.model';
|
||||||
@@ -54,7 +54,7 @@ describe('Attach widget - File', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(this.alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||||
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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 applicationsService.importPublishDeployApp(app.file_path);
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -29,7 +28,6 @@ describe('Attach Folder widget', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.ATTACH_FOLDER;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.ATTACH_FOLDER;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -47,14 +45,15 @@ describe('Attach Folder widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -30,7 +29,6 @@ describe('Checkbox Widget', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.CHECKBOX;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.CHECKBOX;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -48,14 +46,14 @@ describe('Checkbox Widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -30,7 +29,6 @@ describe('Date and time widget', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DATETIME;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DATETIME;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -48,14 +46,14 @@ describe('Date and time widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -33,7 +32,6 @@ describe('Date widget', () => {
|
|||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
const dateWidget = widget.dateWidget();
|
const dateWidget = widget.dateWidget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DATE;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DATE;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -51,14 +49,14 @@ describe('Date widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -30,7 +29,6 @@ describe('Document Template widget', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.FILE_FORM_ADF;
|
const app = browser.params.resources.Files.FILE_FORM_ADF;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -48,14 +46,14 @@ describe('Document Template widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
||||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||||
appModel = await applicationsService.importPublishDeployApp( app.file_path);
|
appModel = await applicationsService.importPublishDeployApp( app.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -30,7 +29,6 @@ describe('Dropdown widget', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DROPDOWN;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DROPDOWN;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -48,14 +46,14 @@ describe('Dropdown widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -29,7 +28,6 @@ describe('Dynamic Table widget ', () => {
|
|||||||
const loginPage = new LoginPage();
|
const loginPage = new LoginPage();
|
||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
const appsActions = new AppsActions();
|
|
||||||
const users = new UsersActions();
|
const users = new UsersActions();
|
||||||
const navigationBarPage = new NavigationBarPage();
|
const navigationBarPage = new NavigationBarPage();
|
||||||
const alfrescoJsApi = new AlfrescoApi({
|
const alfrescoJsApi = new AlfrescoApi({
|
||||||
@@ -49,12 +47,12 @@ describe('Dynamic Table widget ', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => currentApp.modelId === appModel.id);
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -99,12 +97,12 @@ describe('Dynamic Table widget ', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => currentApp.modelId === appModel.id);
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -156,12 +154,12 @@ describe('Dynamic Table widget ', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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 application = await applicationsService.importPublishDeployApp(app.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => currentApp.modelId === application.id);
|
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 () => {
|
afterAll(async () => {
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -30,7 +29,6 @@ describe('Header widget', async () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.HEADER;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.HEADER;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -48,14 +46,14 @@ describe('Header widget', async () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -30,7 +29,6 @@ describe('Hyperlink widget', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.HYPERLINK;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.HYPERLINK;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -48,14 +46,14 @@ describe('Hyperlink widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -30,7 +29,6 @@ describe('Multi-line Widget', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.MULTILINE_TEXT;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.MULTILINE_TEXT;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -48,14 +46,14 @@ describe('Multi-line Widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -30,7 +29,6 @@ describe('Number widget', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.NUMBER;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.NUMBER;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -48,14 +46,14 @@ describe('Number widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { UsersActions } from '../../actions/users.actions';
|
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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { User } from '../../models/APS/user';
|
import { User } from '../../models/APS/user';
|
||||||
@@ -46,7 +46,7 @@ describe('People and Group widget', () => {
|
|||||||
|
|
||||||
await alfrescoJsApi.login(user.email, user.password);
|
await alfrescoJsApi.login(user.email, user.password);
|
||||||
try {
|
try {
|
||||||
const applicationsService = new ApplicationService(alfrescoJsApi);
|
const applicationsService = new ApplicationsUtil(alfrescoJsApi);
|
||||||
await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
||||||
} catch (e) { console.error('failed to deploy the application'); }
|
} catch (e) { console.error('failed to deploy the application'); }
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -30,7 +29,6 @@ describe('People widget', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.ADD_PEOPLE;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.ADD_PEOPLE;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -48,14 +46,14 @@ describe('People widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -30,7 +29,6 @@ describe('Radio Buttons Widget', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.RADIO_BUTTONS;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.RADIO_BUTTONS;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -48,7 +46,7 @@ describe('Radio Buttons Widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
@@ -56,7 +54,7 @@ describe('Radio Buttons Widget', () => {
|
|||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -16,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { UsersActions } from '../../actions/users.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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
@@ -30,7 +29,6 @@ describe('Text widget', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.TEXT;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.TEXT;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -48,14 +46,14 @@ describe('Text widget', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { UsersActions } from '../../actions/users.actions';
|
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 { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { User } from '../../models/APS/user';
|
import { User } from '../../models/APS/user';
|
||||||
@@ -44,7 +44,7 @@ describe('Typeahead widget', () => {
|
|||||||
user = await usersActions.createTenantAndUser(alfrescoJsApi);
|
user = await usersActions.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(user.email, user.password);
|
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 applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
||||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||||
});
|
});
|
||||||
|
@@ -16,11 +16,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
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 { browser } from 'protractor';
|
||||||
import { UsersActions } from '../../actions/users.actions';
|
import { UsersActions } from '../../actions/users.actions';
|
||||||
import CONSTANTS = require('../../util/constants');
|
import CONSTANTS = require('../../util/constants');
|
||||||
import { AppsActions } from '../../actions/APS/apps.actions';
|
|
||||||
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
import { TasksPage } from '../../pages/adf/process-services/tasks.page';
|
||||||
|
|
||||||
const widgets = {
|
const widgets = {
|
||||||
@@ -53,7 +52,6 @@ describe('Process-Services - Visibility conditions', () => {
|
|||||||
const taskPage = new TasksPage();
|
const taskPage = new TasksPage();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
let alfrescoJsApi;
|
let alfrescoJsApi;
|
||||||
const appsActions = new AppsActions();
|
|
||||||
let appModel;
|
let appModel;
|
||||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.VISIBILITY;
|
const app = browser.params.resources.Files.WIDGET_CHECK_APP.VISIBILITY;
|
||||||
let deployedApp, process;
|
let deployedApp, process;
|
||||||
@@ -71,14 +69,14 @@ describe('Process-Services - Visibility conditions', () => {
|
|||||||
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
processUserModel = await users.createTenantAndUser(alfrescoJsApi);
|
||||||
|
|
||||||
await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
|
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);
|
appModel = await applicationsService.importPublishDeployApp(browser.params.resources.Files.WIDGET_CHECK_APP.file_path);
|
||||||
|
|
||||||
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
const appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||||
return currentApp.modelId === appModel.id;
|
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);
|
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ export class AppPublish {
|
|||||||
force: boolean = true;
|
force: boolean = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ApplicationService {
|
export class ApplicationsUtil {
|
||||||
|
|
||||||
api: AlfrescoApi;
|
api: AlfrescoApi;
|
||||||
|
|
||||||
@@ -54,4 +54,16 @@ export class ApplicationService {
|
|||||||
Logger.error('Import Application - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
Logger.error('Import Application - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getAppDefinitionByName(appName): Promise<any> {
|
||||||
|
try {
|
||||||
|
const appDefinitionsList = await this.api.activiti.appsApi.getAppDefinitions();
|
||||||
|
const appDefinition = appDefinitionsList.data.filter((currentApp) => {
|
||||||
|
return currentApp.name === appName;
|
||||||
|
});
|
||||||
|
return appDefinition;
|
||||||
|
} catch (error) {
|
||||||
|
Logger.error('Get AppDefinitions - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@@ -27,7 +27,7 @@ export class ModelsActions {
|
|||||||
|
|
||||||
async deleteVersionModel(modelId) {
|
async deleteVersionModel(modelId) {
|
||||||
try {
|
try {
|
||||||
return this.api.activiti.modelsApi.deleteModel(modelId, { cascade: false, deleteRuntimeApp : true });
|
return await this.api.activiti.modelsApi.deleteModel(modelId, { cascade: false, deleteRuntimeApp : true });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Logger.error('Delete Model Version - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
Logger.error('Delete Model Version - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ export class ModelsActions {
|
|||||||
|
|
||||||
async deleteEntireModel(modelId) {
|
async deleteEntireModel(modelId) {
|
||||||
try {
|
try {
|
||||||
return this.api.activiti.modelsApi.deleteModel(modelId, { cascade: true, deleteRuntimeApp : true });
|
return await this.api.activiti.modelsApi.deleteModel(modelId, { cascade: true, deleteRuntimeApp : true });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Logger.error('Delete Model - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
Logger.error('Delete Model - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||||
}
|
}
|
||||||
|
87
lib/testing/src/lib/core/actions/APS/process.util.ts
Normal file
87
lib/testing/src/lib/core/actions/APS/process.util.ts
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
/*!
|
||||||
|
* @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 { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
|
import { ApplicationsUtil } from './applications.util';
|
||||||
|
import { Logger } from '../../utils/logger';
|
||||||
|
import { StringUtil } from '../../utils/string.util';
|
||||||
|
|
||||||
|
export class ProcessUtil {
|
||||||
|
|
||||||
|
api: AlfrescoApi;
|
||||||
|
|
||||||
|
constructor(api: AlfrescoApi) {
|
||||||
|
this.api = api;
|
||||||
|
}
|
||||||
|
|
||||||
|
async startProcessByDefinitionName(appName: string, processDefinitionName: string): Promise<any> {
|
||||||
|
try {
|
||||||
|
const appDefinition = await new ApplicationsUtil(this.api).getAppDefinitionByName(appName);
|
||||||
|
|
||||||
|
const processDefinition = await this.getProcessDefinitionByName(appDefinition.deploymentId, processDefinitionName);
|
||||||
|
|
||||||
|
const startProcessOptions: any = { processDefinitionId: processDefinition.id, name: processDefinitionName };
|
||||||
|
|
||||||
|
return this.api.activiti.processApi.startNewProcessInstance(startProcessOptions);
|
||||||
|
} catch (error) {
|
||||||
|
Logger.error('Start Process - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async startProcessOfApp(appName: string, processName?: string): Promise<any> {
|
||||||
|
try {
|
||||||
|
const appDefinition = await new ApplicationsUtil(this.api).getAppDefinitionByName(appName);
|
||||||
|
const processDefinitionList = await this.api.activiti.processApi.getProcessDefinitions({ deploymentId: appDefinition.deploymentId });
|
||||||
|
const startProcessOptions: any = { processDefinitionId: processDefinitionList.data[0].id, name: processName ? processName : StringUtil.generateRandomString(5).toLowerCase() };
|
||||||
|
return this.api.activiti.processApi.startNewProcessInstance(startProcessOptions);
|
||||||
|
} catch (error) {
|
||||||
|
Logger.error('Start Process - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async cancelProcessInstance(processInstance: string): Promise<any> {
|
||||||
|
try {
|
||||||
|
return this.api.activiti.processApi.deleteProcessInstance(processInstance);
|
||||||
|
} catch (error) {
|
||||||
|
Logger.error('Cancel Process - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async getProcessDefinitionByName(deploymentId: string, processName: string): Promise<any> {
|
||||||
|
try {
|
||||||
|
const processDefinitionList = await this.api.activiti.processApi.getProcessDefinitions({ deploymentId: deploymentId });
|
||||||
|
const chosenProcess = processDefinitionList.data.find( (processDefinition) => {
|
||||||
|
return processDefinition.name === processName;
|
||||||
|
});
|
||||||
|
return chosenProcess;
|
||||||
|
} catch (error) {
|
||||||
|
Logger.error('Get ProcessDefinitions - Service error, Response: ', JSON.parse(JSON.stringify(error)).response.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async getProcessTaskId(processId: string): Promise<string> {
|
||||||
|
const taskList = await this.api.activiti.taskApi.listTasks({});
|
||||||
|
let wantedtask;
|
||||||
|
|
||||||
|
taskList.data.forEach((task) => {
|
||||||
|
if (task.processInstanceId === processId) {
|
||||||
|
wantedtask = task;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return wantedtask ? wantedtask : 'null';
|
||||||
|
}
|
||||||
|
}
|
@@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from './applications.service';
|
export * from './applications.util';
|
||||||
|
export * from './process.util';
|
||||||
export * from './models.service';
|
export * from './models.service';
|
||||||
export * from './integration.service';
|
export * from './integration.service';
|
||||||
|
68
lib/testing/src/lib/process-services/pages/filters.page.ts
Normal file
68
lib/testing/src/lib/process-services/pages/filters.page.ts
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
/*!
|
||||||
|
* @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 { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||||
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
|
import { by, element, ElementFinder, Locator } from 'protractor';
|
||||||
|
|
||||||
|
export class FiltersPage {
|
||||||
|
|
||||||
|
accordionMenu: ElementFinder = element(by.css('.app-processes-menu mat-accordion'));
|
||||||
|
buttonWindow: ElementFinder = element(by.css('div > button[data-automation-id="btn-start-process"] > div'));
|
||||||
|
processIcon: Locator = by.xpath('ancestor::div[@class="mat-list-item-content"]/mat-icon');
|
||||||
|
|
||||||
|
async clickFilterButton(filterElement: ElementFinder): Promise<void> {
|
||||||
|
await BrowserActions.click(filterElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
async isFilterEnabled(filterElement: ElementFinder): Promise<boolean> {
|
||||||
|
return filterElement.isEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
async isFilterHighlighted(filterName): Promise<boolean> {
|
||||||
|
const processNameHighlighted: ElementFinder = element(by.css(`mat-list-item.adf-active span[data-automation-id='${filterName}_filter']`));
|
||||||
|
try {
|
||||||
|
await BrowserVisibility.waitUntilElementIsVisible(processNameHighlighted);
|
||||||
|
return true;
|
||||||
|
} catch (error) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async isFilterDisplayed(name): Promise<boolean> {
|
||||||
|
const filterName: ElementFinder = element(by.css(`span[data-automation-id='${name}_filter']`));
|
||||||
|
try {
|
||||||
|
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||||
|
return true;
|
||||||
|
} catch (error) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async checkFilterHasNoIcon(name): Promise<void> {
|
||||||
|
const filterName: ElementFinder = element(by.css(`span[data-automation-id='${name}_filter']`));
|
||||||
|
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||||
|
await BrowserVisibility.waitUntilElementIsNotVisible(filterName.element(this.processIcon));
|
||||||
|
}
|
||||||
|
|
||||||
|
async getFilterIcon(name): Promise<string> {
|
||||||
|
const filterName: ElementFinder = element(by.css(`span[data-automation-id='${name}_filter']`));
|
||||||
|
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||||
|
const icon = filterName.element(this.processIcon);
|
||||||
|
return BrowserActions.getText(icon);
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,65 @@
|
|||||||
|
/*!
|
||||||
|
* @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, ElementFinder } from 'protractor';
|
||||||
|
import { FiltersPage } from './filters.page';
|
||||||
|
|
||||||
|
export class ProcessFiltersPage {
|
||||||
|
|
||||||
|
filtersPage = new FiltersPage();
|
||||||
|
|
||||||
|
runningFilter: ElementFinder = element(by.css('span[data-automation-id="Running_filter"]'));
|
||||||
|
completedFilter: ElementFinder = element(by.css('div[class="mat-list-text"] > span[data-automation-id="Completed_filter"]'));
|
||||||
|
allFilter: ElementFinder = element(by.css('span[data-automation-id="All_filter"]'));
|
||||||
|
accordionMenu: ElementFinder = element(by.css('.app-processes-menu mat-accordion'));
|
||||||
|
|
||||||
|
async clickRunningFilterButton(): Promise<void> {
|
||||||
|
await this.filtersPage.clickFilterButton(this.runningFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
async clickCompletedFilterButton(): Promise<void> {
|
||||||
|
await this.filtersPage.clickFilterButton(this.completedFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
async clickAllFilterButton(): Promise<void> {
|
||||||
|
await this.filtersPage.clickFilterButton(this.allFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
async isRunningFilterHighlighted(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterHighlighted('Running');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isCompletedFilterHighlighted(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterHighlighted('Completed');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isAllFilterHighlighted(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterHighlighted('All');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isRunningFilterDisplayed(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterDisplayed('Running');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isCompletedFilterDisplayed(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterDisplayed('Completed');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isAllFilterDisplayed(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterDisplayed('All');
|
||||||
|
}
|
||||||
|
}
|
@@ -19,11 +19,16 @@ import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
|||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element, ElementFinder } from 'protractor';
|
||||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
|
|
||||||
export class StartProcessDialog {
|
export class ProcessInstanceTasksPage {
|
||||||
|
|
||||||
startProcessDialog: ElementFinder = element(by.id('adf-start-process-dialog'));
|
startProcessDialog: ElementFinder = element(by.id('adf-start-process-dialog'));
|
||||||
title: ElementFinder = this.startProcessDialog.element(by.css('h4.mat-dialog-title'));
|
title: ElementFinder = this.startProcessDialog.element(by.css('h4.mat-dialog-title'));
|
||||||
closeButton: ElementFinder = this.startProcessDialog.element(by.cssContainingText(`div.adf-start-process-dialog-actions button span`, 'Close'));
|
closeButton: ElementFinder = this.startProcessDialog.element(by.cssContainingText(`div.adf-start-process-dialog-actions button span`, 'Close'));
|
||||||
|
startForm: ElementFinder = element(by.css('div[data-automation-id="start-form"]'));
|
||||||
|
|
||||||
|
async clickOnStartForm(): Promise<void> {
|
||||||
|
await BrowserActions.click(this.startForm);
|
||||||
|
}
|
||||||
|
|
||||||
async checkStartProcessDialogIsDisplayed(): Promise<void> {
|
async checkStartProcessDialogIsDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.startProcessDialog);
|
await BrowserVisibility.waitUntilElementIsVisible(this.startProcessDialog);
|
@@ -0,0 +1,48 @@
|
|||||||
|
/*!
|
||||||
|
* @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 { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||||
|
import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
|
||||||
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
|
import { element, by, ElementFinder } from 'protractor';
|
||||||
|
|
||||||
|
export class ProcessListPage {
|
||||||
|
|
||||||
|
processListEmptyTitle: ElementFinder = element(by.css('div[class="adf-empty-content__title"]'));
|
||||||
|
processInstanceList: ElementFinder = element(by.css('adf-process-instance-list'));
|
||||||
|
dataTable: DataTableComponentPage = new DataTableComponentPage(this.processInstanceList);
|
||||||
|
|
||||||
|
getDisplayedProcessListEmptyTitle(): Promise<string> {
|
||||||
|
return BrowserActions.getText(this.processListEmptyTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
titleNotPresent(): Promise<string> {
|
||||||
|
return BrowserVisibility.waitUntilElementIsNotPresent(this.processListEmptyTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
async checkProcessListIsDisplayed(): Promise<void> {
|
||||||
|
await BrowserVisibility.waitUntilElementIsVisible(this.processInstanceList);
|
||||||
|
}
|
||||||
|
|
||||||
|
checkContentIsDisplayedByColumn(column: string, processName: string): Promise<void> {
|
||||||
|
return this.dataTable.checkContentIsDisplayed(column, processName);
|
||||||
|
}
|
||||||
|
|
||||||
|
checkContentIsNotDisplayedByColumn(column: string, processName: string): Promise<void> {
|
||||||
|
return this.dataTable.checkContentIsNotDisplayed(column, processName);
|
||||||
|
}
|
||||||
|
}
|
@@ -16,5 +16,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export * from './form-fields.page';
|
export * from './form-fields.page';
|
||||||
export * from './start-process-dialog.page';
|
export * from './filters.page';
|
||||||
|
export * from './process-filters.page';
|
||||||
|
export * from './process-list.page';
|
||||||
|
export * from './task-list.page';
|
||||||
|
export * from './task-filters.page';
|
||||||
|
export * from './process-instance-tasks.page';
|
||||||
|
export * from './start-process.page';
|
||||||
export * from './select-apps-dialog.page';
|
export * from './select-apps-dialog.page';
|
||||||
|
@@ -16,7 +16,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { by, element, Key, protractor, browser, ElementFinder } from 'protractor';
|
import { by, element, Key, protractor, browser, ElementFinder } from 'protractor';
|
||||||
import { BrowserVisibility, BrowserActions, FormFields, DropdownPage } from '@alfresco/adf-testing';
|
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||||
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
|
import { DropdownPage } from '../../material/pages/dropdown.page';
|
||||||
|
import { FormFields } from '../../core/pages/form/form-fields';
|
||||||
|
|
||||||
export class StartProcessPage {
|
export class StartProcessPage {
|
||||||
|
|
||||||
@@ -28,7 +31,7 @@ export class StartProcessPage {
|
|||||||
startProcessButton: ElementFinder = element(by.css('button[data-automation-id="btn-start"]'));
|
startProcessButton: ElementFinder = element(by.css('button[data-automation-id="btn-start"]'));
|
||||||
noProcess: ElementFinder = element(by.id('no-process-message'));
|
noProcess: ElementFinder = element(by.id('no-process-message'));
|
||||||
processDefinition: ElementFinder = element(by.css('input[id="processDefinitionName"]'));
|
processDefinition: ElementFinder = element(by.css('input[id="processDefinitionName"]'));
|
||||||
processDefinitionOptionsPanel: ElementFinder = element(by.css('div[class*="processDefinitionOptions"]'));
|
processDefinitionOptionsPanel: ElementFinder = element(by.css('div[class*="mat-autocomplete-panel"]'));
|
||||||
|
|
||||||
dropdownPage = new DropdownPage();
|
dropdownPage = new DropdownPage();
|
||||||
|
|
@@ -0,0 +1,78 @@
|
|||||||
|
/*!
|
||||||
|
* @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, ElementFinder } from 'protractor';
|
||||||
|
import { FiltersPage } from './filters.page';
|
||||||
|
|
||||||
|
export class TaskFiltersPage {
|
||||||
|
|
||||||
|
filtersPage = new FiltersPage();
|
||||||
|
|
||||||
|
myTasks: ElementFinder = element(by.css('span[data-automation-id="My Tasks_filter"]'));
|
||||||
|
queuedTask: ElementFinder = element(by.css('span[data-automation-id="Queued Tasks_filter"]'));
|
||||||
|
completedTask: ElementFinder = element(by.css('span[data-automation-id="Completed Tasks_filter"]'));
|
||||||
|
involvedTask: ElementFinder = element(by.css('span[data-automation-id="Involved Tasks_filter"]'));
|
||||||
|
accordionMenu: ElementFinder = element(by.css('.app-processes-menu mat-accordion'));
|
||||||
|
|
||||||
|
async clickMyTasksFilterButton(): Promise<void> {
|
||||||
|
await this.filtersPage.clickFilterButton(this.myTasks);
|
||||||
|
}
|
||||||
|
|
||||||
|
async clickQueuedFilterButton(): Promise<void> {
|
||||||
|
await this.filtersPage.clickFilterButton(this.queuedTask);
|
||||||
|
}
|
||||||
|
|
||||||
|
async clickCompletedFilterButton(): Promise<void> {
|
||||||
|
await this.filtersPage.clickFilterButton(this.completedTask);
|
||||||
|
}
|
||||||
|
|
||||||
|
async clickInvolvedFilterButton(): Promise<void> {
|
||||||
|
await this.filtersPage.clickFilterButton(this.involvedTask);
|
||||||
|
}
|
||||||
|
|
||||||
|
async isMyTasksFilterHighlighted(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterHighlighted('My Tasks');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isQueuedFilterHighlighted(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterHighlighted('Queued Tasks');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isCompletedFilterHighlighted(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterHighlighted('Completed Tasks');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isInvolvedFilterHighlighted(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterHighlighted('Involved Tasks');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isMyTasksFilterDisplayed(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterDisplayed('My Tasks');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isQueuedFilterDisplayed(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterDisplayed('Queued Tasks');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isCompletedFilterDisplayed(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterDisplayed('Completed Tasks');
|
||||||
|
}
|
||||||
|
|
||||||
|
async isInvolvedFilterDisplayed(): Promise<boolean> {
|
||||||
|
return this.filtersPage.isFilterDisplayed('Involved Tasks');
|
||||||
|
}
|
||||||
|
}
|
64
lib/testing/src/lib/process-services/pages/task-list.page.ts
Normal file
64
lib/testing/src/lib/process-services/pages/task-list.page.ts
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
/*!
|
||||||
|
* @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 { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||||
|
import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
|
||||||
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
|
import { element, by, ElementFinder } from 'protractor';
|
||||||
|
|
||||||
|
export class TaskListPage {
|
||||||
|
|
||||||
|
noTasksFound: ElementFinder = element(by.css('div[class="adf-empty-content__title"]'));
|
||||||
|
taskList: ElementFinder = element(by.css('adf-tasklist'));
|
||||||
|
dataTable: DataTableComponentPage = new DataTableComponentPage(this.taskList);
|
||||||
|
|
||||||
|
getDataTable() {
|
||||||
|
return this.dataTable;
|
||||||
|
}
|
||||||
|
|
||||||
|
getRowsDisplayedWithSameName(taskName): Promise<string> {
|
||||||
|
return this.dataTable.getRowsWithSameColumnValues('Name', taskName);
|
||||||
|
}
|
||||||
|
|
||||||
|
checkContentIsDisplayedByColumn(column: string, processName: string): Promise<void> {
|
||||||
|
return this.dataTable.checkContentIsDisplayed(column, processName);
|
||||||
|
}
|
||||||
|
|
||||||
|
checkContentIsNotDisplayedByColumn(column: string, processName: string): Promise<void> {
|
||||||
|
return this.dataTable.checkContentIsNotDisplayed(column, processName);
|
||||||
|
}
|
||||||
|
|
||||||
|
async checkTaskListIsLoaded(): Promise<void> {
|
||||||
|
await BrowserVisibility.waitUntilElementIsVisible(this.taskList);
|
||||||
|
}
|
||||||
|
|
||||||
|
getNoTasksFoundMessage(): Promise<string> {
|
||||||
|
return BrowserActions.getText(this.noTasksFound);
|
||||||
|
}
|
||||||
|
|
||||||
|
checkRowIsSelected(taskName): Promise<void> {
|
||||||
|
return this.dataTable.checkRowIsSelected('Name', taskName);
|
||||||
|
}
|
||||||
|
|
||||||
|
selectRow(taskName): Promise<void> {
|
||||||
|
return this.dataTable.selectRow('Name', taskName);
|
||||||
|
}
|
||||||
|
|
||||||
|
getAllRowsNameColumn(): Promise<any> {
|
||||||
|
return this.dataTable.getAllRowsColumnValues('Name');
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user