mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-3992] Process Filter bug fixes and improvements (#6599)
* bug fixes * bug fixes * bug fixes * cleanup tests * travis workaround * travis workaround * travis workaround * travis workaround * travis workaround * travis workaround * Revert "travis workaround" This reverts commit b67efccfb0aab8c7f6b9235d01525487771b8123. * Revert "travis workaround" This reverts commit 448f4e6d1211771e914f35183860af6df3452c16. * Revert "travis workaround" This reverts commit 542fae649c0501a9150ccac2e5a2cd54ee39a690. * Revert "travis workaround" This reverts commit 12f58568fbb0f8d2defb4c21a3ab1683bc8aa312. * Revert "travis workaround" This reverts commit b0ffef3bee0f81faf6088be8b5c2b072ad2762e7. * Revert "travis workaround" This reverts commit c6d95a2ff3b38b543fea83d3fc53016ac657b3bb. * service fixes * remove junk tests * code fixes * reduce code complexity * update e2e * update e2e * fix i18n * e2e fixes * bug fixes * rebase and fix * properly serialize query params * rework process filters demo * remove dead code * code fixes * code fixes * e2e improvements * fix bug and remove e2e testing a bug * bug fixes for date ranges * fix e2e * fix unit test * reusable code * fix flaky e2e * fix angular cli version * remove useless e2e (already tested by unit tests) * remove useless e2e (already tested by unit tests) * demo shell fixes * remove fit * disable flaky test * update code as per review suggestions * fix after rebase * fix after rebase
This commit is contained in:
@@ -22,62 +22,62 @@ export class ProcessListCloudConfiguration {
|
||||
'presets': {
|
||||
'default': [
|
||||
{
|
||||
'key': 'entry.id',
|
||||
'key': 'id',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_PROCESS_LIST.PROPERTIES.ID',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.name',
|
||||
'key': 'name',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_PROCESS_LIST.PROPERTIES.NAME',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.status',
|
||||
'key': 'status',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_PROCESS_LIST.PROPERTIES.STATUS',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.startDate',
|
||||
'key': 'startDate',
|
||||
'type': 'date',
|
||||
'title': 'ADF_CLOUD_PROCESS_LIST.PROPERTIES.START_DATE',
|
||||
'sortable': true,
|
||||
'format': 'timeAgo'
|
||||
},
|
||||
{
|
||||
'key': 'entry.appName',
|
||||
'key': 'appName',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_PROCESS_LIST.PROPERTIES.APP_NAME',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.businessKey',
|
||||
'key': 'businessKey',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_PROCESS_LIST.PROPERTIES.BUSINESS_KEY',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.initiator',
|
||||
'key': 'initiator',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_PROCESS_LIST.PROPERTIES.STARTED_BY',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.lastModified',
|
||||
'key': 'lastModified',
|
||||
'type': 'date',
|
||||
'title': 'ADF_CLOUD_PROCESS_LIST.PROPERTIES.LAST_MODIFIED',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.processDefinitionId',
|
||||
'key': 'processDefinitionId',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_PROCESS_LIST.PROPERTIES.PROCESS_DEF_ID',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.processDefinitionKey',
|
||||
'key': 'processDefinitionKey',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_PROCESS_LIST.PROPERTIES.PROCESS_DEF_KEY',
|
||||
'sortable': true
|
||||
|
@@ -25,84 +25,84 @@ export class TaskListCloudConfiguration {
|
||||
'presets': {
|
||||
'default': [
|
||||
{
|
||||
'key': 'entry.id',
|
||||
'key': 'id',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.ID',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.name',
|
||||
'key': 'name',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.NAME',
|
||||
'sortable': true,
|
||||
'cssClass': 'full-width name-column ellipsis-cell'
|
||||
},
|
||||
{
|
||||
'key': 'entry.processDefinitionId',
|
||||
'key': 'processDefinitionId',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.PROCESS_DEF_ID',
|
||||
'sortable': true,
|
||||
'cssClass': 'full-width name-column ellipsis-cell'
|
||||
},
|
||||
{
|
||||
'key': 'entry.processInstanceId',
|
||||
'key': 'processInstanceId',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.PROCESS_INSTANCE_ID',
|
||||
'sortable': true,
|
||||
'cssClass': 'full-width name-column ellipsis-cell'
|
||||
},
|
||||
{
|
||||
'key': 'entry.status',
|
||||
'key': 'status',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.STATUS',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.priority',
|
||||
'key': 'priority',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.createdDate',
|
||||
'key': 'createdDate',
|
||||
'type': 'date',
|
||||
'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED_DATE',
|
||||
'sortable': true,
|
||||
'format': 'timeAgo'
|
||||
},
|
||||
{
|
||||
'key': 'entry.lastModified',
|
||||
'key': 'lastModified',
|
||||
'type': 'date',
|
||||
'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.LAST_MODIFIED',
|
||||
'sortable': true,
|
||||
'format': 'timeAgo'
|
||||
},
|
||||
{
|
||||
'key': 'entry.assignee',
|
||||
'key': 'assignee',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.ASSIGNEE',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.parentTaskId',
|
||||
'key': 'parentTaskId',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.PARENT_TASK_ID',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.priority',
|
||||
'key': 'priority',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.PRIORITY',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.standalone',
|
||||
'key': 'standalone',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.STAND_ALONE',
|
||||
'sortable': true
|
||||
},
|
||||
{
|
||||
'key': 'entry.owner',
|
||||
'key': 'owner',
|
||||
'type': 'text',
|
||||
'title': 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.OWNER',
|
||||
'sortable': true
|
||||
|
@@ -81,10 +81,6 @@ describe('Edit process filters cloud', () => {
|
||||
await editProcessFilter.checkSaveButtonIsDisplayed();
|
||||
await editProcessFilter.checkSaveAsButtonIsDisplayed();
|
||||
await editProcessFilter.checkDeleteButtonIsDisplayed();
|
||||
await expect(await editProcessFilter.checkSaveButtonIsEnabled()).toEqual(false);
|
||||
await expect(await editProcessFilter.checkSaveAsButtonIsEnabled()).toEqual(false);
|
||||
await expect(await editProcessFilter.checkDeleteButtonIsEnabled()).toEqual(false);
|
||||
await editProcessFilter.openFilter();
|
||||
});
|
||||
|
||||
it('[C586757] Delete Save and Save as actions should be displayed and enabled when clicking on custom filter header', async () => {
|
||||
@@ -110,10 +106,7 @@ describe('Edit process filters cloud', () => {
|
||||
|
||||
await expect(await processFilter.getActiveFilterName()).toBe('New');
|
||||
await editProcessFilter.openFilter();
|
||||
await expect(await editProcessFilter.checkSaveButtonIsEnabled()).toEqual(false);
|
||||
await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Id');
|
||||
await expect(await editProcessFilter.checkSaveAsButtonIsEnabled()).toEqual(false);
|
||||
await expect(await editProcessFilter.checkDeleteButtonIsEnabled()).toEqual(true);
|
||||
await processFilter.clickAllProcessesFilter();
|
||||
await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Start Date');
|
||||
await processFilter.clickProcessFilter('custom-new');
|
||||
@@ -121,50 +114,10 @@ describe('Edit process filters cloud', () => {
|
||||
await editProcessFilter.clickDeleteButton();
|
||||
});
|
||||
|
||||
it('[C291806] Two process filters with same name can be created when clicking the Save As button', async () => {
|
||||
await editProcessFilter.setSortFilterDropDown('Id');
|
||||
await editProcessFilter.clickSaveAsButton();
|
||||
await editProcessFilter.editProcessFilterDialog().setFilterName('New');
|
||||
await editProcessFilter.editProcessFilterDialog().clickOnSaveButton();
|
||||
|
||||
await browser.driver.sleep(1000);
|
||||
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.checkCustomiseFilterHeaderIsExpanded();
|
||||
await expect(await processFilter.getActiveFilterName()).toBe('New');
|
||||
await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Id');
|
||||
await editProcessFilter.setSortFilterDropDown('Process Name');
|
||||
await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Process Name');
|
||||
await editProcessFilter.clickSaveAsButton();
|
||||
|
||||
await editProcessFilter.editProcessFilterDialog().setFilterName('New');
|
||||
await editProcessFilter.editProcessFilterDialog().clickOnSaveButton();
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.checkCustomiseFilterHeaderIsExpanded();
|
||||
|
||||
await browser.driver.sleep(1000);
|
||||
|
||||
await expect(await processFilter.getActiveFilterName()).toBe('New');
|
||||
await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Process Name');
|
||||
await editProcessFilter.clickDeleteButton();
|
||||
|
||||
await browser.driver.sleep(1000);
|
||||
|
||||
await processFilter.clickProcessFilter('custom-new');
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.checkCustomiseFilterHeaderIsExpanded();
|
||||
await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Id');
|
||||
await editProcessFilter.clickDeleteButton();
|
||||
});
|
||||
|
||||
it('[C291807] A process filter is overrided when clicking on save button', async () => {
|
||||
it('[C291807] A process filter is updated when clicking on save button', async () => {
|
||||
await editProcessFilter.setSortFilterDropDown('Id');
|
||||
await processFilter.clickAllProcessesFilter();
|
||||
await editProcessFilter.clickSaveAsButton();
|
||||
await editProcessFilter.editProcessFilterDialog().setFilterName('New');
|
||||
await editProcessFilter.editProcessFilterDialog().clickOnSaveButton();
|
||||
|
||||
await browser.driver.sleep(1000);
|
||||
await editProcessFilter.saveAs('New');
|
||||
|
||||
await expect(await processFilter.getActiveFilterName()).toBe('New');
|
||||
await editProcessFilter.openFilter();
|
||||
@@ -186,12 +139,8 @@ describe('Edit process filters cloud', () => {
|
||||
it('[C291808] A process filter is deleted when clicking on delete button', async () => {
|
||||
await editProcessFilter.setSortFilterDropDown('Id');
|
||||
await processFilter.clickAllProcessesFilter();
|
||||
await editProcessFilter.clickSaveAsButton();
|
||||
await editProcessFilter.editProcessFilterDialog().setFilterName('New');
|
||||
await editProcessFilter.saveAs('New');
|
||||
|
||||
await browser.driver.sleep(1000);
|
||||
|
||||
await editProcessFilter.editProcessFilterDialog().clickOnSaveButton();
|
||||
await editProcessFilter.openFilter();
|
||||
await expect(await processFilter.getActiveFilterName()).toBe('New');
|
||||
await expect(await editProcessFilter.getSortFilterDropDownValue()).toEqual('Id');
|
||||
@@ -258,9 +207,6 @@ describe('Edit process filters cloud', () => {
|
||||
async function createNewProcessCustomFilter(name: string): Promise<void> {
|
||||
await editProcessFilter.setSortFilterDropDown('Id');
|
||||
await processFilter.clickAllProcessesFilter();
|
||||
|
||||
await editProcessFilter.clickSaveAsButton();
|
||||
await editProcessFilter.editProcessFilterDialog().setFilterName(name);
|
||||
await editProcessFilter.editProcessFilterDialog().clickOnSaveButton();
|
||||
await editProcessFilter.saveAs(name);
|
||||
}
|
||||
});
|
||||
|
@@ -244,9 +244,7 @@ describe('Process list cloud', () => {
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.setProcessInstanceId(completedProcess.entry.id);
|
||||
|
||||
await editProcessFilter.clickSaveAsButton();
|
||||
await editProcessFilter.editProcessFilterDialog().setFilterName('New');
|
||||
await editProcessFilter.editProcessFilterDialog().clickOnSaveButton();
|
||||
await editProcessFilter.saveAs('New');
|
||||
|
||||
await expect(await processCloudDemoPage.processFilterCloudComponent.getActiveFilterName()).toBe('New');
|
||||
|
||||
@@ -274,9 +272,7 @@ describe('Process list cloud', () => {
|
||||
await expect(await editProcessFilter.checkAppNamesAreUnique()).toBe(true);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
|
||||
await editProcessFilter.clickSaveAsButton();
|
||||
await editProcessFilter.editProcessFilterDialog().setFilterName('SavedFilter');
|
||||
await editProcessFilter.editProcessFilterDialog().clickOnSaveButton();
|
||||
await editProcessFilter.saveAs('SavedFilter');
|
||||
await expect(await processCloudDemoPage.processFilterCloudComponent.getActiveFilterName()).toBe('SavedFilter');
|
||||
|
||||
await editProcessFilter.openFilter();
|
||||
@@ -288,9 +284,7 @@ describe('Process list cloud', () => {
|
||||
await waitTillContentLoaded();
|
||||
|
||||
await processList.checkContentIsDisplayedById(switchProcessInstance.entry.id);
|
||||
await editProcessFilter.clickSaveAsButton();
|
||||
await editProcessFilter.editProcessFilterDialog().setFilterName('SwitchFilter');
|
||||
await editProcessFilter.editProcessFilterDialog().clickOnSaveButton();
|
||||
await editProcessFilter.saveAs('SwitchFilter');
|
||||
await expect(await processCloudDemoPage.processFilterCloudComponent.getActiveFilterName()).toBe('SwitchFilter');
|
||||
|
||||
await editProcessFilter.openFilter();
|
||||
|
@@ -157,6 +157,7 @@ describe('Process filters cloud', () => {
|
||||
await appListCloudComponent.goToApp(candidateBaseApp);
|
||||
await tasksCloudDemoPage.taskListCloudComponent().checkTaskListIsLoaded();
|
||||
await processCloudDemoPage.processFilterCloudComponent.clickOnProcessFilters();
|
||||
await processCloudDemoPage.processFilterCloudComponent.clickRunningProcessesFilter();
|
||||
});
|
||||
|
||||
it('[C306887] Should be able to filter by appName', async () => {
|
||||
@@ -189,10 +190,8 @@ describe('Process filters cloud', () => {
|
||||
it('[C311315] Should be able to filter by process definition id', async () => {
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.setProperty('processDefinitionId', processDefinition.entry.id);
|
||||
await editProcessFilter.setProcessName(runningProcessInstance.entry.name);
|
||||
await processList.checkContentIsDisplayedByName(runningProcessInstance.entry.name);
|
||||
|
||||
await editProcessFilter.setProcessName(anotherProcessInstance.entry.name);
|
||||
await editProcessFilter.setProperty('processDefinitionId', anotherProcessDefinition.entry.id);
|
||||
await processList.checkContentIsDisplayedByName(anotherProcessInstance.entry.name);
|
||||
await processList.checkContentIsNotDisplayedByName(runningProcessInstance.entry.name);
|
||||
@@ -286,18 +285,14 @@ describe('Process filters cloud', () => {
|
||||
});
|
||||
|
||||
it('[C306892] Should be able to filter by process status - All', async () => {
|
||||
await processCloudDemoPage.processFilterCloudComponent.clickAllProcessesFilter();
|
||||
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.setStatusFilterDropDown(PROCESS_STATUS.ALL);
|
||||
await editProcessFilter.setProcessName(runningProcessInstance.entry.name);
|
||||
|
||||
await processList.checkContentIsDisplayedByName(runningProcessInstance.entry.name);
|
||||
|
||||
await editProcessFilter.setProcessName(anotherProcessInstance.entry.name);
|
||||
await processList.checkContentIsDisplayedByName(anotherProcessInstance.entry.name);
|
||||
|
||||
await editProcessFilter.setProcessName(suspendProcessInstance.entry.name);
|
||||
await processList.checkContentIsDisplayedByName(suspendProcessInstance.entry.name);
|
||||
|
||||
await editProcessFilter.setProcessName(completedProcess.entry.name);
|
||||
await processList.checkContentIsDisplayedByName(completedProcess.entry.name);
|
||||
});
|
||||
|
||||
|
@@ -1,127 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
AppListCloudPage,
|
||||
GroupIdentityService,
|
||||
IdentityService,
|
||||
LoginPage,
|
||||
ProcessDefinitionsService,
|
||||
ProcessInstancesService,
|
||||
StringUtil
|
||||
} from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { ProcessCloudDemoPage } from './pages/process-cloud-demo.page';
|
||||
import { TasksCloudDemoPage } from './pages/tasks-cloud-demo.page';
|
||||
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
|
||||
describe('Process list cloud', () => {
|
||||
|
||||
describe('Process List - Custom Action Menu', () => {
|
||||
|
||||
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||
|
||||
const loginSSOPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const appListCloudComponent = new AppListCloudPage();
|
||||
|
||||
const processCloudDemoPage = new ProcessCloudDemoPage();
|
||||
const editProcessFilter = processCloudDemoPage.editProcessFilterCloudComponent();
|
||||
const processList = processCloudDemoPage.processListCloudComponent();
|
||||
|
||||
const tasksCloudDemoPage = new TasksCloudDemoPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
const processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||
const processInstancesService = new ProcessInstancesService(apiService);
|
||||
|
||||
let testUser, groupInfo, editProcess, deleteProcess;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('identityAdmin');
|
||||
|
||||
testUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_USER]);
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
const processDefinition = await processDefinitionService
|
||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp);
|
||||
|
||||
editProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp, {
|
||||
'name': StringUtil.generateRandomString(),
|
||||
'businessKey': StringUtil.generateRandomString()
|
||||
});
|
||||
deleteProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp, {
|
||||
'name': StringUtil.generateRandomString(),
|
||||
'businessKey': StringUtil.generateRandomString()
|
||||
});
|
||||
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
|
||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
await appListCloudComponent.checkApsContainer();
|
||||
await appListCloudComponent.goToApp(simpleApp);
|
||||
await tasksCloudDemoPage.clickSettingsButton();
|
||||
await tasksCloudDemoPage.enableTestingMode();
|
||||
await tasksCloudDemoPage.enableActionMenu();
|
||||
await tasksCloudDemoPage.enableContextMenu();
|
||||
await tasksCloudDemoPage.addActionIsDisplayed();
|
||||
await tasksCloudDemoPage.addAction('edit');
|
||||
await tasksCloudDemoPage.actionAdded('edit');
|
||||
await tasksCloudDemoPage.addAction('delete');
|
||||
await tasksCloudDemoPage.actionAdded('delete');
|
||||
await tasksCloudDemoPage.addDisabledAction('disabledaction');
|
||||
await tasksCloudDemoPage.actionAdded('disabledaction');
|
||||
await tasksCloudDemoPage.addInvisibleAction('invisibleaction');
|
||||
await tasksCloudDemoPage.actionAdded('invisibleaction');
|
||||
await tasksCloudDemoPage.clickAppButton();
|
||||
await processCloudDemoPage.processFilterCloudComponent.clickOnProcessFilters();
|
||||
await processCloudDemoPage.processFilterCloudComponent.clickRunningProcessesFilter();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('identityAdmin');
|
||||
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||
});
|
||||
|
||||
it('[C315236] Should be able to see and execute custom action menu', async () => {
|
||||
await editProcessFilter.openFilter();
|
||||
await editProcessFilter.setProcessName(editProcess.entry.name);
|
||||
await expect(await processCloudDemoPage.processFilterCloudComponent.getActiveFilterName()).toBe(CONSTANTS.PROCESS_FILTERS.RUNNING);
|
||||
await processList.checkProcessListIsLoaded();
|
||||
await processList.checkContentIsDisplayedById(editProcess.entry.id);
|
||||
await processList.clickOptionsButton(editProcess.entry.id);
|
||||
await expect(await processList.isCustomActionEnabled('disabledaction')).toBe(false);
|
||||
await expect(await processList.getNumberOfOptions()).toBe(3);
|
||||
await processList.clickOnCustomActionMenu('edit');
|
||||
await processCloudDemoPage.checkActionExecuted(editProcess.entry.id, 'edit');
|
||||
|
||||
await editProcessFilter.setProcessName(deleteProcess.entry.name);
|
||||
await browser.sleep(1000);
|
||||
await processList.rightClickOnRow(deleteProcess.entry.id);
|
||||
await expect(await processList.isCustomActionEnabled('disabledaction')).toBe(false);
|
||||
await expect(await processList.getNumberOfOptions()).toBe(3);
|
||||
await processList.clickContextMenuActionNamed('delete');
|
||||
await processCloudDemoPage.checkActionExecuted(deleteProcess.entry.id, 'delete');
|
||||
});
|
||||
});
|
||||
});
|
@@ -1,113 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, AppListCloudPage, GroupIdentityService, IdentityService, LoginPage, ProcessDefinitionsService, ProcessInstancesService, QueryService, TasksService } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { TasksCloudDemoPage } from './pages/tasks-cloud-demo.page';
|
||||
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Process list cloud', () => {
|
||||
|
||||
describe('Process List - Custom Action Menu', () => {
|
||||
|
||||
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||
|
||||
const loginSSOPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const appListCloudComponent = new AppListCloudPage();
|
||||
|
||||
const tasksCloudDemoPage = new TasksCloudDemoPage();
|
||||
const editTaskFilter = tasksCloudDemoPage.editTaskFilterCloud;
|
||||
const taskFilter = tasksCloudDemoPage.taskFilterCloudComponent;
|
||||
const taskList = tasksCloudDemoPage.taskListCloudComponent();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const identityService = new IdentityService(apiService);
|
||||
const groupIdentityService = new GroupIdentityService(apiService);
|
||||
const processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||
const processInstancesService = new ProcessInstancesService(apiService);
|
||||
const queryService = new QueryService(apiService);
|
||||
const tasksService = new TasksService(apiService);
|
||||
|
||||
let testUser, groupInfo, editProcess, deleteProcess, editTask, deleteTask;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('identityAdmin');
|
||||
|
||||
testUser = await identityService.createIdentityUserWithRole( [identityService.ROLES.ACTIVITI_USER]);
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
const processDefinition = await processDefinitionService
|
||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp);
|
||||
|
||||
editProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
||||
deleteProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
||||
|
||||
editTask = await queryService.getProcessInstanceTasks(editProcess.entry.id, simpleApp);
|
||||
deleteTask = await queryService.getProcessInstanceTasks(deleteProcess.entry.id, simpleApp);
|
||||
await tasksService.claimTask(editTask.list.entries[0].entry.id, simpleApp);
|
||||
await tasksService.claimTask(deleteTask.list.entries[0].entry.id, simpleApp);
|
||||
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await apiService.loginWithProfile('identityAdmin');
|
||||
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
await appListCloudComponent.checkApsContainer();
|
||||
await appListCloudComponent.goToApp(simpleApp);
|
||||
await tasksCloudDemoPage.clickSettingsButton();
|
||||
await tasksCloudDemoPage.enableTestingMode();
|
||||
await tasksCloudDemoPage.enableActionMenu();
|
||||
await tasksCloudDemoPage.enableContextMenu();
|
||||
await tasksCloudDemoPage.addActionIsDisplayed();
|
||||
await tasksCloudDemoPage.addAction('edit');
|
||||
await tasksCloudDemoPage.actionAdded('edit');
|
||||
await tasksCloudDemoPage.addAction('delete');
|
||||
await tasksCloudDemoPage.actionAdded('delete');
|
||||
await tasksCloudDemoPage.addDisabledAction('disabledaction');
|
||||
await tasksCloudDemoPage.actionAdded('disabledaction');
|
||||
await tasksCloudDemoPage.addInvisibleAction('invisibleaction');
|
||||
await tasksCloudDemoPage.actionAdded('invisibleaction');
|
||||
await tasksCloudDemoPage.clickAppButton();
|
||||
await editTaskFilter.openFilter();
|
||||
await taskFilter.checkTaskFilterIsDisplayed('my-tasks');
|
||||
});
|
||||
|
||||
it('[C315723] Should be able to see and execute custom action menu', async () => {
|
||||
await expect(await taskFilter.getActiveFilterName()).toBe('My Tasks');
|
||||
await taskList.checkTaskListIsLoaded();
|
||||
await taskList.checkContentIsDisplayedById(editTask.list.entries[0].entry.id);
|
||||
await taskList.clickOptionsButton(editTask.list.entries[0].entry.id);
|
||||
await expect(await taskList.isCustomActionEnabled('disabledaction')).toBe(false);
|
||||
await expect(await taskList.getNumberOfOptions()).toBe(3);
|
||||
await taskList.clickOnCustomActionMenu('edit');
|
||||
await tasksCloudDemoPage.checkActionExecuted(editTask.list.entries[0].entry.id, 'edit');
|
||||
await taskList.rightClickOnRow(deleteTask.list.entries[0].entry.id);
|
||||
await expect(await taskList.isCustomActionEnabled('disabledaction')).toBe(false);
|
||||
await expect(await taskList.getNumberOfOptions()).toBe(3);
|
||||
await taskList.clickContextMenuActionNamed('delete');
|
||||
await tasksCloudDemoPage.checkActionExecuted(deleteTask.list.entries[0].entry.id, 'delete');
|
||||
});
|
||||
});
|
||||
});
|
@@ -7,6 +7,8 @@
|
||||
"C279932": "login problem APS not basic",
|
||||
"C279931": "login problem APS not basic",
|
||||
"C279930": "login problem APS not basic",
|
||||
"C299187": "ADF-5285 Failing aspect test due multiple replica",
|
||||
"C311290": "ADF-5308",
|
||||
"C260241": "ADF-5335- this will exclude 2 tests"
|
||||
"C260241": "ADF-5335- this will exclude 2 tests",
|
||||
"C587515": "https://alfresco.atlassian.net/browse/ADF-5340"
|
||||
}
|
||||
|
Reference in New Issue
Block a user