mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +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,9 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import TestConfig = require('../test.config');
|
||||
|
||||
import { SettingsPage } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
import { PeopleGroupCloudComponentPage } from '../pages/adf/demo-shell/process-services/peopleGroupCloudComponentPage';
|
||||
import { GroupCloudComponentPage, PeopleCloudComponentPage } from '@alfresco/adf-testing';
|
||||
@@ -26,10 +23,9 @@ import { LoginSSOPage, IdentityService, GroupIdentityService, RolesService, ApiS
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import resources = require('../util/resources');
|
||||
|
||||
describe('People Groups Cloud Component', () => {
|
||||
xdescribe('People Groups Cloud Component', () => {
|
||||
|
||||
describe('People Groups Cloud Component', () => {
|
||||
const settingsPage = new SettingsPage();
|
||||
const loginSSOPage = new LoginSSOPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const peopleGroupCloudComponentPage = new PeopleGroupCloudComponentPage();
|
||||
@@ -55,9 +51,12 @@ describe('People Groups Cloud Component', () => {
|
||||
let clientId;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
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.identityAdmin.email, browser.params.identityAdmin.password);
|
||||
|
||||
const apiService = new ApiService('activiti', TestConfig.adf.hostBPM, TestConfig.adf.hostSso, 'BPM');
|
||||
await apiService.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
identityService = new IdentityService(apiService);
|
||||
rolesService = new RolesService(apiService);
|
||||
groupIdentityService = new GroupIdentityService(apiService);
|
||||
@@ -87,23 +86,24 @@ describe('People Groups Cloud Component', () => {
|
||||
await groupIdentityService.addClientRole(groupActiviti.id, clientId, clientActivitiAdminRoleId, CONSTANTS.ROLES.ACTIVITI_ADMIN);
|
||||
users = [`${apsUser.idIdentityService}`, `${activitiUser.idIdentityService}`, `${noRoleUser.idIdentityService}`];
|
||||
groups = [`${groupAps.id}`, `${groupActiviti.id}`, `${groupNoRole.id}`];
|
||||
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
|
||||
loginSSOPage.clickOnSSOButton();
|
||||
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
navigationBarPage.navigateToPeopleGroupCloudPage();
|
||||
|
||||
browser.get('/');
|
||||
loginSSOPage.loginSSOIdentityService(browser.params.identityUser.email, browser.params.identityUser.password);
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
afterAll(async (done) => {
|
||||
for (let i = 0; i < users.length; i++) {
|
||||
await identityService.deleteIdentityUser(users[i]);
|
||||
}
|
||||
for (let i = 0; i < groups.length; i++) {
|
||||
await groupIdentityService.deleteIdentityGroup(groups[i]);
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
navigationBarPage.navigateToPeopleGroupCloudPage();
|
||||
peopleGroupCloudComponentPage.checkGroupsCloudComponentTitleIsDisplayed();
|
||||
peopleGroupCloudComponentPage.checkPeopleCloudComponentTitleIsDisplayed();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user