mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-23 18:05:09 +00:00
[ADF-3430] E2E for using fields to filter Process List (#4040)
This commit is contained in:
parent
9fd9e7f4a9
commit
71c0fd0046
@ -3,9 +3,9 @@
|
||||
<form [formGroup]="processListForm">
|
||||
<mat-form-field>
|
||||
<mat-label>App Id</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[formControl]="processAppId">
|
||||
<input data-automation-id="app-id"
|
||||
matInput
|
||||
[formControl]="processAppId">
|
||||
<mat-error *ngIf="processAppId.hasError('required')">
|
||||
{{ 'PROCESS_LIST_DEMO.ERROR_MESSAGE.APP_ID_REQUIRED_ERROR' | translate }}
|
||||
</mat-error>
|
||||
@ -19,25 +19,25 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>ProcessInstanceId</mat-label>
|
||||
<input
|
||||
matInput
|
||||
class="form-control"
|
||||
[formControl]="processInstanceId">
|
||||
<input data-automation-id="process-instance-id"
|
||||
matInput
|
||||
class="form-control"
|
||||
[formControl]="processInstanceId">
|
||||
<mat-hint>SimpleProcess:1:2</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>ProcessDefinitionId</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[formControl]="processDefinitionId">
|
||||
<input data-automation-id="process-definition-id"
|
||||
matInput
|
||||
[formControl]="processDefinitionId">
|
||||
<mat-hint>SimpleProcess:1:2</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>State</mat-label>
|
||||
<mat-select
|
||||
[formControl]="processState">
|
||||
[formControl]="processState" data-automation-id="state">
|
||||
<mat-option *ngFor="let stateOption of stateOptions" [value]="stateOption.value">{{ stateOption.title }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -45,7 +45,7 @@
|
||||
<mat-form-field>
|
||||
<mat-label>Sort</mat-label>
|
||||
<mat-select
|
||||
[formControl]="processSort">
|
||||
[formControl]="processSort" data-automation-id="sort">
|
||||
<mat-option *ngFor="let sortOption of sortOptions" [value]="sortOption.value">{{ sortOption.title }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -109,4 +109,3 @@
|
||||
[target]="processList">
|
||||
</adf-pagination>
|
||||
</div>
|
||||
|
||||
|
@ -14,8 +14,8 @@ Replaces all the white space in a string with a supplied character.
|
||||
<!-- {% raw %} -->
|
||||
|
||||
```HTML
|
||||
<div [id]="'CHECK MY ID' | formatSpace">
|
||||
BATTLESTAR GALACTICA
|
||||
<div [id]="'CHECK MY ID' | formatSpace">
|
||||
BATTLESTAR GALACTICA
|
||||
</div>
|
||||
```
|
||||
|
||||
|
@ -24,6 +24,32 @@ import { browser } from 'protractor';
|
||||
|
||||
export class AppsActions {
|
||||
|
||||
async getProcessTaskId(alfrescoJsApi, processId) {
|
||||
let taskList = await alfrescoJsApi.activiti.taskApi.listTasks();
|
||||
let taskId = -1;
|
||||
|
||||
taskList.data.forEach((task) => {
|
||||
if (task.processInstanceId === processId) {
|
||||
taskId = task.id;
|
||||
}
|
||||
});
|
||||
|
||||
return taskId;
|
||||
}
|
||||
|
||||
async getAppDefinitionId(alfrescoJsApi, appModelId) {
|
||||
let appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
let appDefinitionId = -1;
|
||||
|
||||
appDefinitions.data.forEach((appDefinition) => {
|
||||
if (appDefinition.modelId === appModelId) {
|
||||
appDefinitionId = appDefinition.id;
|
||||
}
|
||||
});
|
||||
|
||||
return appDefinitionId;
|
||||
}
|
||||
|
||||
async importPublishDeployApp(alfrescoJsApi, appFileLocation) {
|
||||
let appCreated = await this.importApp(alfrescoJsApi, appFileLocation);
|
||||
|
||||
|
@ -15,8 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import AppPublish = require('../../models/APS/AppPublish');
|
||||
|
||||
export class AppsRuntimeActions {
|
||||
|
||||
async getRuntimeAppByName(alfrescoJsApi, appName) {
|
||||
|
@ -99,6 +99,7 @@ describe('User Info component', () => {
|
||||
userInfoDialog.APSProfileImageNotDisplayed();
|
||||
userInfoDialog.ACSProfileImageNotDisplayed();
|
||||
userInfoDialog.clickOnProcessServicesTab();
|
||||
userInfoDialog.checkProcessServicesTabIsSelected();
|
||||
|
||||
expect(userInfoDialog.getProcessHeaderTitle()).toEqual(processUserModel.firstName + ' ' + processUserModel.lastName);
|
||||
expect(userInfoDialog.getProcessTitle()).toEqual(processUserModel.firstName + ' ' + processUserModel.lastName);
|
||||
|
@ -25,6 +25,7 @@ import { Tenant } from '../models/APS/tenant';
|
||||
import { User } from '../models/APS/user';
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Analytics Smoke Test', () => {
|
||||
|
||||
|
@ -56,6 +56,6 @@ var FormDefinitionModel = function (fields) {
|
||||
return field[key]===value;
|
||||
})
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = FormDefinitionModel;
|
||||
|
119
e2e/pages/adf/demo-shell/process-services/processListDemoPage.ts
Normal file
119
e2e/pages/adf/demo-shell/process-services/processListDemoPage.ts
Normal file
@ -0,0 +1,119 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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 { Util } from '../../../../util/util';
|
||||
import { DataTablePage } from '../../dataTablePage';
|
||||
import { element, by, protractor } from 'protractor';
|
||||
|
||||
export class ProcessListDemoPage {
|
||||
|
||||
appIdInput = element(by.css('input[data-automation-id="app-id"]'));
|
||||
resetButton = element(by.cssContainingText('button span', 'Reset'));
|
||||
emptyProcessContent = element(by.css('div[class="adf-empty-content"]'));
|
||||
processDefinitionInput = element(by.css('input[data-automation-id="process-definition-id"]'));
|
||||
processInstanceInput = element(by.css('input[data-automation-id="process-instance-id"]'));
|
||||
stateSelector = element(by.css('mat-select[data-automation-id="state"'));
|
||||
sortSelector = element(by.css('mat-select[data-automation-id="sort"'));
|
||||
|
||||
dataTable = new DataTablePage();
|
||||
|
||||
getDisplayedProcessesNames() {
|
||||
return this.dataTable.getAllRowsNameColumn();
|
||||
}
|
||||
|
||||
selectSorting(sort) {
|
||||
Util.waitUntilElementIsVisible(this.stateSelector);
|
||||
this.sortSelector.click();
|
||||
let sortLocator = element(by.cssContainingText('mat-option span', sort));
|
||||
Util.waitUntilElementIsVisible(sortLocator);
|
||||
sortLocator.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
selectStateFilter(state) {
|
||||
Util.waitUntilElementIsVisible(this.stateSelector);
|
||||
this.stateSelector.click();
|
||||
let stateLocator = element(by.cssContainingText('mat-option span', state));
|
||||
Util.waitUntilElementIsVisible(stateLocator);
|
||||
stateLocator.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
addAppId(appId) {
|
||||
Util.waitUntilElementIsVisible(this.appIdInput);
|
||||
this.appIdInput.click();
|
||||
this.appIdInput.sendKeys(protractor.Key.ENTER);
|
||||
this.appIdInput.clear();
|
||||
return this.appIdInput.sendKeys(appId);
|
||||
}
|
||||
|
||||
clickResetButton() {
|
||||
Util.waitUntilElementIsVisible(this.resetButton);
|
||||
return this.resetButton.click();
|
||||
}
|
||||
|
||||
checkErrorMessageIsDisplayed(error) {
|
||||
let errorMessage = element(by.cssContainingText('mat-error', error));
|
||||
Util.waitUntilElementIsVisible(errorMessage);
|
||||
}
|
||||
|
||||
checkNoProcessFoundIsDisplayed() {
|
||||
return Util.waitUntilElementIsVisible(this.emptyProcessContent);
|
||||
}
|
||||
|
||||
checkProcessIsNotDisplayed(processName) {
|
||||
return this.dataTable.checkRowIsNotDisplayedByName(processName);
|
||||
}
|
||||
|
||||
checkProcessIsDisplayed(processName) {
|
||||
return this.dataTable.checkRowIsDisplayedByName(processName);
|
||||
}
|
||||
|
||||
checkAppIdFieldIsDisplayed() {
|
||||
Util.waitUntilElementIsVisible(this.appIdInput);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkProcessInstanceIdFieldIsDisplayed() {
|
||||
Util.waitUntilElementIsVisible(this.processInstanceInput);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkStateFieldIsDisplayed() {
|
||||
Util.waitUntilElementIsVisible(this.stateSelector);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSortFieldIsDisplayed() {
|
||||
Util.waitUntilElementIsVisible(this.sortSelector);
|
||||
return this;
|
||||
}
|
||||
|
||||
addProcessDefinitionId(procDefinitionId) {
|
||||
Util.waitUntilElementIsVisible(this.processDefinitionInput);
|
||||
this.processDefinitionInput.click();
|
||||
this.processDefinitionInput.clear();
|
||||
return this.processDefinitionInput.sendKeys(procDefinitionId);
|
||||
}
|
||||
|
||||
addProcessInstanceId(procInstanceId) {
|
||||
Util.waitUntilElementIsVisible(this.processInstanceInput);
|
||||
this.processInstanceInput.click();
|
||||
this.processInstanceInput.clear();
|
||||
return this.processInstanceInput.sendKeys(procInstanceId);
|
||||
}
|
||||
}
|
@ -21,7 +21,7 @@ import { element, by, browser, protractor } from 'protractor';
|
||||
|
||||
export class UserInfoDialog {
|
||||
|
||||
dialog = element(by.css('mat-card[class*="adf-userinfo-card"]'));
|
||||
dialog = element.all(by.css('mat-card[class*="adf-userinfo-card"]')).first();
|
||||
userImage = element(by.css('div[id="user-initial-image"]'));
|
||||
userInfoEcmHeaderTitle = element(by.css('div[id="ecm-username"]'));
|
||||
userInfoEcmTitle = element(by.css('mat-card-content span[id="ecm-full-name"]'));
|
||||
@ -54,6 +54,12 @@ export class UserInfoDialog {
|
||||
return this;
|
||||
}
|
||||
|
||||
checkProcessServicesTabIsSelected() {
|
||||
let tabsPage = new TabsPage;
|
||||
tabsPage.checkTabIsSelectedByTitle('Process Services');
|
||||
return this;
|
||||
}
|
||||
|
||||
clickOnProcessServicesTab() {
|
||||
let tabsPage = new TabsPage;
|
||||
tabsPage.clickTabByTitle('Process Services');
|
||||
|
@ -43,6 +43,8 @@ export class NavigationBarPage {
|
||||
menuButton = element(by.css('button[data-automation-id="adf-menu-icon"]'));
|
||||
formButton = element(by.css('a[data-automation-id="Form"]'));
|
||||
treeViewButton = element(by.css('a[data-automation-id="Tree View"]'));
|
||||
processListButton = element(by.css('a[data-automation-id="Process List"]'));
|
||||
treeViewButton = element(by.css('a[data-automation-id="Tree View"]'));
|
||||
iconsButton = element(by.css('a[data-automation-id="Icons"]'));
|
||||
|
||||
navigateToDatatable() {
|
||||
@ -50,6 +52,11 @@ export class NavigationBarPage {
|
||||
this.dataTableButton.click();
|
||||
}
|
||||
|
||||
navigateToDatatable() {
|
||||
Util.waitUntilElementIsVisible(this.dataTableButton);
|
||||
this.dataTableButton.click();
|
||||
}
|
||||
|
||||
clickContentServicesButton() {
|
||||
Util.waitUntilElementIsVisible(this.contentServicesButton);
|
||||
this.contentServicesButton.click();
|
||||
@ -186,6 +193,10 @@ export class NavigationBarPage {
|
||||
browser.get(TestConfig.adf.url + `/files/${site.entry.guid}/display/list`);
|
||||
}
|
||||
|
||||
checkContentServicesButtonIsDisplayed() {
|
||||
Util.waitUntilElementIsVisible(this.contentServicesButton);
|
||||
}
|
||||
|
||||
clickTreeViewButton() {
|
||||
Util.waitUntilElementIsVisible(this.treeViewButton);
|
||||
this.treeViewButton.click();
|
||||
@ -195,4 +206,19 @@ export class NavigationBarPage {
|
||||
Util.waitUntilElementIsVisible(this.iconsButton);
|
||||
this.iconsButton.click();
|
||||
}
|
||||
|
||||
clickProcessListButton = function () {
|
||||
Util.waitUntilElementIsClickable(this.processListButton);
|
||||
return this.processListButton.click();
|
||||
};
|
||||
|
||||
clickTreeViewButton() {
|
||||
Util.waitUntilElementIsVisible(this.treeViewButton);
|
||||
this.treeViewButton.click();
|
||||
}
|
||||
|
||||
checkProcessListButtonIsDisplayed = function () {
|
||||
Util.waitUntilElementIsVisible(this.processListButton);
|
||||
return this;
|
||||
};
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Util } from '../../../util/util';
|
||||
import { element, by, protractor } from 'protractor';
|
||||
|
||||
export class AnalyticsPage {
|
||||
|
||||
|
@ -78,7 +78,6 @@ export class SettingsPage {
|
||||
this.goToSettingsPage();
|
||||
this.setProvider(this.bpm.option, this.bpm.text);
|
||||
Util.waitUntilElementIsVisible(this.bpmText);
|
||||
expect(this.ecmText.isPresent()).toBe(false);
|
||||
this.clickApply();
|
||||
return this;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ describe('Process list cloud', () => {
|
||||
const queryService: Query = new Query();
|
||||
|
||||
let silentLogin;
|
||||
let runningProcess, completedProcess;
|
||||
let completedProcess;
|
||||
const simpleApp = 'candidateuserapp';
|
||||
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
||||
|
||||
@ -58,7 +58,7 @@ describe('Process list cloud', () => {
|
||||
await processDefinitionService.init(user, password);
|
||||
let processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
|
||||
await processInstancesService.init(user, password);
|
||||
runningProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
|
||||
await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
|
||||
|
||||
completedProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, simpleApp);
|
||||
await queryService.init(user, password);
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
import { LoginPage } from '../pages/adf/loginPage';
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
import { TaskListDemoPage } from '../pages/adf/demo-shell/taskListDemoPage';
|
||||
import { TaskListDemoPage } from '../pages/adf/demo-shell/process-services/taskListDemoPage';
|
||||
import { PaginationPage } from '../pages/adf/paginationPage';
|
||||
import moment = require('moment');
|
||||
|
||||
|
194
e2e/process-services/processList-component.e2e.ts
Normal file
194
e2e/process-services/processList-component.e2e.ts
Normal file
@ -0,0 +1,194 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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 { LoginPage } from '../pages/adf/loginPage';
|
||||
import { ProcessListDemoPage } from '../pages/adf/demo-shell/process-services/processListDemoPage';
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import resources = require('../util/resources');
|
||||
|
||||
import AlfrescoApi = require('alfresco-js-api-node');
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Process List Test', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const processListDemoPage = new ProcessListDemoPage();
|
||||
|
||||
let appWithDateField = resources.Files.APP_WITH_DATE_FIELD_FORM;
|
||||
let appWithUserWidget = resources.Files.APP_WITH_USER_WIDGET;
|
||||
let appDateModel, appUserWidgetModel, user;
|
||||
|
||||
let processList = ['Process With Date', 'Process With Date 2', 'Process With User Widget', 'Process With User Widget 2'];
|
||||
|
||||
let processName = {
|
||||
procWithDate: 'Process With Date',
|
||||
completedProcWithDate: 'Process With Date 2',
|
||||
procWithUserWidget: 'Process With User Widget',
|
||||
completedProcWithUserWidget: 'Process With User Widget 2'
|
||||
};
|
||||
|
||||
let errorMessages = {
|
||||
appIdNumber: 'App ID must be a number',
|
||||
insertAppId: 'Insert App ID'
|
||||
};
|
||||
|
||||
let appWithDateFieldId;
|
||||
let procWithDate, completedProcWithDate, completedProcWithUserWidget;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
let apps = new AppsActions();
|
||||
let users = new UsersActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'BPM',
|
||||
hostBpm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
user = await users.createTenantAndUser(this.alfrescoJsApi);
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
|
||||
appDateModel = await apps.importPublishDeployApp(this.alfrescoJsApi, appWithDateField.file_location);
|
||||
|
||||
procWithDate = await apps.startProcess(this.alfrescoJsApi, appDateModel, processName.procWithDate);
|
||||
completedProcWithDate = await apps.startProcess(this.alfrescoJsApi, appDateModel, processName.completedProcWithDate);
|
||||
|
||||
appUserWidgetModel = await apps.importPublishDeployApp(this.alfrescoJsApi, appWithUserWidget.file_location);
|
||||
|
||||
await apps.startProcess(this.alfrescoJsApi, appUserWidgetModel, processName.procWithUserWidget);
|
||||
completedProcWithUserWidget = await apps.startProcess(this.alfrescoJsApi, appUserWidgetModel, processName.completedProcWithUserWidget);
|
||||
|
||||
appWithDateFieldId = await apps.getAppDefinitionId(this.alfrescoJsApi, appDateModel.id);
|
||||
|
||||
let procWithDateTaskId = await apps.getProcessTaskId(this.alfrescoJsApi, completedProcWithDate.id);
|
||||
let procWithUserWidgetTaskId = await apps.getProcessTaskId(this.alfrescoJsApi, completedProcWithUserWidget.id);
|
||||
|
||||
await this.alfrescoJsApi.activiti.taskApi.completeTaskForm(procWithDateTaskId, {values: {label: null }});
|
||||
await this.alfrescoJsApi.activiti.taskFormsApi.completeTaskForm(procWithUserWidgetTaskId, {values: {label: null }});
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await this.alfrescoJsApi.activiti.modelsApi.deleteModel(appDateModel.id);
|
||||
await this.alfrescoJsApi.activiti.modelsApi.deleteModel(appUserWidgetModel.id);
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(user.tenantId);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach((done) => {
|
||||
browser.get(TestConfig.adf.url + '/process-list');
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C286638] Should display all process by default', () => {
|
||||
processListDemoPage.checkAppIdFieldIsDisplayed()
|
||||
.checkProcessInstanceIdFieldIsDisplayed()
|
||||
.checkProcessInstanceIdFieldIsDisplayed()
|
||||
.checkSortFieldIsDisplayed()
|
||||
.checkStateFieldIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C282006] Should be able to filter processes with App ID', () => {
|
||||
processListDemoPage.addAppId('a');
|
||||
|
||||
processListDemoPage.checkErrorMessageIsDisplayed(errorMessages.appIdNumber);
|
||||
processListDemoPage.clickResetButton();
|
||||
|
||||
processListDemoPage.addAppId('12345');
|
||||
|
||||
processListDemoPage.checkNoProcessFoundIsDisplayed();
|
||||
|
||||
processListDemoPage.addAppId(appWithDateFieldId);
|
||||
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.procWithDate);
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.completedProcWithDate);
|
||||
|
||||
processListDemoPage.checkProcessIsNotDisplayed(processName.procWithUserWidget);
|
||||
processListDemoPage.checkProcessIsNotDisplayed(processName.completedProcWithUserWidget);
|
||||
});
|
||||
|
||||
it('[C282015] Should be able to filter by Process Definition ID', () => {
|
||||
processListDemoPage.addProcessDefinitionId(procWithDate.processDefinitionId);
|
||||
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.procWithDate);
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.completedProcWithDate);
|
||||
|
||||
processListDemoPage.checkProcessIsNotDisplayed(processName.procWithUserWidget);
|
||||
processListDemoPage.checkProcessIsNotDisplayed(processName.completedProcWithUserWidget);
|
||||
});
|
||||
|
||||
it('[C282016] Should be able to filter by Process Instance ID', () => {
|
||||
processListDemoPage.addProcessInstanceId(procWithDate.id);
|
||||
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.procWithDate);
|
||||
|
||||
processListDemoPage.checkProcessIsNotDisplayed(processName.completedProcWithDate);
|
||||
processListDemoPage.checkProcessIsNotDisplayed(processName.procWithUserWidget);
|
||||
processListDemoPage.checkProcessIsNotDisplayed(processName.completedProcWithUserWidget);
|
||||
});
|
||||
|
||||
it('[C282017] Should be able to filter by Status', () => {
|
||||
processListDemoPage.selectStateFilter('Active');
|
||||
|
||||
processListDemoPage.checkProcessIsNotDisplayed(processName.completedProcWithDate);
|
||||
processListDemoPage.checkProcessIsNotDisplayed(processName.completedProcWithUserWidget);
|
||||
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.procWithDate);
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.procWithUserWidget);
|
||||
|
||||
processListDemoPage.selectStateFilter('Completed');
|
||||
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.completedProcWithDate);
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.completedProcWithUserWidget);
|
||||
|
||||
processListDemoPage.checkProcessIsNotDisplayed(processName.procWithDate);
|
||||
processListDemoPage.checkProcessIsNotDisplayed(processName.procWithUserWidget);
|
||||
|
||||
processListDemoPage.selectStateFilter('All');
|
||||
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.completedProcWithDate);
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.completedProcWithUserWidget);
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.procWithDate);
|
||||
processListDemoPage.checkProcessIsDisplayed(processName.procWithUserWidget);
|
||||
});
|
||||
|
||||
it('[C282010] Should be able to sort by creation date', () => {
|
||||
processListDemoPage.selectSorting('asc');
|
||||
|
||||
processListDemoPage.getDisplayedProcessesNames().then((sortedProcessList) => {
|
||||
expect(JSON.stringify(processList) === JSON.stringify(sortedProcessList)).toBe(true);
|
||||
});
|
||||
|
||||
processListDemoPage.selectSorting('desc');
|
||||
|
||||
processListDemoPage.getDisplayedProcessesNames().then((sortedProcessList) => {
|
||||
expect(JSON.stringify(processList.reverse()) === JSON.stringify(sortedProcessList)).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
@ -31,4 +31,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user