mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fix ps e2e (#5262)
* fix ps e2e * fix upload unit report * fix cspell * Update cspell.json * fix e2e * remove extra space * fix e2e increase resolution * try add a sleep before to cehck sorted in order to give datable time to refresh * log order * fix log * change async ins ort * remove sort testcase
This commit is contained in:
committed by
Denys Vuika
parent
1ec827a90c
commit
c61de922af
@@ -131,7 +131,14 @@
|
|||||||
"devops",
|
"devops",
|
||||||
"mouseenter",
|
"mouseenter",
|
||||||
"starteventform",
|
"starteventform",
|
||||||
"formtotestvalidations"
|
"formtotestvalidations",
|
||||||
|
"requirednumbervisibility",
|
||||||
|
"numbervisibilityprocess",
|
||||||
|
"booleanvisibilityprocess",
|
||||||
|
"booleanvisibility",
|
||||||
|
"processparent",
|
||||||
|
"uploadfileform",
|
||||||
|
"processwithstarteventform"
|
||||||
],
|
],
|
||||||
"dictionaries": [
|
"dictionaries": [
|
||||||
"html",
|
"html",
|
||||||
|
@@ -100,6 +100,7 @@ export class TasksCloudDemoPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getActiveFilterName(): Promise<string> {
|
async getActiveFilterName(): Promise<string> {
|
||||||
|
await browser.sleep(500);
|
||||||
return BrowserActions.getText(this.activeFilter);
|
return BrowserActions.getText(this.activeFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -30,9 +30,9 @@ export class StartProcessCloudConfiguration {
|
|||||||
'value': 17
|
'value': 17
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'variables': {
|
'variable': {
|
||||||
'my-key1': 'myvalue',
|
'mykey1': 'myvalue',
|
||||||
'my-key2': 'myvalue2'
|
'mykey2': 'myvalue2'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,167 @@
|
|||||||
|
/*!
|
||||||
|
* @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 { LoginSSOPage, AppListCloudPage, IdentityService, GroupIdentityService, ApiService, StringUtil, StartTasksCloudPage, TaskFormCloudComponent } from '@alfresco/adf-testing';
|
||||||
|
import { browser, by } from 'protractor';
|
||||||
|
|
||||||
|
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||||
|
import { TasksCloudDemoPage } from '../../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||||
|
import { StartProcessPage } from '../../pages/adf/process-services/startProcessPage';
|
||||||
|
import { ProcessCloudDemoPage } from '../../pages/adf/demo-shell/process-services/processCloudDemoPage';
|
||||||
|
import { ProcessDetailsCloudDemoPage } from '../../pages/adf/demo-shell/process-services-cloud/processDetailsCloudDemoPage';
|
||||||
|
|
||||||
|
describe('Task cloud visibility', async () => {
|
||||||
|
|
||||||
|
const navigationBarPage = new NavigationBarPage();
|
||||||
|
const appListCloudComponent = new AppListCloudPage();
|
||||||
|
const tasksCloudDemoPage = new TasksCloudDemoPage();
|
||||||
|
const startTask = new StartTasksCloudPage();
|
||||||
|
const taskFormCloudComponent = new TaskFormCloudComponent();
|
||||||
|
const startProcessPage = new StartProcessPage();
|
||||||
|
const processCloudDemoPage = new ProcessCloudDemoPage();
|
||||||
|
const processDetailsCloudDemoPage = new ProcessDetailsCloudDemoPage();
|
||||||
|
const loginSSOPage = new LoginSSOPage();
|
||||||
|
|
||||||
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
|
const standaloneTaskName = StringUtil.generateRandomString(5);
|
||||||
|
const processName = StringUtil.generateRandomString(5);
|
||||||
|
let identityService: IdentityService;
|
||||||
|
let groupIdentityService: GroupIdentityService;
|
||||||
|
let testUser, groupInfo;
|
||||||
|
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
||||||
|
|
||||||
|
beforeAll(async () => {
|
||||||
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
|
identityService = new IdentityService(apiService);
|
||||||
|
groupIdentityService = new GroupIdentityService(apiService);
|
||||||
|
testUser = await identityService.createIdentityUserWithRole(apiService, [identityService.ROLES.ACTIVITI_USER]);
|
||||||
|
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||||
|
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||||
|
|
||||||
|
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async () => {
|
||||||
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
|
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||||
|
await appListCloudComponent.checkApsContainer();
|
||||||
|
await appListCloudComponent.goToApp(simpleApp);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkTaskListIsLoaded();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C315170] Should be able to complete a task with a form with required number widgets', async () => {
|
||||||
|
await tasksCloudDemoPage.openNewTaskForm();
|
||||||
|
await startTask.checkFormIsDisplayed();
|
||||||
|
await startTask.addName(standaloneTaskName);
|
||||||
|
await startTask.selectFormDefinition(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.forms.requirednumbervisibility.name);
|
||||||
|
|
||||||
|
await startTask.clickStartButton();
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(standaloneTaskName);
|
||||||
|
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Number1');
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Number2');
|
||||||
|
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||||
|
|
||||||
|
await taskFormCloudComponent.formFields().setFieldValue(by.id, 'Number1', 5);
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Number2');
|
||||||
|
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||||
|
|
||||||
|
await taskFormCloudComponent.formFields().setFieldValue(by.id, 'Number1', 123);
|
||||||
|
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Number2');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C315169] Should be able to start a process with visibility condition for number widgets', async () => {
|
||||||
|
|
||||||
|
await processCloudDemoPage.openNewProcessForm();
|
||||||
|
await startProcessPage.clearField(startProcessPage.processNameInput);
|
||||||
|
await startProcessPage.selectFromProcessDropdown(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.numbervisibilityprocess);
|
||||||
|
|
||||||
|
await startProcessPage.enterProcessName(processName);
|
||||||
|
await startProcessPage.clickStartProcessButton();
|
||||||
|
|
||||||
|
await processDetailsCloudDemoPage.selectProcessTaskByName(processName);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow('number_visibility_task');
|
||||||
|
await taskFormCloudComponent.clickClaimButton();
|
||||||
|
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Number1');
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Number2');
|
||||||
|
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||||
|
|
||||||
|
await taskFormCloudComponent.formFields().setFieldValue(by.id, 'Number1', 5);
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Number2');
|
||||||
|
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||||
|
|
||||||
|
await taskFormCloudComponent.formFields().setFieldValue(by.id, 'Number1', 123);
|
||||||
|
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Number2');
|
||||||
|
|
||||||
|
await taskFormCloudComponent.formFields().setFieldValue(by.id, 'Number1', 4);
|
||||||
|
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||||
|
await taskFormCloudComponent.clickCompleteButton();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C315232] Should be able to complete a process with visibility condition for boolean widgets', async () => {
|
||||||
|
|
||||||
|
await processCloudDemoPage.openNewProcessForm();
|
||||||
|
await startProcessPage.clearField(startProcessPage.processNameInput);
|
||||||
|
await startProcessPage.selectFromProcessDropdown(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.booleanvisibilityprocess);
|
||||||
|
await startProcessPage.enterProcessName(processName);
|
||||||
|
await startProcessPage.clickStartProcessButton();
|
||||||
|
|
||||||
|
await processDetailsCloudDemoPage.selectProcessTaskByName(processName);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow('boolean_visibility_task');
|
||||||
|
await taskFormCloudComponent.clickClaimButton();
|
||||||
|
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Checkbox2');
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Checkbox3');
|
||||||
|
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||||
|
|
||||||
|
await taskFormCloudComponent.formFields().clickField(by.id, 'Checkbox1');
|
||||||
|
await taskFormCloudComponent.formFields().clickField(by.id, 'Checkbox2');
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Checkbox3');
|
||||||
|
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||||
|
|
||||||
|
await taskFormCloudComponent.clickCompleteButton();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C315208] Should be able to complete a task with Checkbox widgets', async () => {
|
||||||
|
await tasksCloudDemoPage.openNewTaskForm();
|
||||||
|
await startTask.checkFormIsDisplayed();
|
||||||
|
await startTask.addName(standaloneTaskName);
|
||||||
|
await startTask.selectFormDefinition(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.forms.booleanvisibility.name);
|
||||||
|
|
||||||
|
await startTask.clickStartButton();
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(standaloneTaskName);
|
||||||
|
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Checkbox2');
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Checkbox3');
|
||||||
|
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
||||||
|
|
||||||
|
await taskFormCloudComponent.formFields().clickField(by.id, 'Checkbox1');
|
||||||
|
await taskFormCloudComponent.formFields().clickField(by.id, 'Checkbox2');
|
||||||
|
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Checkbox3');
|
||||||
|
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
||||||
|
|
||||||
|
await taskFormCloudComponent.clickCompleteButton();
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
@@ -15,18 +15,14 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { LoginSSOPage, Widget, AppListCloudPage, IdentityService, GroupIdentityService, ApiService, StringUtil, StartTasksCloudPage, TaskFormCloudComponent } from '@alfresco/adf-testing';
|
import { LoginSSOPage, Widget } from '@alfresco/adf-testing';
|
||||||
import { browser, by } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||||
import { FormCloudDemoPage } from '../../pages/adf/demo-shell/process-services-cloud/cloudFormDemoPage';
|
import { FormCloudDemoPage } from '../../pages/adf/demo-shell/process-services-cloud/cloudFormDemoPage';
|
||||||
import { checkboxVisibilityFormJson, multipleCheckboxVisibilityFormJson } from '../../resources/forms/checkbox-visibility-condition';
|
import { checkboxVisibilityFormJson, multipleCheckboxVisibilityFormJson } from '../../resources/forms/checkbox-visibility-condition';
|
||||||
import { multipleVisibilityFormJson } from '../../resources/forms/multiple-visibility-conditions';
|
import { multipleVisibilityFormJson } from '../../resources/forms/multiple-visibility-conditions';
|
||||||
import { TasksCloudDemoPage } from '../../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
|
||||||
import { StartProcessPage } from '../../pages/adf/process-services/startProcessPage';
|
|
||||||
import { ProcessCloudDemoPage } from '../../pages/adf/demo-shell/process-services/processCloudDemoPage';
|
|
||||||
import { ProcessDetailsCloudDemoPage } from '../../pages/adf/demo-shell/process-services-cloud/processDetailsCloudDemoPage';
|
|
||||||
|
|
||||||
describe('Visibility conditions - cloud', () => {
|
describe('Visibility conditions - cloud', () => {
|
||||||
|
|
||||||
@@ -247,144 +243,3 @@ describe('Visibility conditions - cloud', () => {
|
|||||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Task cloud visibility', async () => {
|
|
||||||
|
|
||||||
const loginSSOPage = new LoginSSOPage();
|
|
||||||
const navigationBarPage = new NavigationBarPage();
|
|
||||||
const appListCloudComponent = new AppListCloudPage();
|
|
||||||
const tasksCloudDemoPage = new TasksCloudDemoPage();
|
|
||||||
const startTask = new StartTasksCloudPage();
|
|
||||||
const taskFormCloudComponent = new TaskFormCloudComponent();
|
|
||||||
const startProcessPage = new StartProcessPage();
|
|
||||||
const processCloudDemoPage = new ProcessCloudDemoPage();
|
|
||||||
const processDetailsCloudDemoPage = new ProcessDetailsCloudDemoPage();
|
|
||||||
|
|
||||||
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
|
||||||
const standaloneTaskName = StringUtil.generateRandomString(5);
|
|
||||||
const processName = StringUtil.generateRandomString(5);
|
|
||||||
let identityService: IdentityService;
|
|
||||||
let groupIdentityService: GroupIdentityService;
|
|
||||||
let testUser, groupInfo;
|
|
||||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
|
||||||
|
|
||||||
beforeAll(async () => {
|
|
||||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
|
||||||
identityService = new IdentityService(apiService);
|
|
||||||
groupIdentityService = new GroupIdentityService(apiService);
|
|
||||||
testUser = await identityService.createIdentityUserWithRole(apiService, [identityService.ROLES.ACTIVITI_USER]);
|
|
||||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
|
||||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
|
||||||
|
|
||||||
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async () => {
|
|
||||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
|
||||||
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
|
||||||
await appListCloudComponent.checkApsContainer();
|
|
||||||
await appListCloudComponent.goToApp(simpleApp);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkTaskListIsLoaded();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C315170] Should be able to complete a task with a form with required number widgets', async () => {
|
|
||||||
await tasksCloudDemoPage.openNewTaskForm();
|
|
||||||
await startTask.checkFormIsDisplayed();
|
|
||||||
await startTask.addName(standaloneTaskName);
|
|
||||||
await startTask.selectFormDefinition('requirednumbervisibility');
|
|
||||||
await startTask.clickStartButton();
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(standaloneTaskName);
|
|
||||||
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Number1');
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Number2');
|
|
||||||
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
|
||||||
|
|
||||||
await taskFormCloudComponent.formFields().setFieldValue(by.id, 'Number1', 5);
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Number2');
|
|
||||||
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
|
||||||
|
|
||||||
await taskFormCloudComponent.formFields().setFieldValue(by.id, 'Number1', 123);
|
|
||||||
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Number2');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C315169] Should be able to start a process with visibility condition for number widgets', async () => {
|
|
||||||
|
|
||||||
await processCloudDemoPage.openNewProcessForm();
|
|
||||||
await startProcessPage.clearField(startProcessPage.processNameInput);
|
|
||||||
await startProcessPage.selectFromProcessDropdown('numbervisibilityprocess');
|
|
||||||
await startProcessPage.enterProcessName(processName);
|
|
||||||
await startProcessPage.clickStartProcessButton();
|
|
||||||
|
|
||||||
await processDetailsCloudDemoPage.selectProcessTaskByName(processName);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow('number_visibility_task');
|
|
||||||
await taskFormCloudComponent.clickClaimButton();
|
|
||||||
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Number1');
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Number2');
|
|
||||||
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
|
||||||
|
|
||||||
await taskFormCloudComponent.formFields().setFieldValue(by.id, 'Number1', 5);
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Number2');
|
|
||||||
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
|
||||||
|
|
||||||
await taskFormCloudComponent.formFields().setFieldValue(by.id, 'Number1', 123);
|
|
||||||
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Number2');
|
|
||||||
|
|
||||||
await taskFormCloudComponent.formFields().setFieldValue(by.id, 'Number1', 4);
|
|
||||||
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
|
||||||
await taskFormCloudComponent.clickCompleteButton();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C315232] Should be able to complete a process with visibility condition for boolean widgets', async () => {
|
|
||||||
|
|
||||||
await processCloudDemoPage.openNewProcessForm();
|
|
||||||
await startProcessPage.clearField(startProcessPage.processNameInput);
|
|
||||||
await startProcessPage.selectFromProcessDropdown('booleanvisibilityprocess');
|
|
||||||
await startProcessPage.enterProcessName(processName);
|
|
||||||
await startProcessPage.clickStartProcessButton();
|
|
||||||
|
|
||||||
await processDetailsCloudDemoPage.selectProcessTaskByName(processName);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow('boolean_visibility_task');
|
|
||||||
await taskFormCloudComponent.clickClaimButton();
|
|
||||||
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Checkbox2');
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Checkbox3');
|
|
||||||
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
|
||||||
|
|
||||||
await taskFormCloudComponent.formFields().clickField(by.id, 'Checkbox1');
|
|
||||||
await taskFormCloudComponent.formFields().clickField(by.id, 'Checkbox2');
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Checkbox3');
|
|
||||||
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
|
||||||
|
|
||||||
await taskFormCloudComponent.clickCompleteButton();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C315208] Should be able to complete a task with Checkbox widgets', async () => {
|
|
||||||
await tasksCloudDemoPage.openNewTaskForm();
|
|
||||||
await startTask.checkFormIsDisplayed();
|
|
||||||
await startTask.addName(standaloneTaskName);
|
|
||||||
await startTask.selectFormDefinition('booleanvisibility');
|
|
||||||
await startTask.clickStartButton();
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(standaloneTaskName);
|
|
||||||
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Checkbox2');
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsHidden('Checkbox3');
|
|
||||||
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeTruthy();
|
|
||||||
|
|
||||||
await taskFormCloudComponent.formFields().clickField(by.id, 'Checkbox1');
|
|
||||||
await taskFormCloudComponent.formFields().clickField(by.id, 'Checkbox2');
|
|
||||||
await taskFormCloudComponent.formFields().checkWidgetIsVisible('Checkbox3');
|
|
||||||
await expect(await taskFormCloudComponent.formFields().isCompleteFormButtonDisabled()).toBeFalsy();
|
|
||||||
|
|
||||||
await taskFormCloudComponent.clickCompleteButton();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
@@ -53,7 +53,6 @@ describe('Process Header cloud component', () => {
|
|||||||
let runningProcess, runningCreatedDate, parentCompleteProcess, childCompleteProcess, completedCreatedDate;
|
let runningProcess, runningCreatedDate, parentCompleteProcess, childCompleteProcess, completedCreatedDate;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
|
||||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
identityService = new IdentityService(apiService);
|
identityService = new IdentityService(apiService);
|
||||||
groupIdentityService = new GroupIdentityService(apiService);
|
groupIdentityService = new GroupIdentityService(apiService);
|
||||||
@@ -63,27 +62,31 @@ describe('Process Header cloud component', () => {
|
|||||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||||
|
|
||||||
await apiService.login(testUser.email, testUser.password);
|
await apiService.login(testUser.email, testUser.password);
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
|
||||||
|
|
||||||
const processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
const childProcessDefinition = await processDefinitionService.getProcessDefinitions(subProcessApp);
|
const dropdownRestProcess = await processDefinitionService.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp);
|
||||||
|
|
||||||
|
const processparent = await processDefinitionService.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SUB_PROCESS_APP.processes.processparent, subProcessApp);
|
||||||
|
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
runningProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key,
|
runningProcess = await processInstancesService.createProcessInstance(dropdownRestProcess.entry.key,
|
||||||
simpleApp, { name: StringUtil.generateRandomString(), businessKey: 'test' });
|
simpleApp, { name: StringUtil.generateRandomString(), businessKey: 'test' });
|
||||||
|
|
||||||
runningCreatedDate = moment(runningProcess.entry.startDate).format(formatDate);
|
runningCreatedDate = moment(runningProcess.entry.startDate).format(formatDate);
|
||||||
parentCompleteProcess = await processInstancesService.createProcessInstance(childProcessDefinition.list.entries[0].entry.key,
|
|
||||||
|
parentCompleteProcess = await processInstancesService.createProcessInstance(processparent.entry.key,
|
||||||
subProcessApp);
|
subProcessApp);
|
||||||
|
|
||||||
queryService = new QueryService(apiService);
|
queryService = new QueryService(apiService);
|
||||||
|
|
||||||
const parentProcessInstance = await queryService.getProcessInstanceSubProcesses(parentCompleteProcess.entry.id,
|
const parentProcessInstance = await queryService.getProcessInstanceSubProcesses(parentCompleteProcess.entry.id,
|
||||||
subProcessApp);
|
subProcessApp);
|
||||||
|
|
||||||
childCompleteProcess = parentProcessInstance.list.entries[0];
|
childCompleteProcess = parentProcessInstance.list.entries[0];
|
||||||
|
|
||||||
completedCreatedDate = moment(childCompleteProcess.entry.startDate).format(formatDate);
|
completedCreatedDate = moment(childCompleteProcess.entry.startDate).format(formatDate);
|
||||||
|
|
||||||
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async() => {
|
afterAll(async() => {
|
||||||
|
@@ -161,7 +161,10 @@ describe('Start Task Form', () => {
|
|||||||
browser.params.config.bpmHost,
|
browser.params.config.bpmHost,
|
||||||
browser.params.config.oauth2.host,
|
browser.params.config.oauth2.host,
|
||||||
browser.params.config.identityHost,
|
browser.params.config.identityHost,
|
||||||
browser.params.config.oauth2.clientId);
|
browser.params.config.oauth2.clientId,
|
||||||
|
false);
|
||||||
|
await loginSSOPage.clickOnSSOButton();
|
||||||
|
|
||||||
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||||
await LocalStorageUtil.setConfigField('adf-cloud-start-process', JSON.stringify(startProcessCloudConfig));
|
await LocalStorageUtil.setConfigField('adf-cloud-start-process', JSON.stringify(startProcessCloudConfig));
|
||||||
});
|
});
|
||||||
@@ -223,7 +226,7 @@ describe('Start Task Form', () => {
|
|||||||
it('[C311428] Should display the Standalone forms based on the flag set', async () => {
|
it('[C311428] Should display the Standalone forms based on the flag set', async () => {
|
||||||
await tasksCloudDemoPage.openNewTaskForm();
|
await tasksCloudDemoPage.openNewTaskForm();
|
||||||
await startTask.checkFormIsDisplayed();
|
await startTask.checkFormIsDisplayed();
|
||||||
await startTask.checkFormDefinitionIsNotDisplayed('uploadfileform');
|
await startTask.checkFormDefinitionIsNotDisplayed(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.forms.uploadfileform);
|
||||||
await startTask.checkFormDefinitionIsDisplayed(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.forms.starteventform);
|
await startTask.checkFormDefinitionIsDisplayed(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.forms.starteventform);
|
||||||
await startTask.checkFormDefinitionIsDisplayed(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.forms.formtotestvalidations);
|
await startTask.checkFormDefinitionIsDisplayed(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.forms.formtotestvalidations);
|
||||||
});
|
});
|
||||||
@@ -240,7 +243,8 @@ describe('Start Task Form', () => {
|
|||||||
await processCloudDemoPage.openNewProcessForm();
|
await processCloudDemoPage.openNewProcessForm();
|
||||||
await startProcessPage.clearField(startProcessPage.processNameInput);
|
await startProcessPage.clearField(startProcessPage.processNameInput);
|
||||||
await startProcessPage.enterProcessName(startEventFormProcess);
|
await startProcessPage.enterProcessName(startEventFormProcess);
|
||||||
await startProcessPage.selectFromProcessDropdown('processwithstarteventform');
|
await startProcessPage.selectFromProcessDropdown(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.processwithstarteventform);
|
||||||
|
|
||||||
await startProcessPage.formFields().checkFormIsDisplayed();
|
await startProcessPage.formFields().checkFormIsDisplayed();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
348
e2e/process-services-cloud/task-form-cloud-component-tab.e2e.ts
Normal file
348
e2e/process-services-cloud/task-form-cloud-component-tab.e2e.ts
Normal file
@@ -0,0 +1,348 @@
|
|||||||
|
/*!
|
||||||
|
* @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 { browser } from 'protractor';
|
||||||
|
import {
|
||||||
|
AppListCloudPage,
|
||||||
|
StringUtil,
|
||||||
|
ApiService,
|
||||||
|
LoginSSOPage,
|
||||||
|
TasksService,
|
||||||
|
ProcessDefinitionsService,
|
||||||
|
ProcessInstancesService,
|
||||||
|
TaskHeaderCloudPage,
|
||||||
|
TaskFormCloudComponent,
|
||||||
|
Widget, IdentityService, GroupIdentityService
|
||||||
|
} from '@alfresco/adf-testing';
|
||||||
|
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||||
|
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||||
|
import { FormCloudService } from '../../lib/testing/src/lib/form-cloud/actions/form-cloud.service';
|
||||||
|
|
||||||
|
describe('Task form cloud component', () => {
|
||||||
|
|
||||||
|
const loginSSOPage = new LoginSSOPage();
|
||||||
|
const navigationBarPage = new NavigationBarPage();
|
||||||
|
const appListCloudComponent = new AppListCloudPage();
|
||||||
|
const tasksCloudDemoPage = new TasksCloudDemoPage();
|
||||||
|
const taskHeaderCloudPage = new TaskHeaderCloudPage();
|
||||||
|
const taskFormCloudComponent = new TaskFormCloudComponent();
|
||||||
|
const widget = new Widget();
|
||||||
|
|
||||||
|
let processDefinitionService: ProcessDefinitionsService;
|
||||||
|
let processInstancesService: ProcessInstancesService;
|
||||||
|
let identityService: IdentityService;
|
||||||
|
|
||||||
|
let completedTask, assigneeTask, toBeCompletedTask, formValidationsTask, testUser;
|
||||||
|
const candidateBaseApp = browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name;
|
||||||
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
|
const completedTaskName = StringUtil.generateRandomString(), assignedTaskName = StringUtil.generateRandomString();
|
||||||
|
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
|
||||||
|
const apiServiceHrUser = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
|
||||||
|
|
||||||
|
const visibilityConditionTasks = [];
|
||||||
|
|
||||||
|
const tab = {
|
||||||
|
tabWithFields: 'tabWithFields',
|
||||||
|
tabFieldValue: 'tabBasicFieldValue',
|
||||||
|
tabVarValue: 'tabBasicVarValue',
|
||||||
|
tabVarField: 'tabBasicVarField',
|
||||||
|
tabFieldField: 'tabBasicFieldField',
|
||||||
|
tabVarVar: 'tabBasicVarVar',
|
||||||
|
tabFieldVar: 'tabBasicFieldVar',
|
||||||
|
tabNextOperators: 'tabNextOperators'
|
||||||
|
};
|
||||||
|
|
||||||
|
const widgets = {
|
||||||
|
textOneId: 'TextOne',
|
||||||
|
textTwoId: 'TextTwo',
|
||||||
|
textThreeId: 'TextThree',
|
||||||
|
textFourId: 'TextFour',
|
||||||
|
numberOneId: 'NumberOne'
|
||||||
|
};
|
||||||
|
|
||||||
|
const value = {
|
||||||
|
displayTab: 'showTab',
|
||||||
|
notDisplayTab: 'anythingElse'
|
||||||
|
};
|
||||||
|
|
||||||
|
beforeAll(async () => {
|
||||||
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
|
|
||||||
|
identityService = new IdentityService(apiService);
|
||||||
|
const groupIdentityService = new GroupIdentityService(apiService);
|
||||||
|
|
||||||
|
testUser = await identityService.createIdentityUserWithRole(apiService, [identityService.ROLES.ACTIVITI_USER]);
|
||||||
|
|
||||||
|
const groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||||
|
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||||
|
|
||||||
|
await apiServiceHrUser.login(testUser.email, testUser.password);
|
||||||
|
const tasksService = new TasksService(apiServiceHrUser);
|
||||||
|
|
||||||
|
assigneeTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateBaseApp);
|
||||||
|
await tasksService.claimTask(assigneeTask.entry.id, candidateBaseApp);
|
||||||
|
|
||||||
|
const formCloudService = new FormCloudService(apiServiceHrUser);
|
||||||
|
|
||||||
|
const tabVisibilityFieldsId = await formCloudService.getIdByFormName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name, browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.forms.tabVisibilityFields.name);
|
||||||
|
|
||||||
|
const tabVisibilityVarsId = await formCloudService.getIdByFormName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name, browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.forms.tabVisibilityVars.name);
|
||||||
|
|
||||||
|
for (let i = 0; i < 3; i++) {
|
||||||
|
visibilityConditionTasks[i] = await tasksService.createStandaloneTaskWithForm(StringUtil.generateRandomString(),
|
||||||
|
simpleApp, tabVisibilityFieldsId);
|
||||||
|
await tasksService.claimTask(visibilityConditionTasks[i].entry.id, simpleApp);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 3; i < 6; i++) {
|
||||||
|
visibilityConditionTasks[i] = await tasksService.createStandaloneTaskWithForm(StringUtil.generateRandomString(),
|
||||||
|
simpleApp, tabVisibilityVarsId);
|
||||||
|
await tasksService.claimTask(visibilityConditionTasks[i].entry.id, simpleApp);
|
||||||
|
}
|
||||||
|
|
||||||
|
const formToTestValidationsKey = await formCloudService.getIdByFormName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name,
|
||||||
|
browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.forms.formtotestvalidations);
|
||||||
|
|
||||||
|
formValidationsTask = await tasksService.createStandaloneTaskWithForm(StringUtil.generateRandomString(), candidateBaseApp, formToTestValidationsKey);
|
||||||
|
await tasksService.claimTask(formValidationsTask.entry.id, candidateBaseApp);
|
||||||
|
|
||||||
|
toBeCompletedTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateBaseApp);
|
||||||
|
await tasksService.claimTask(toBeCompletedTask.entry.id, candidateBaseApp);
|
||||||
|
|
||||||
|
completedTask = await tasksService.createStandaloneTask(assignedTaskName, candidateBaseApp);
|
||||||
|
await tasksService.claimTask(completedTask.entry.id, candidateBaseApp);
|
||||||
|
await tasksService.createAndCompleteTask(completedTaskName, candidateBaseApp);
|
||||||
|
|
||||||
|
processDefinitionService = new ProcessDefinitionsService(apiServiceHrUser);
|
||||||
|
|
||||||
|
const processDefinition = await processDefinitionService
|
||||||
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.candidateUserProcess, candidateBaseApp);
|
||||||
|
|
||||||
|
processInstancesService = new ProcessInstancesService(apiServiceHrUser);
|
||||||
|
await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
||||||
|
|
||||||
|
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||||
|
|
||||||
|
}, 5 * 60 * 1000);
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||||
|
await appListCloudComponent.checkApsContainer();
|
||||||
|
await appListCloudComponent.goToApp(simpleApp);
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async () => {
|
||||||
|
try {
|
||||||
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
|
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
|
await browser.executeScript('window.sessionStorage.clear();');
|
||||||
|
await browser.executeScript('window.localStorage.clear();');
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Complete task with form - cloud directive', () => {
|
||||||
|
|
||||||
|
it('[C315174] Should be able to complete a standalone task with visible tab with empty value for field', async () => {
|
||||||
|
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
||||||
|
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[0].entry.name);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[0].entry.name);
|
||||||
|
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||||
|
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabFieldValue);
|
||||||
|
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||||
|
await widget.textWidget().isWidgetNotVisible(widgets.textTwoId);
|
||||||
|
await widget.textWidget().setValue(widgets.textOneId, value.displayTab);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabFieldValue);
|
||||||
|
|
||||||
|
await taskFormCloudComponent.clickCompleteButton();
|
||||||
|
await browser.sleep(1000);
|
||||||
|
await browser.refresh();
|
||||||
|
|
||||||
|
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(visibilityConditionTasks[0].entry.name);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.completedTasksFilter().clickTaskFilter();
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[0].entry.name);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[0].entry.name);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabFieldValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C315177] Should be able to complete a standalone task with invisible tab with invalid value for field', async () => {
|
||||||
|
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
||||||
|
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[1].entry.name);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[1].entry.name);
|
||||||
|
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||||
|
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabFieldField);
|
||||||
|
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||||
|
|
||||||
|
await widget.textWidget().setValue(widgets.textOneId, value.displayTab);
|
||||||
|
await widget.textWidget().setValue(widgets.textThreeId, value.displayTab);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabFieldField);
|
||||||
|
await widget.tab().clickTabByLabel(tab.tabFieldField);
|
||||||
|
await widget.textWidget().isWidgetVisible(widgets.numberOneId);
|
||||||
|
await widget.textWidget().setValue(widgets.numberOneId, value.displayTab);
|
||||||
|
|
||||||
|
await widget.tab().clickTabByLabel(tab.tabWithFields);
|
||||||
|
await widget.textWidget().setValue(widgets.textOneId, value.notDisplayTab);
|
||||||
|
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabFieldField);
|
||||||
|
|
||||||
|
await taskFormCloudComponent.clickCompleteButton();
|
||||||
|
await browser.sleep(1000);
|
||||||
|
await browser.refresh();
|
||||||
|
|
||||||
|
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(visibilityConditionTasks[1].entry.name);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.completedTasksFilter().clickTaskFilter();
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[1].entry.name);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[1].entry.name);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabFieldField);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C315178] Should be able to complete a standalone task with invisible tab with valid value', async () => {
|
||||||
|
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
||||||
|
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[2].entry.name);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[2].entry.name);
|
||||||
|
|
||||||
|
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||||
|
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabFieldVar);
|
||||||
|
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||||
|
await widget.textWidget().isWidgetNotVisible(widgets.textFourId);
|
||||||
|
|
||||||
|
await widget.textWidget().setValue(widgets.textOneId, value.displayTab);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabFieldVar);
|
||||||
|
await widget.tab().clickTabByLabel(tab.tabFieldVar);
|
||||||
|
await widget.textWidget().isWidgetVisible(widgets.textFourId);
|
||||||
|
await widget.textWidget().setValue(widgets.textFourId, value.displayTab);
|
||||||
|
|
||||||
|
await widget.tab().clickTabByLabel(tab.tabWithFields);
|
||||||
|
await widget.textWidget().setValue(widgets.textOneId, value.notDisplayTab);
|
||||||
|
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabFieldVar);
|
||||||
|
await taskFormCloudComponent.clickCompleteButton();
|
||||||
|
await browser.sleep(1000);
|
||||||
|
await browser.refresh();
|
||||||
|
|
||||||
|
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(visibilityConditionTasks[2].entry.name);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.completedTasksFilter().clickTaskFilter();
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[2].entry.name);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[2].entry.name);
|
||||||
|
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabFieldVar);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C315175] Should be able to complete a standalone task with invisible tab with empty value for field', async () => {
|
||||||
|
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
||||||
|
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[3].entry.name);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[3].entry.name);
|
||||||
|
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||||
|
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabVarValue);
|
||||||
|
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||||
|
await widget.textWidget().isWidgetNotVisible(widgets.textTwoId);
|
||||||
|
|
||||||
|
await taskFormCloudComponent.clickCompleteButton();
|
||||||
|
await browser.sleep(1000);
|
||||||
|
await browser.refresh();
|
||||||
|
|
||||||
|
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(visibilityConditionTasks[3].entry.name);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.completedTasksFilter().clickTaskFilter();
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[3].entry.name);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[3].entry.name);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabVarValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C315176] Should not be able to complete a standalone task with visible tab with invalid value for field', async () => {
|
||||||
|
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
||||||
|
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[4].entry.name);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[4].entry.name);
|
||||||
|
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||||
|
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabVarField);
|
||||||
|
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||||
|
await widget.textWidget().isWidgetNotVisible(widgets.numberOneId);
|
||||||
|
|
||||||
|
await widget.textWidget().setValue(widgets.textOneId, value.displayTab);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabVarField);
|
||||||
|
|
||||||
|
await widget.tab().clickTabByLabel(tab.tabVarField);
|
||||||
|
await widget.textWidget().setValue(widgets.numberOneId, value.displayTab);
|
||||||
|
|
||||||
|
await expect(await taskFormCloudComponent.isCompleteButtonEnabled()).toEqual(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C315179] Should be able to complete a standalone task with visible tab with valid value for field', async () => {
|
||||||
|
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
||||||
|
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[5].entry.name);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[5].entry.name);
|
||||||
|
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||||
|
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabVarVar);
|
||||||
|
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||||
|
|
||||||
|
await widget.tab().clickTabByLabel(tab.tabVarVar);
|
||||||
|
await widget.textWidget().setValue(widgets.textThreeId, value.displayTab);
|
||||||
|
|
||||||
|
await taskFormCloudComponent.clickCompleteButton();
|
||||||
|
await browser.sleep(1000);
|
||||||
|
await browser.refresh();
|
||||||
|
|
||||||
|
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(visibilityConditionTasks[5].entry.name);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.completedTasksFilter().clickTaskFilter();
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[5].entry.name);
|
||||||
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[5].entry.name);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
||||||
|
await widget.tab().checkTabIsDisplayedByLabel(tab.tabVarVar);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
@@ -41,9 +41,7 @@ describe('Task form cloud component', () => {
|
|||||||
const taskHeaderCloudPage = new TaskHeaderCloudPage();
|
const taskHeaderCloudPage = new TaskHeaderCloudPage();
|
||||||
const taskFormCloudComponent = new TaskFormCloudComponent();
|
const taskFormCloudComponent = new TaskFormCloudComponent();
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
const formToTestValidationsKey = 'form-49904910-603c-48e9-8c8c-1d442c0fa524';
|
|
||||||
|
|
||||||
let tasksService: TasksService;
|
|
||||||
let processDefinitionService: ProcessDefinitionsService;
|
let processDefinitionService: ProcessDefinitionsService;
|
||||||
let processInstancesService: ProcessInstancesService;
|
let processInstancesService: ProcessInstancesService;
|
||||||
let identityService: IdentityService;
|
let identityService: IdentityService;
|
||||||
@@ -55,69 +53,29 @@ describe('Task form cloud component', () => {
|
|||||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
|
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
|
||||||
const apiServiceHrUser = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
|
const apiServiceHrUser = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
|
||||||
|
|
||||||
const visibilityConditionTasks = [];
|
|
||||||
|
|
||||||
const tab = {
|
|
||||||
tabWithFields: 'tabWithFields',
|
|
||||||
tabFieldValue: 'tabBasicFieldValue',
|
|
||||||
tabVarValue: 'tabBasicVarValue',
|
|
||||||
tabVarField: 'tabBasicVarField',
|
|
||||||
tabFieldField: 'tabBasicFieldField',
|
|
||||||
tabVarVar: 'tabBasicVarVar',
|
|
||||||
tabFieldVar: 'tabBasicFieldVar',
|
|
||||||
tabNextOperators: 'tabNextOperators'
|
|
||||||
};
|
|
||||||
|
|
||||||
const widgets = {
|
|
||||||
textOneId: 'TextOne',
|
|
||||||
textTwoId: 'TextTwo',
|
|
||||||
textThreeId: 'TextThree',
|
|
||||||
textFourId: 'TextFour',
|
|
||||||
numberOneId: 'NumberOne'
|
|
||||||
};
|
|
||||||
|
|
||||||
const value = {
|
|
||||||
displayTab: 'showTab',
|
|
||||||
notDisplayTab: 'anythingElse'
|
|
||||||
};
|
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
|
|
||||||
identityService = new IdentityService(apiService);
|
identityService = new IdentityService(apiService);
|
||||||
const groupIdentityService = new GroupIdentityService(apiService);
|
const groupIdentityService = new GroupIdentityService(apiService);
|
||||||
|
|
||||||
await apiServiceHrUser.login(browser.params.testConfig.hrUser.email, browser.params.testConfig.hrUser.password);
|
|
||||||
const formCloudService = new FormCloudService(apiServiceHrUser);
|
|
||||||
|
|
||||||
testUser = await identityService.createIdentityUserWithRole(apiService, [identityService.ROLES.ACTIVITI_USER]);
|
testUser = await identityService.createIdentityUserWithRole(apiService, [identityService.ROLES.ACTIVITI_USER]);
|
||||||
|
|
||||||
const groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
const groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||||
await apiService.login(testUser.email, testUser.password);
|
|
||||||
|
|
||||||
tasksService = new TasksService(apiServiceHrUser);
|
await apiServiceHrUser.login(testUser.email, testUser.password);
|
||||||
|
const tasksService = new TasksService(apiServiceHrUser);
|
||||||
const queryService = new QueryService(apiServiceHrUser);
|
const queryService = new QueryService(apiServiceHrUser);
|
||||||
createdTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateBaseApp);
|
createdTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateBaseApp);
|
||||||
|
|
||||||
assigneeTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateBaseApp);
|
assigneeTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateBaseApp);
|
||||||
await tasksService.claimTask(assigneeTask.entry.id, candidateBaseApp);
|
await tasksService.claimTask(assigneeTask.entry.id, candidateBaseApp);
|
||||||
|
|
||||||
const tabVisibilityFieldsId = await formCloudService.getIdByFormName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name, browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.forms.tabVisibilityFields.name);
|
const formCloudService = new FormCloudService(apiServiceHrUser);
|
||||||
|
|
||||||
const tabVisibilityVarsId = await formCloudService.getIdByFormName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name, browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.forms.tabVisibilityVars.name);
|
const formToTestValidationsKey = await formCloudService.getIdByFormName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name,
|
||||||
|
browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.forms.formtotestvalidations);
|
||||||
for (let i = 0; i < 3; i++) {
|
|
||||||
visibilityConditionTasks[i] = await tasksService.createStandaloneTaskWithForm(StringUtil.generateRandomString(),
|
|
||||||
simpleApp, tabVisibilityFieldsId);
|
|
||||||
await tasksService.claimTask(visibilityConditionTasks[i].entry.id, simpleApp);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 3; i < 6; i++) {
|
|
||||||
visibilityConditionTasks[i] = await tasksService.createStandaloneTaskWithForm(StringUtil.generateRandomString(),
|
|
||||||
simpleApp, tabVisibilityVarsId);
|
|
||||||
await tasksService.claimTask(visibilityConditionTasks[i].entry.id, simpleApp);
|
|
||||||
}
|
|
||||||
|
|
||||||
formValidationsTask = await tasksService.createStandaloneTaskWithForm(StringUtil.generateRandomString(), candidateBaseApp, formToTestValidationsKey);
|
formValidationsTask = await tasksService.createStandaloneTaskWithForm(StringUtil.generateRandomString(), candidateBaseApp, formToTestValidationsKey);
|
||||||
await tasksService.claimTask(formValidationsTask.entry.id, candidateBaseApp);
|
await tasksService.claimTask(formValidationsTask.entry.id, candidateBaseApp);
|
||||||
@@ -137,9 +95,13 @@ describe('Task form cloud component', () => {
|
|||||||
processInstancesService = new ProcessInstancesService(apiServiceHrUser);
|
processInstancesService = new ProcessInstancesService(apiServiceHrUser);
|
||||||
await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
||||||
|
|
||||||
processDefinition = await processDefinitionService.getProcessDefinitionByName('dropdownrestprocess', simpleApp);
|
processDefinition = await processDefinitionService
|
||||||
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp);
|
||||||
|
|
||||||
const formProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
const formProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
||||||
|
|
||||||
const formTasks = await queryService.getProcessInstanceTasks(formProcess.entry.id, simpleApp);
|
const formTasks = await queryService.getProcessInstanceTasks(formProcess.entry.id, simpleApp);
|
||||||
|
|
||||||
formTaskId = formTasks.list.entries[0].entry.id;
|
formTaskId = formTasks.list.entries[0].entry.id;
|
||||||
|
|
||||||
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||||
@@ -328,186 +290,4 @@ describe('Task form cloud component', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Complete task with form - cloud directive', () => {
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
|
||||||
await appListCloudComponent.checkApsContainer();
|
|
||||||
await appListCloudComponent.goToApp(simpleApp);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C315174] Should be able to complete a standalone task with visible tab with empty value for field', async () => {
|
|
||||||
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
|
||||||
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[0].entry.name);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[0].entry.name);
|
|
||||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
|
||||||
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabFieldValue);
|
|
||||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
|
||||||
await widget.textWidget().isWidgetNotVisible(widgets.textTwoId);
|
|
||||||
await widget.textWidget().setValue(widgets.textOneId, value.displayTab);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabFieldValue);
|
|
||||||
|
|
||||||
await taskFormCloudComponent.clickCompleteButton();
|
|
||||||
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(visibilityConditionTasks[0].entry.name);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.completedTasksFilter().clickTaskFilter();
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[0].entry.name);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[0].entry.name);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabFieldValue);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C315177] Should be able to complete a standalone task with invisible tab with invalid value for field', async () => {
|
|
||||||
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
|
||||||
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[1].entry.name);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[1].entry.name);
|
|
||||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
|
||||||
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabFieldField);
|
|
||||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
|
||||||
|
|
||||||
await widget.textWidget().setValue(widgets.textOneId, value.displayTab);
|
|
||||||
await widget.textWidget().setValue(widgets.textThreeId, value.displayTab);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabFieldField);
|
|
||||||
await widget.tab().clickTabByLabel(tab.tabFieldField);
|
|
||||||
await widget.textWidget().isWidgetVisible(widgets.numberOneId);
|
|
||||||
await widget.textWidget().setValue(widgets.numberOneId, value.displayTab);
|
|
||||||
|
|
||||||
await widget.tab().clickTabByLabel(tab.tabWithFields);
|
|
||||||
await widget.textWidget().setValue(widgets.textOneId, value.notDisplayTab);
|
|
||||||
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabFieldField);
|
|
||||||
|
|
||||||
await taskFormCloudComponent.clickCompleteButton();
|
|
||||||
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(visibilityConditionTasks[1].entry.name);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.completedTasksFilter().clickTaskFilter();
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[1].entry.name);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[1].entry.name);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabFieldField);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C315178] Should be able to complete a standalone task with invisible tab with valid value', async () => {
|
|
||||||
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
|
||||||
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[2].entry.name);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[2].entry.name);
|
|
||||||
|
|
||||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
|
||||||
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabFieldVar);
|
|
||||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
|
||||||
await widget.textWidget().isWidgetNotVisible(widgets.textFourId);
|
|
||||||
|
|
||||||
await widget.textWidget().setValue(widgets.textOneId, value.displayTab);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabFieldVar);
|
|
||||||
await widget.tab().clickTabByLabel(tab.tabFieldVar);
|
|
||||||
await widget.textWidget().isWidgetVisible(widgets.textFourId);
|
|
||||||
await widget.textWidget().setValue(widgets.textFourId, value.displayTab);
|
|
||||||
|
|
||||||
await widget.tab().clickTabByLabel(tab.tabWithFields);
|
|
||||||
await widget.textWidget().setValue(widgets.textOneId, value.notDisplayTab);
|
|
||||||
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabFieldVar);
|
|
||||||
await taskFormCloudComponent.clickCompleteButton();
|
|
||||||
|
|
||||||
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(visibilityConditionTasks[2].entry.name);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.completedTasksFilter().clickTaskFilter();
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[2].entry.name);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[2].entry.name);
|
|
||||||
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabFieldVar);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C315175] Should be able to complete a standalone task with invisible tab with empty value for field', async () => {
|
|
||||||
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
|
||||||
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[3].entry.name);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[3].entry.name);
|
|
||||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
|
||||||
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabVarValue);
|
|
||||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
|
||||||
await widget.textWidget().isWidgetNotVisible(widgets.textTwoId);
|
|
||||||
|
|
||||||
await taskFormCloudComponent.clickCompleteButton();
|
|
||||||
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(visibilityConditionTasks[3].entry.name);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.completedTasksFilter().clickTaskFilter();
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[3].entry.name);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[3].entry.name);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabVarValue);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C315176] Should not be able to complete a standalone task with visible tab with invalid value for field', async () => {
|
|
||||||
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
|
||||||
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[4].entry.name);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[4].entry.name);
|
|
||||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
|
||||||
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsNotDisplayedByLabel(tab.tabVarField);
|
|
||||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
|
||||||
await widget.textWidget().isWidgetNotVisible(widgets.numberOneId);
|
|
||||||
|
|
||||||
await widget.textWidget().setValue(widgets.textOneId, value.displayTab);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabVarField);
|
|
||||||
|
|
||||||
await widget.tab().clickTabByLabel(tab.tabVarField);
|
|
||||||
await widget.textWidget().setValue(widgets.numberOneId, value.displayTab);
|
|
||||||
|
|
||||||
await expect(await taskFormCloudComponent.isCompleteButtonEnabled()).toEqual(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C315179] Should be able to complete a standalone task with visible tab with valid value for field', async () => {
|
|
||||||
await tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
|
||||||
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[5].entry.name);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[5].entry.name);
|
|
||||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
|
||||||
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabVarVar);
|
|
||||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
|
||||||
|
|
||||||
await widget.tab().clickTabByLabel(tab.tabVarVar);
|
|
||||||
await widget.textWidget().setValue(widgets.textThreeId, value.displayTab);
|
|
||||||
|
|
||||||
await taskFormCloudComponent.clickCompleteButton();
|
|
||||||
await expect(await tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(visibilityConditionTasks[5].entry.name);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.completedTasksFilter().clickTaskFilter();
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(visibilityConditionTasks[5].entry.name);
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(visibilityConditionTasks[5].entry.name);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
|
|
||||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabVarVar);
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -16,7 +16,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import CONSTANTS = require('../util/constants');
|
import CONSTANTS = require('../util/constants');
|
||||||
import { ApiService, AppListCloudPage, GroupIdentityService, IdentityService, LocalStorageUtil, LoginSSOPage, StringUtil, TaskHeaderCloudPage, TasksService } from '@alfresco/adf-testing';
|
import {
|
||||||
|
ApiService,
|
||||||
|
AppListCloudPage,
|
||||||
|
GroupIdentityService,
|
||||||
|
IdentityService,
|
||||||
|
LocalStorageUtil,
|
||||||
|
LoginSSOPage,
|
||||||
|
StringUtil,
|
||||||
|
TaskHeaderCloudPage,
|
||||||
|
TasksService
|
||||||
|
} from '@alfresco/adf-testing';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||||
@@ -55,6 +65,7 @@ describe('Task Header cloud component', () => {
|
|||||||
let groupIdentityService: GroupIdentityService;
|
let groupIdentityService: GroupIdentityService;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
|
||||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
identityService = new IdentityService(apiService);
|
identityService = new IdentityService(apiService);
|
||||||
groupIdentityService = new GroupIdentityService(apiService);
|
groupIdentityService = new GroupIdentityService(apiService);
|
||||||
@@ -67,12 +78,15 @@ describe('Task Header cloud component', () => {
|
|||||||
tasksService = new TasksService(apiService);
|
tasksService = new TasksService(apiService);
|
||||||
|
|
||||||
const createdTaskId = await tasksService.createStandaloneTask(basicCreatedTaskName, simpleApp);
|
const createdTaskId = await tasksService.createStandaloneTask(basicCreatedTaskName, simpleApp);
|
||||||
|
|
||||||
await tasksService.claimTask(createdTaskId.entry.id, simpleApp);
|
await tasksService.claimTask(createdTaskId.entry.id, simpleApp);
|
||||||
|
|
||||||
basicCreatedTask = await tasksService.getTask(createdTaskId.entry.id, simpleApp);
|
basicCreatedTask = await tasksService.getTask(createdTaskId.entry.id, simpleApp);
|
||||||
|
|
||||||
basicCreatedDate = moment(basicCreatedTask.entry.createdDate).format(formatDate);
|
basicCreatedDate = moment(basicCreatedTask.entry.createdDate).format(formatDate);
|
||||||
|
|
||||||
const completedTaskId = await tasksService.createStandaloneTask(completedTaskName,
|
const completedTaskId = await tasksService.createStandaloneTask(completedTaskName,
|
||||||
simpleApp, {priority: priority, description: description, dueDate: basicCreatedTask.entry.createdDate});
|
simpleApp, { priority: priority, description: description, dueDate: basicCreatedTask.entry.createdDate });
|
||||||
await tasksService.claimTask(completedTaskId.entry.id, simpleApp);
|
await tasksService.claimTask(completedTaskId.entry.id, simpleApp);
|
||||||
await tasksService.completeTask(completedTaskId.entry.id, simpleApp);
|
await tasksService.completeTask(completedTaskId.entry.id, simpleApp);
|
||||||
completedTask = await tasksService.getTask(completedTaskId.entry.id, simpleApp);
|
completedTask = await tasksService.getTask(completedTaskId.entry.id, simpleApp);
|
||||||
@@ -87,7 +101,6 @@ describe('Task Header cloud component', () => {
|
|||||||
subTaskCreatedDate = moment(subTask.entry.createdDate).format(formatDate);
|
subTaskCreatedDate = moment(subTask.entry.createdDate).format(formatDate);
|
||||||
|
|
||||||
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
@@ -109,7 +122,7 @@ describe('Task Header cloud component', () => {
|
|||||||
await expect(await taskHeaderCloudPage.getDescription())
|
await expect(await taskHeaderCloudPage.getDescription())
|
||||||
.toEqual(basicCreatedTask.entry.description === null ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : basicCreatedTask.entry.description);
|
.toEqual(basicCreatedTask.entry.description === null ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : basicCreatedTask.entry.description);
|
||||||
await expect(await taskHeaderCloudPage.getStatus()).toEqual(basicCreatedTask.entry.status);
|
await expect(await taskHeaderCloudPage.getStatus()).toEqual(basicCreatedTask.entry.status);
|
||||||
await expect(await taskHeaderCloudPage.getPriority()).toEqual(basicCreatedTask.entry.priority === 0 ? '' : basicCreatedTask.entry.priority.toString());
|
await expect(await taskHeaderCloudPage.getPriority()).toEqual(basicCreatedTask.entry.priority.toString());
|
||||||
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!basicCreatedTask.entry.category ?
|
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!basicCreatedTask.entry.category ?
|
||||||
CONSTANTS.TASK_DETAILS.NO_CATEGORY : basicCreatedTask.entry.category);
|
CONSTANTS.TASK_DETAILS.NO_CATEGORY : basicCreatedTask.entry.category);
|
||||||
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(basicCreatedTask.entry.dueDate === null ?
|
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(basicCreatedTask.entry.dueDate === null ?
|
||||||
@@ -129,7 +142,7 @@ describe('Task Header cloud component', () => {
|
|||||||
await expect(await taskHeaderCloudPage.getDescription())
|
await expect(await taskHeaderCloudPage.getDescription())
|
||||||
.toEqual(completedTask.entry.description === null ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : completedTask.entry.description);
|
.toEqual(completedTask.entry.description === null ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : completedTask.entry.description);
|
||||||
await expect(await taskHeaderCloudPage.getStatus()).toEqual(completedTask.entry.status);
|
await expect(await taskHeaderCloudPage.getStatus()).toEqual(completedTask.entry.status);
|
||||||
await expect(await taskHeaderCloudPage.getPriority()).toEqual(completedTask.entry.priority === '0' ? '' : completedTask.entry.priority.toString());
|
await expect(await taskHeaderCloudPage.getPriority()).toEqual(completedTask.entry.priority.toString());
|
||||||
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!completedTask.entry.category ?
|
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!completedTask.entry.category ?
|
||||||
CONSTANTS.TASK_DETAILS.NO_CATEGORY : completedTask.entry.category);
|
CONSTANTS.TASK_DETAILS.NO_CATEGORY : completedTask.entry.category);
|
||||||
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(completedTask.entry.dueDate === null ?
|
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(completedTask.entry.dueDate === null ?
|
||||||
@@ -148,7 +161,7 @@ describe('Task Header cloud component', () => {
|
|||||||
await expect(await taskHeaderCloudPage.getDescription())
|
await expect(await taskHeaderCloudPage.getDescription())
|
||||||
.toEqual(subTask.entry.description === null ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : subTask.entry.description);
|
.toEqual(subTask.entry.description === null ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : subTask.entry.description);
|
||||||
await expect(await taskHeaderCloudPage.getStatus()).toEqual(subTask.entry.status);
|
await expect(await taskHeaderCloudPage.getStatus()).toEqual(subTask.entry.status);
|
||||||
await expect(await taskHeaderCloudPage.getPriority()).toEqual(subTask.entry.priority === 0 ? '' : subTask.entry.priority.toString());
|
await expect(await taskHeaderCloudPage.getPriority()).toEqual(subTask.entry.priority.toString());
|
||||||
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!subTask.entry.category ?
|
await expect(await taskHeaderCloudPage.getCategory()).toEqual(!subTask.entry.category ?
|
||||||
CONSTANTS.TASK_DETAILS.NO_CATEGORY : subTask.entry.category);
|
CONSTANTS.TASK_DETAILS.NO_CATEGORY : subTask.entry.category);
|
||||||
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(subTask.entry.dueDate === null ?
|
await expect(await taskHeaderCloudPage.getDueDate()).toEqual(subTask.entry.dueDate === null ?
|
||||||
|
230
e2e/process-services-cloud/task-list-properties-sort.e2e.ts
Normal file
230
e2e/process-services-cloud/task-list-properties-sort.e2e.ts
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
/*!
|
||||||
|
* @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 { browser } from 'protractor';
|
||||||
|
import {
|
||||||
|
StringUtil, TasksService,
|
||||||
|
LoginSSOPage, ApiService,
|
||||||
|
AppListCloudPage, LocalStorageUtil, IdentityService, GroupIdentityService
|
||||||
|
} from '@alfresco/adf-testing';
|
||||||
|
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||||
|
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||||
|
import { TaskListCloudConfiguration } from './config/task-list-cloud.config';
|
||||||
|
|
||||||
|
describe('Edit task filters and task list properties', () => {
|
||||||
|
|
||||||
|
const loginSSOPage = new LoginSSOPage();
|
||||||
|
const navigationBarPage = new NavigationBarPage();
|
||||||
|
|
||||||
|
const appListCloudComponent = new AppListCloudPage();
|
||||||
|
const tasksCloudDemoPage = new TasksCloudDemoPage();
|
||||||
|
|
||||||
|
let tasksService: TasksService;
|
||||||
|
let identityService: IdentityService;
|
||||||
|
let groupIdentityService: GroupIdentityService;
|
||||||
|
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
|
||||||
|
|
||||||
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
|
const candidateBaseApp = browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name;
|
||||||
|
let createdTask, notDisplayedTask, priorityTask, subTask,
|
||||||
|
otherOwnerTask, testUser, groupInfo;
|
||||||
|
const priority = 30;
|
||||||
|
|
||||||
|
beforeAll(async () => {
|
||||||
|
|
||||||
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
|
identityService = new IdentityService(apiService);
|
||||||
|
groupIdentityService = new GroupIdentityService(apiService);
|
||||||
|
tasksService = new TasksService(apiService);
|
||||||
|
|
||||||
|
testUser = await identityService.createIdentityUserWithRole(apiService, [identityService.ROLES.ACTIVITI_USER]);
|
||||||
|
|
||||||
|
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||||
|
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||||
|
|
||||||
|
await apiService.login(testUser.email, testUser.password);
|
||||||
|
|
||||||
|
otherOwnerTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), simpleApp);
|
||||||
|
await tasksService.claimTask(otherOwnerTask.entry.id, simpleApp);
|
||||||
|
|
||||||
|
createdTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), simpleApp);
|
||||||
|
await tasksService.claimTask(createdTask.entry.id, simpleApp);
|
||||||
|
|
||||||
|
priorityTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), simpleApp, { priority: priority });
|
||||||
|
await tasksService.claimTask(priorityTask.entry.id, simpleApp);
|
||||||
|
|
||||||
|
notDisplayedTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateBaseApp);
|
||||||
|
await tasksService.claimTask(notDisplayedTask.entry.id, candidateBaseApp);
|
||||||
|
|
||||||
|
subTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), simpleApp, { 'parentTaskId': createdTask.entry.id });
|
||||||
|
await tasksService.claimTask(subTask.entry.id, simpleApp);
|
||||||
|
|
||||||
|
const jsonFile = new TaskListCloudConfiguration().getConfiguration();
|
||||||
|
|
||||||
|
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||||
|
await LocalStorageUtil.setConfigField('adf-cloud-task-list', JSON.stringify(jsonFile));
|
||||||
|
await LocalStorageUtil.setConfigField('adf-edit-task-filter', JSON.stringify({
|
||||||
|
'filterProperties': [
|
||||||
|
'taskId',
|
||||||
|
'appName',
|
||||||
|
'status',
|
||||||
|
'assignee',
|
||||||
|
'taskName',
|
||||||
|
'parentTaskId',
|
||||||
|
'priority',
|
||||||
|
'standalone',
|
||||||
|
'owner',
|
||||||
|
'processDefinitionId',
|
||||||
|
'processInstanceId',
|
||||||
|
'lastModified',
|
||||||
|
'sort',
|
||||||
|
'order'
|
||||||
|
],
|
||||||
|
'sortProperties': [
|
||||||
|
'id',
|
||||||
|
'name',
|
||||||
|
'createdDate',
|
||||||
|
'priority',
|
||||||
|
'processDefinitionId',
|
||||||
|
'processInstanceId',
|
||||||
|
'parentTaskId',
|
||||||
|
'priority',
|
||||||
|
'standalone',
|
||||||
|
'owner',
|
||||||
|
'assignee'
|
||||||
|
],
|
||||||
|
'actions': [
|
||||||
|
'save',
|
||||||
|
'saveAs',
|
||||||
|
'delete'
|
||||||
|
]
|
||||||
|
}));
|
||||||
|
}, 5 * 60 * 1000);
|
||||||
|
|
||||||
|
afterAll(async (done) => {
|
||||||
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
|
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Edit task filters and task list properties - sort properties', () => {
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||||
|
await appListCloudComponent.checkApsContainer();
|
||||||
|
await appListCloudComponent.goToApp(simpleApp);
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().openFilter();
|
||||||
|
await tasksCloudDemoPage.myTasksFilter().checkTaskFilterIsDisplayed();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C306901] Should display tasks sorted by task name when taskName is selected from sort dropdown', async () => {
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ASSIGNED');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('Name');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
||||||
|
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'Name')).toBe(true);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'Name')).toBe(true);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C290156] Should display tasks ordered by id when Id is selected from sort dropdown', async () => {
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ASSIGNED');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('Id');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
||||||
|
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'Id')).toBe(true);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'Id')).toBe(true);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C306903] Should display tasks sorted by processDefinitionId when processDefinitionId is selected from sort dropdown', async () => {
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ASSIGNED');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('ProcessDefinitionId');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'ProcessDefinitionId')).toBe(true);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'ProcessDefinitionId')).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C306905] Should display tasks sorted by processInstanceId when processInstanceId is selected from sort dropdown', async () => {
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ASSIGNED');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('ProcessInstanceId');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
||||||
|
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'ProcessInstanceId')).toBe(true);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'ProcessInstanceId')).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C306907] Should display tasks sorted by assignee when assignee is selected from sort dropdown', async () => {
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ALL');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('Assignee');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
||||||
|
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'Assignee')).toBe(true);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'Assignee')).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C306911] Should display tasks sorted by parentTaskId when parentTaskId is selected from sort dropdown', async () => {
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ALL');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('ParentTaskId');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
||||||
|
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'ParentTaskId')).toBe(true);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'ParentTaskId')).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C290087] Should display tasks ordered by priority when Priority is selected from sort dropdown', async () => {
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ALL');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('Priority');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
||||||
|
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'Priority')).toBe(true);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'Priority')).toBe(true);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C307115] Should display tasks sorted by owner when owner is selected from sort dropdown', async () => {
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ALL');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('Owner');
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
||||||
|
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'Owner')).toBe(true);
|
||||||
|
|
||||||
|
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
||||||
|
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'Owner')).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
@@ -366,123 +366,4 @@ describe('Edit task filters and task list properties', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Edit task filters and task list properties - sort properties', () => {
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
|
||||||
await appListCloudComponent.checkApsContainer();
|
|
||||||
await appListCloudComponent.goToApp(simpleApp);
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().openFilter();
|
|
||||||
await tasksCloudDemoPage.myTasksFilter().checkTaskFilterIsDisplayed();
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C306901] Should display tasks sorted by task name when taskName is selected from sort dropdown', async () => {
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ASSIGNED');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('Name');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
|
||||||
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'Name')).toBe(true);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'Name')).toBe(true);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C290156] Should display tasks ordered by id when Id is selected from sort dropdown', async () => {
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ASSIGNED');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('Id');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
|
||||||
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'Id')).toBe(true);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'Id')).toBe(true);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C306903] Should display tasks sorted by processDefinitionId when processDefinitionId is selected from sort dropdown', async () => {
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ASSIGNED');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('ProcessDefinitionId');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'ProcessDefinitionId')).toBe(true);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'ProcessDefinitionId')).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C306905] Should display tasks sorted by processInstanceId when processInstanceId is selected from sort dropdown', async () => {
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ASSIGNED');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('ProcessInstanceId');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
|
||||||
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'ProcessInstanceId')).toBe(true);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'ProcessInstanceId')).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C306907] Should display tasks sorted by assignee when assignee is selected from sort dropdown', async () => {
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ALL');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('Assignee');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
|
||||||
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'Assignee')).toBe(true);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'Assignee')).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C306911] Should display tasks sorted by parentTaskId when parentTaskId is selected from sort dropdown', async () => {
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ALL');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('ParentTaskId');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
|
||||||
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'ParentTaskId')).toBe(true);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'ParentTaskId')).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C290087] Should display tasks ordered by priority when Priority is selected from sort dropdown', async () => {
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ALL');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('Priority');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
|
||||||
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'Priority')).toBe(true);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'Priority')).toBe(true);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C307114] Should display tasks sorted by standalone when standalone is selected from sort dropdown', async () => {
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ALL');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('Standalone');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
|
||||||
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'Standalone')).toBe(true);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'Standalone')).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('[C307115] Should display tasks sorted by owner when owner is selected from sort dropdown', async () => {
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().clearAssignee();
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setStatusFilterDropDown('ALL');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('Owner');
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('ASC');
|
|
||||||
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('ASC', 'Owner')).toBe(true);
|
|
||||||
|
|
||||||
await tasksCloudDemoPage.editTaskFilterCloudComponent().setOrderFilterDropDown('DESC');
|
|
||||||
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'Owner')).toBe(true);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -2,7 +2,7 @@ const htmlReporter = require('protractor-html-reporter-2');
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const rimraf = require('rimraf');
|
const rimraf = require('rimraf');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const projectRoot = path.resolve(__dirname,'../../');
|
const projectRoot = path.resolve(__dirname, '../../');
|
||||||
|
|
||||||
let FOLDER = process.env.FOLDER || '';
|
let FOLDER = process.env.FOLDER || '';
|
||||||
|
|
||||||
@@ -115,6 +115,7 @@ async function saveReport(alfrescoJsApi, retryCount) {
|
|||||||
let temporaryHtmlPath = savePath + 'html/temporaryHtml/';
|
let temporaryHtmlPath = savePath + 'html/temporaryHtml/';
|
||||||
let lastFileName = '';
|
let lastFileName = '';
|
||||||
|
|
||||||
|
try {
|
||||||
let files = fs.readdirSync(savePath);
|
let files = fs.readdirSync(savePath);
|
||||||
|
|
||||||
if (files && files.length > 0) {
|
if (files && files.length > 0) {
|
||||||
@@ -144,6 +145,10 @@ async function saveReport(alfrescoJsApi, retryCount) {
|
|||||||
|
|
||||||
await uploadReport(alfrescoJsApi, filenameReport);
|
await uploadReport(alfrescoJsApi, filenameReport);
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
console.log('Not possible upload junit report');
|
||||||
|
}
|
||||||
|
|
||||||
rimraf(`${projectRoot}/e2e-output/screenshots/`, function () {
|
rimraf(`${projectRoot}/e2e-output/screenshots/`, function () {
|
||||||
console.log('done delete screenshot');
|
console.log('done delete screenshot');
|
||||||
});
|
});
|
||||||
|
@@ -122,19 +122,24 @@ export class DataTableComponentPage {
|
|||||||
*/
|
*/
|
||||||
async checkListIsSorted(sortOrder: string, columnTitle: string): Promise<any> {
|
async checkListIsSorted(sortOrder: string, columnTitle: string): Promise<any> {
|
||||||
const column = element.all(by.css(`div.adf-datatable-cell[title='${columnTitle}'] span`));
|
const column = element.all(by.css(`div.adf-datatable-cell[title='${columnTitle}'] span`));
|
||||||
// await BrowserVisibility.waitUntilElementIsVisible(column.first());
|
await BrowserVisibility.waitUntilElementIsVisible(column.first());
|
||||||
const initialList = [];
|
const initialList = [];
|
||||||
await column.each(async (currentElement) => {
|
|
||||||
const text = await BrowserActions.getText(currentElement);
|
const length = await column.count();
|
||||||
|
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
const text = await BrowserActions.getText(column.get(i));
|
||||||
if (text.length !== 0) {
|
if (text.length !== 0) {
|
||||||
initialList.push(text.toLowerCase());
|
initialList.push(text.toLowerCase());
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
let sortedList = [...initialList];
|
let sortedList = [...initialList];
|
||||||
sortedList = sortedList.sort();
|
sortedList = sortedList.sort();
|
||||||
if (sortOrder.toLocaleLowerCase() === 'desc') {
|
if (sortOrder.toLocaleLowerCase() === 'desc') {
|
||||||
sortedList = sortedList.reverse();
|
sortedList = sortedList.reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
return initialList.toString() === sortedList.toString();
|
return initialList.toString() === sortedList.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -45,6 +45,7 @@ export class AttachFileWidgetCloud {
|
|||||||
async clickAttachContentFile(fileId: string): Promise<void> {
|
async clickAttachContentFile(fileId: string): Promise<void> {
|
||||||
const uploadButton = this.widget.element(by.css(`button[id=${fileId}]`));
|
const uploadButton = this.widget.element(by.css(`button[id=${fileId}]`));
|
||||||
await BrowserActions.click(uploadButton);
|
await BrowserActions.click(uploadButton);
|
||||||
|
await browser.sleep(1000);
|
||||||
await BrowserActions.clickExecuteScript('button[id="attach-Alfresco Content"]');
|
await BrowserActions.clickExecuteScript('button[id="attach-Alfresco Content"]');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -78,7 +78,7 @@ export class EditProcessFilterCloudComponentPage {
|
|||||||
|
|
||||||
const orderElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
const orderElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||||
await BrowserActions.click(orderElement);
|
await BrowserActions.click(orderElement);
|
||||||
await browser.sleep(1000);
|
await browser.sleep(1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getOrderFilterDropDownValue(): Promise<string> {
|
async getOrderFilterDropDownValue(): Promise<string> {
|
||||||
|
@@ -82,7 +82,7 @@ export class EditTaskFilterCloudComponentPage {
|
|||||||
|
|
||||||
const orderElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
const orderElement = element.all(by.cssContainingText('mat-option span', option)).first();
|
||||||
await BrowserActions.click(orderElement);
|
await BrowserActions.click(orderElement);
|
||||||
await browser.sleep(1000);
|
await browser.sleep(1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
getOrderFilterDropDownValue(): Promise<string> {
|
getOrderFilterDropDownValue(): Promise<string> {
|
||||||
|
@@ -24,17 +24,19 @@ export const ACTIVITI_CLOUD_APPS: any = {
|
|||||||
candidateUserProcess: 'candidateuserprocess',
|
candidateUserProcess: 'candidateuserprocess',
|
||||||
candidateGroupProcess: 'candidategroupprocess',
|
candidateGroupProcess: 'candidategroupprocess',
|
||||||
anotherCandidateGroupProcess: 'anothercandidategroup',
|
anotherCandidateGroupProcess: 'anothercandidategroup',
|
||||||
uploadFileProcess: 'uploadfileprocess'
|
uploadFileProcess: 'uploadfileprocess',
|
||||||
|
processwithstarteventform: 'processwithstarteventform'
|
||||||
},
|
},
|
||||||
forms: {
|
forms: {
|
||||||
starteventform: 'starteventform',
|
starteventform: 'starteventform',
|
||||||
formtotestvalidations: 'formtotestvalidations'
|
formtotestvalidations: 'formtotestvalidations',
|
||||||
|
uploadfileform: 'uploadfileform'
|
||||||
},
|
},
|
||||||
security: [
|
security: [
|
||||||
{'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser']},
|
{ 'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser'] },
|
||||||
{'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser', 'salesuser'] },
|
{ 'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser', 'salesuser'] },
|
||||||
{'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser']},
|
{ 'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser'] },
|
||||||
{'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser', 'salesuser'] }
|
{ 'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser', 'salesuser'] }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
SIMPLE_APP: {
|
SIMPLE_APP: {
|
||||||
@@ -73,7 +75,9 @@ export const ACTIVITI_CLOUD_APPS: any = {
|
|||||||
multiinstancedmnsequence: 'multiinstance-dmnsequence',
|
multiinstancedmnsequence: 'multiinstance-dmnsequence',
|
||||||
multiinstancemanualtask: 'multiinstance-manualtask',
|
multiinstancemanualtask: 'multiinstance-manualtask',
|
||||||
multiinstancesubprocess: 'multiinstance-subprocess',
|
multiinstancesubprocess: 'multiinstance-subprocess',
|
||||||
calledprocess: 'calledprocess'
|
calledprocess: 'calledprocess',
|
||||||
|
booleanvisibilityprocess: 'booleanvisibilityprocess',
|
||||||
|
numbervisibilityprocess: 'numbervisibilityprocess'
|
||||||
},
|
},
|
||||||
forms: {
|
forms: {
|
||||||
tabVisibilityFields: {
|
tabVisibilityFields: {
|
||||||
@@ -105,23 +109,33 @@ export const ACTIVITI_CLOUD_APPS: any = {
|
|||||||
},
|
},
|
||||||
uploadlocalfileform: {
|
uploadlocalfileform: {
|
||||||
name: 'upload-localfile-form'
|
name: 'upload-localfile-form'
|
||||||
|
},
|
||||||
|
booleanvisibility: {
|
||||||
|
name: 'booleanvisibility'
|
||||||
|
},
|
||||||
|
requirednumbervisibility: {
|
||||||
|
name: 'requirednumbervisibility'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
security: [
|
security: [
|
||||||
{'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser']},
|
{ 'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser'] },
|
||||||
{'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser']},
|
{ 'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] },
|
||||||
{'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser']},
|
{ 'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser'] },
|
||||||
{'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] }
|
{ 'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
SUB_PROCESS_APP: {
|
SUB_PROCESS_APP: {
|
||||||
name: 'subprocessapp',
|
name: 'subprocessapp',
|
||||||
file_location: 'https://github.com/Alfresco/alfresco-ng2-components/blob/development/e2e/resources/activiti7/subprocessapp.zip?raw=true',
|
file_location: 'https://github.com/Alfresco/alfresco-ng2-components/blob/development/e2e/resources/activiti7/subprocessapp.zip?raw=true',
|
||||||
|
processes: {
|
||||||
|
processchild: 'processchild',
|
||||||
|
processparent: 'processparent'
|
||||||
|
},
|
||||||
security: [
|
security: [
|
||||||
{'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser']},
|
{ 'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser'] },
|
||||||
{'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser']},
|
{ 'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] },
|
||||||
{'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser']},
|
{ 'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser'] },
|
||||||
{'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] }
|
{ 'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -17,7 +17,7 @@ const { uploadScreenshot, saveReport, cleanReportFolder } = require('./e2e/protr
|
|||||||
const argv = require('yargs').argv;
|
const argv = require('yargs').argv;
|
||||||
|
|
||||||
const projectRoot = path.resolve(__dirname);
|
const projectRoot = path.resolve(__dirname);
|
||||||
const width = 1366, height = 768;
|
const width = 1657, height = 1657;
|
||||||
|
|
||||||
let ENV_FILE = process.env.ENV_FILE;
|
let ENV_FILE = process.env.ENV_FILE;
|
||||||
let GROUP_SUFFIX = process.env.PREFIX;
|
let GROUP_SUFFIX = process.env.PREFIX;
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// Protractor configuration file, see link for more information
|
// Protractor configuration file, see link for more information
|
||||||
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||||
|
|
||||||
require('dotenv').config({ path: process.env.ENV_FILE });
|
require('dotenv').config({path: process.env.ENV_FILE});
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
const configPath = './demo-shell/dist/app.config.json';
|
const configPath = './demo-shell/dist/app.config.json';
|
||||||
@@ -10,13 +10,15 @@ fs.readFile(configPath, (err, appConfigString) => {
|
|||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
let appConfig = JSON.parse(appConfigString);
|
let appConfig = JSON.parse(appConfigString);
|
||||||
appConfig.providers = process.env.PROVIDERS;
|
appConfig.providers = process.env.PROVIDERS;
|
||||||
appConfig.bpmHost = process.env.PROXY_HOST_ADF;
|
appConfig.bpmHost = (process.env.PROXY_HOST_ADF || process.env.URL_HOST_BPM_ADF || process.env.URL_HOST_ADF);
|
||||||
appConfig.ecmHost = process.env.PROXY_HOST_ADF;
|
appConfig.ecmHost = (process.env.PROXY_HOST_ADF || process.env.URL_HOST_ADF);
|
||||||
appConfig.identityHost = process.env.URL_HOST_IDENTITY;
|
appConfig.identityHost = process.env.URL_HOST_IDENTITY;
|
||||||
appConfig.oauth2.host = process.env.URL_HOST_SSO_ADF;
|
appConfig.oauth2.host = process.env.URL_HOST_SSO_ADF;
|
||||||
appConfig.notificationDefaultDuration = process.env.NOTIFICATION_LAST || 8000;
|
appConfig.notificationDefaultDuration = process.env.NOTIFICATION_LAST || 8000;
|
||||||
appConfig.authType = process.env.AUTH_TYPE || 'BASIC';
|
appConfig.authType = process.env.AUTH_TYPE || 'BASIC';
|
||||||
|
|
||||||
let appConfigReplacedJson = JSON.stringify(appConfig);
|
let appConfigReplacedJson = JSON.stringify(appConfig);
|
||||||
|
|
||||||
|
|
||||||
fs.writeFileSync(configPath, appConfigReplacedJson);
|
fs.writeFileSync(configPath, appConfigReplacedJson);
|
||||||
});
|
});
|
||||||
|
@@ -13,7 +13,7 @@ export AUTH_TYPE="OAUTH"
|
|||||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||||
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
|
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
|
||||||
|
|
||||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST_SSO" -host_bpm "$E2E_HOST_BPM" -host_identity "$E2E_HOST_IDENTITY" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -prefix $TRAVIS_BUILD_NUMBER --use-dist )
|
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST_SSO" -host_bpm "$E2E_HOST_BPM" -host_identity "$E2E_HOST_IDENTITY" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -prefix $TRAVIS_BUILD_NUMBER -b --use-dist )
|
||||||
|
|
||||||
./node_modules/@alfresco/adf-cli/bin/adf-cli init-aae-env --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" --username "$E2E_USERNAME" --password "$E2E_PASSWORD" --clientId 'activiti' || exit 1
|
./node_modules/@alfresco/adf-cli/bin/adf-cli init-aae-env --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" --username "$E2E_USERNAME" --password "$E2E_PASSWORD" --clientId 'activiti' || exit 1
|
||||||
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
|
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
|
||||||
|
Reference in New Issue
Block a user