mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fix e2e test (#4981)
* fix core viewer * increase rendition retry * sso refresh before test * general fix test * try use last proxy * avoid use proxy * remove proxy * fix setting tests * fix share and sso test * fix lint exclude * fix sso * fix some process services cloud e2e * fix sso download * exclude sso test * fix cloud * add logout content service test * add logout core * add logout search * redefine global before all * separate protracotr method * try * try multiple attempt before all * add prefix group and users * add prefix group and users * add prefix group and users * rexecute sso test * fix process service visibility e2e * split SSO login test * fix SSO download * fix SSO download * fix some cloud issues * fix some cloud issues * fix some cloud issues * share file fix cs * fix cloud test
This commit is contained in:
@@ -19,8 +19,17 @@ import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { TasksCloudDemoPage } from '../../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||
import {
|
||||
LoginSSOPage, AppListCloudPage, StringUtil, TaskHeaderCloudPage,
|
||||
StartTasksCloudPage, PeopleCloudComponentPage, TasksService, ApiService, IdentityService, SettingsPage, GroupIdentityService
|
||||
LoginSSOPage,
|
||||
AppListCloudPage,
|
||||
StringUtil,
|
||||
TaskHeaderCloudPage,
|
||||
StartTasksCloudPage,
|
||||
PeopleCloudComponentPage,
|
||||
TasksService,
|
||||
ApiService,
|
||||
IdentityService,
|
||||
SettingsPage,
|
||||
GroupIdentityService
|
||||
} from '@alfresco/adf-testing';
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
@@ -70,27 +79,24 @@ describe('Start Task', () => {
|
||||
browser.params.config.bpmHost,
|
||||
browser.params.config.oauth2.host,
|
||||
browser.params.config.identityHost);
|
||||
loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
try {
|
||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||
const tasksService = new TasksService(apiService);
|
||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||
const tasksService = new TasksService(apiService);
|
||||
|
||||
const tasks = [standaloneTaskName, unassignedTaskName, reassignTaskName];
|
||||
for (let i = 0; i < tasks.length; i++) {
|
||||
const taskId = await tasksService.getTaskId(tasks[i], simpleApp);
|
||||
if (taskId) {
|
||||
await tasksService.deleteTask(taskId, simpleApp);
|
||||
}
|
||||
const tasks = [standaloneTaskName, unassignedTaskName, reassignTaskName];
|
||||
for (let i = 0; i < tasks.length; i++) {
|
||||
const taskId = await tasksService.getTaskId(tasks[i], simpleApp);
|
||||
if (taskId) {
|
||||
await tasksService.deleteTask(taskId, simpleApp);
|
||||
}
|
||||
await identityService.deleteIdentityUser(activitiUser.idIdentityService);
|
||||
await identityService.deleteIdentityUser(apsUser.idIdentityService);
|
||||
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||
} catch (error) {
|
||||
}
|
||||
await identityService.deleteIdentityUser(activitiUser.idIdentityService);
|
||||
await identityService.deleteIdentityUser(apsUser.idIdentityService);
|
||||
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||
done();
|
||||
});
|
||||
|
||||
|
@@ -19,8 +19,17 @@ import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { TasksCloudDemoPage } from '../../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
|
||||
import {
|
||||
LoginSSOPage, AppListCloudPage, StringUtil, GroupCloudComponentPage,
|
||||
StartTasksCloudPage, PeopleCloudComponentPage, TasksService, ApiService, IdentityService, SettingsPage, GroupIdentityService
|
||||
LoginSSOPage,
|
||||
AppListCloudPage,
|
||||
StringUtil,
|
||||
GroupCloudComponentPage,
|
||||
StartTasksCloudPage,
|
||||
PeopleCloudComponentPage,
|
||||
TasksService,
|
||||
ApiService,
|
||||
IdentityService,
|
||||
SettingsPage,
|
||||
GroupIdentityService, RolesService
|
||||
} from '@alfresco/adf-testing';
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
@@ -57,6 +66,11 @@ describe('Start Task - Group Cloud Component', () => {
|
||||
|
||||
hrGroup = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
testGroup = await groupIdentityService.getGroupInfoByGroupName('testgroup');
|
||||
|
||||
const rolesService = new RolesService(apiService);
|
||||
const apsAdminRoleId = await rolesService.getRoleIdByRoleName(identityService.ROLES.APS_USER);
|
||||
await groupIdentityService.assignRole(testGroup.id, apsAdminRoleId, identityService.ROLES.APS_USER);
|
||||
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, testGroup.id);
|
||||
await identityService.addUserToGroup(apsUser.idIdentityService, hrGroup.id);
|
||||
|
||||
@@ -64,29 +78,28 @@ describe('Start Task - Group Cloud Component', () => {
|
||||
browser.params.config.bpmHost,
|
||||
browser.params.config.oauth2.host,
|
||||
browser.params.config.identityHost);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
try {
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
const tasksService = new TasksService(apiService);
|
||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||
const tasksService = new TasksService(apiService);
|
||||
|
||||
const bothGroupsTaskId = await tasksService.getTaskId(bothGroupsTaskName, simpleApp);
|
||||
await tasksService.deleteTask(bothGroupsTaskId, simpleApp);
|
||||
const bothGroupsTaskId = await tasksService.getTaskId(bothGroupsTaskName, simpleApp);
|
||||
await tasksService.deleteTask(bothGroupsTaskId, simpleApp);
|
||||
|
||||
const oneGroupTaskId = await tasksService.getTaskId(oneGroupTaskName, simpleApp);
|
||||
await tasksService.deleteTask(oneGroupTaskId, simpleApp);
|
||||
const oneGroupTaskId = await tasksService.getTaskId(oneGroupTaskName, simpleApp);
|
||||
await tasksService.deleteTask(oneGroupTaskId, simpleApp);
|
||||
|
||||
await identityService.deleteIdentityUser(apsUser.idIdentityService);
|
||||
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||
|
||||
await identityService.deleteIdentityUser(apsUser.idIdentityService);
|
||||
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||
} catch (error) {
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||
beforeEach(async () => {
|
||||
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
appListCloudComponent.checkApsContainer();
|
||||
appListCloudComponent.checkAppIsDisplayed(simpleApp);
|
||||
@@ -100,10 +113,11 @@ describe('Start Task - Group Cloud Component', () => {
|
||||
navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C291954] Should be able to select/delete an group for a standalone task', () => {
|
||||
it('[C291954] Should be able to select/delete an group for a standalone task', async () => {
|
||||
peopleCloudComponent.clearAssignee();
|
||||
|
||||
groupCloud.searchGroups(testGroup.name);
|
||||
|
||||
groupCloud.checkGroupIsDisplayed(testGroup.name);
|
||||
groupCloud.selectGroupFromList(testGroup.name);
|
||||
groupCloud.checkSelectedGroup(testGroup.name);
|
||||
@@ -120,7 +134,7 @@ describe('Start Task - Group Cloud Component', () => {
|
||||
startTask.clickStartButton();
|
||||
|
||||
navigationBarPage.clickLogoutButton();
|
||||
loginSSOPage.loginSSOIdentityService(apsUser.email, apsUser.password);
|
||||
await loginSSOPage.loginSSOIdentityService(apsUser.email, apsUser.password);
|
||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
appListCloudComponent.checkApsContainer();
|
||||
appListCloudComponent.checkAppIsDisplayed(simpleApp);
|
||||
@@ -136,7 +150,7 @@ describe('Start Task - Group Cloud Component', () => {
|
||||
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(oneGroupTaskName);
|
||||
});
|
||||
|
||||
it('[C291955] Should be able to select multiple groups when the selection mode=multiple', () => {
|
||||
it('[C291955] Should be able to select multiple groups when the selection mode=multiple', async () => {
|
||||
peopleCloudComponent.clearAssignee();
|
||||
|
||||
groupCloud.searchGroups(testGroup.name);
|
||||
@@ -153,7 +167,7 @@ describe('Start Task - Group Cloud Component', () => {
|
||||
startTask.clickStartButton();
|
||||
|
||||
navigationBarPage.clickLogoutButton();
|
||||
loginSSOPage.loginSSOIdentityService(apsUser.email, apsUser.password);
|
||||
await loginSSOPage.loginSSOIdentityService(apsUser.email, apsUser.password);
|
||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
appListCloudComponent.checkApsContainer();
|
||||
appListCloudComponent.checkAppIsDisplayed(simpleApp);
|
||||
|
Reference in New Issue
Block a user