mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
e2e cloud (#4767)
* Change strategy with process cloud e2e and fixes * Change strategy with process cloud e2e and fixes * Fix path and host * improve the config and run the replace for cloud * Use the same name of other scripts * Fix lint * Run the replace in case of cloud * typo * Export variables if needed Fix the check env passing the oauth
This commit is contained in:
committed by
Denys Vuika
parent
446efe4297
commit
abb76d956b
@@ -15,20 +15,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import { ApiService, StringUtil } from '@alfresco/adf-testing';
|
||||
import moment = require('moment');
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
import { LoginSSOPage, SettingsPage, AppListCloudPage, TaskHeaderCloudPage, TasksService } from '@alfresco/adf-testing';
|
||||
import { LoginSSOPage, AppListCloudPage, TaskHeaderCloudPage, TasksService } from '@alfresco/adf-testing';
|
||||
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||
import { TaskDetailsCloudDemoPage } from '../pages/adf/demo-shell/process-services/taskDetailsCloudDemoPage';
|
||||
import resources = require('../util/resources');
|
||||
|
||||
describe('Task Header cloud component', () => {
|
||||
|
||||
const user = TestConfig.adf.adminEmail, password = TestConfig.adf.adminPassword;
|
||||
const basicCreatedTaskName = StringUtil.generateRandomString(), completedTaskName = StringUtil.generateRandomString();
|
||||
let basicCreatedTask, basicCreatedDate, completedTask, completedCreatedDate, subTask, subTaskCreatedDate;
|
||||
const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
||||
@@ -36,7 +34,6 @@ describe('Task Header cloud component', () => {
|
||||
|
||||
const taskHeaderCloudPage = new TaskHeaderCloudPage();
|
||||
|
||||
const settingsPage = new SettingsPage();
|
||||
const loginSSOPage = new LoginSSOPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const appListCloudComponent = new AppListCloudPage();
|
||||
@@ -45,12 +42,8 @@ describe('Task Header cloud component', () => {
|
||||
let tasksService: TasksService;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
|
||||
loginSSOPage.clickOnSSOButton();
|
||||
loginSSOPage.loginSSOIdentityService(user, password);
|
||||
|
||||
const apiService = new ApiService('activiti', TestConfig.adf.hostBPM, TestConfig.adf.hostSso, 'BPM');
|
||||
await apiService.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
|
||||
await apiService.login(browser.params.identityUser.email, browser.params.identityUser.password);
|
||||
|
||||
tasksService = new TasksService(apiService);
|
||||
|
||||
@@ -71,17 +64,18 @@ describe('Task Header cloud component', () => {
|
||||
subTask = await tasksService.getTask(subTaskId.entry.id, simpleApp);
|
||||
subTaskCreatedDate = moment(subTask.entry.createdDate).format(formatDate);
|
||||
|
||||
browser.get('/');
|
||||
loginSSOPage.loginSSOIdentityService(browser.params.identityUser.email, browser.params.identityUser.password);
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
beforeEach(() => {
|
||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
appListCloudComponent.checkApsContainer();
|
||||
await appListCloudComponent.goToApp(simpleApp);
|
||||
done();
|
||||
appListCloudComponent.goToApp(simpleApp);
|
||||
});
|
||||
|
||||
it('[C291943] Should display task details for assigned task', async () => {
|
||||
it('[C291943] Should display task details for assigned task', () => {
|
||||
tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
||||
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(basicCreatedTaskName);
|
||||
tasksCloudDemoPage.taskListCloudComponent().selectRow(basicCreatedTaskName);
|
||||
@@ -101,7 +95,7 @@ describe('Task Header cloud component', () => {
|
||||
.toEqual(basicCreatedTask.entry.parentTaskId === null ? '' : basicCreatedTask.entry.parentTaskId);
|
||||
});
|
||||
|
||||
it('[C291944] Should display task details for completed task', async () => {
|
||||
it('[C291944] Should display task details for completed task', () => {
|
||||
tasksCloudDemoPage.completedTasksFilter().clickTaskFilter();
|
||||
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(completedTaskName);
|
||||
tasksCloudDemoPage.taskListCloudComponent().selectRow(completedTaskName);
|
||||
@@ -121,7 +115,7 @@ describe('Task Header cloud component', () => {
|
||||
.toEqual(completedTask.entry.parentTaskId === null ? '' : completedTask.entry.parentTaskId);
|
||||
});
|
||||
|
||||
it('[C291945] Should Parent Name and Parent Id not be empty in task details for sub task', async () => {
|
||||
it('[C291945] Should Parent Name and Parent Id not be empty in task details for sub task', () => {
|
||||
tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
||||
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(subTask.entry.name);
|
||||
tasksCloudDemoPage.taskListCloudComponent().selectRow(subTask.entry.name);
|
||||
@@ -141,7 +135,7 @@ describe('Task Header cloud component', () => {
|
||||
.toEqual(subTask.entry.parentTaskId === null ? '' : subTask.entry.parentTaskId);
|
||||
});
|
||||
|
||||
it('[C307032] Should display the appropriate title for the unclaim option of a Task', async () => {
|
||||
xit('[C307032] Should display the appropriate title for the unclaim option of a Task', () => {
|
||||
tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
||||
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(basicCreatedTaskName);
|
||||
tasksCloudDemoPage.taskListCloudComponent().selectRow(basicCreatedTaskName);
|
||||
|
Reference in New Issue
Block a user