[AAE-9019] - People/Group cloud with HxP (#7658)

* Cover the use cases by mocking them

* Replace the mock with real stream and remove useless code

* Provide new service to fetch groups

* Fix group tests

* Use the interface and token injection

* [AAE-8870] add unit test and mock for new service

* Improve roles condifion

* initialize the stream as part of NgOnInit to be sure it relies on the correct FormControl instance(input)

* Rollback tmp change for roles

* [AAE-8641] people abstraction mock

* [AAE-8641] revert angular.json changes

* [AAE-8641] few conditions and code improvements

* [AAE-8641] revert change input controls name

* [AAE-8641] initialize the stream as part of ngOnInit

* [AAE-8641] people abstraction improvements

* [AAE-8870] cherry pick people abstraction

* [AAE-8641] fix people-group e2es

* fix lint

* remove hardcoded identityHost

* Use the identityhost api in case of cloud

* Solve issue with returnType array string

* Rebase and use GroupModel from cloud

* Rebase and use GroupModel from cloud

* Use the bpmHost instead of identityFor

* Add identity ingress for user access service

* Rename test

* Fix linting issues

* Fix playwright storybook e2e for people and group

* Trigger travis

* Fix people group e2e

* improved formatting

* Remove not needed travis var override

* Remove unused import after rebase

* Make roles in filter optional + remove comments

Co-authored-by: Tomasz <tomasz.gnyp@hyland.com>
Co-authored-by: arditdomi <ardit.domi@hyland.com>
This commit is contained in:
Maurizio Vitale
2022-06-28 16:21:59 +01:00
committed by GitHub
parent 93c5619e23
commit e27833d770
72 changed files with 2117 additions and 1937 deletions

View File

@@ -24,10 +24,8 @@ export class PeopleGroupCloudComponentPage {
peopleCloudMultipleSelectionChecked = $('mat-radio-button[data-automation-id="app-people-multiple-mode"][class*="mat-radio-checked"]');
peopleCloudSingleSelection = $('mat-radio-button[data-automation-id="app-people-single-mode"]');
peopleCloudMultipleSelection = $('mat-radio-button[data-automation-id="app-people-multiple-mode"]');
peopleCloudFilterRole = $('mat-radio-button[data-automation-id="app-people-filter-role"]');
groupCloudSingleSelection = $('mat-radio-button[data-automation-id="app-group-single-mode"]');
groupCloudMultipleSelection = $('mat-radio-button[data-automation-id="app-group-multiple-mode"]');
groupCloudFilterRole = $('mat-radio-button[data-automation-id="app-group-filter-role"]');
peopleRoleInput = $('input[data-automation-id="app-people-roles-input"]');
peopleAppInput = $('input[data-automation-id="app-people-app-input"]');
peoplePreselect = $('input[data-automation-id="app-people-preselect-input"]');
@@ -37,8 +35,6 @@ export class PeopleGroupCloudComponentPage {
groupCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'Groups Cloud Component'));
preselectValidation = $$('mat-checkbox.app-preselect-value').first();
preselectValidationStatus = $$('mat-checkbox.app-preselect-value label input').first();
peopleFilterByAppName = $('.app-people-control-options mat-radio-button[value="appName"]');
groupFilterByAppName = $('.app-groups-control-options mat-radio-button[value="appName"]');
async navigateTo() {
await browser.get('#/cloud/people-group-cloud');
@@ -69,18 +65,6 @@ export class PeopleGroupCloudComponentPage {
await BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudMultipleSelectionChecked);
}
async checkPeopleCloudFilterRole(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudFilterRole);
}
async clickPeopleCloudFilterRole(): Promise<void> {
await BrowserActions.click(this.peopleCloudFilterRole);
}
async clickGroupCloudFilterRole(): Promise<void> {
await BrowserActions.click(this.groupCloudFilterRole);
}
async enterPeopleRoles(roles: string): Promise<void> {
await BrowserActions.clearSendKeys(this.peopleRoleInput, roles);
}
@@ -113,14 +97,6 @@ export class PeopleGroupCloudComponentPage {
return BrowserActions.getAttribute(this.preselectValidationStatus, 'aria-checked');
}
async clickPeopleFilerByApp(): Promise<void> {
await BrowserActions.click(this.peopleFilterByAppName);
}
async clickGroupFilerByApp(): Promise<void> {
await BrowserActions.click(this.groupFilterByAppName);
}
async enterPeopleAppName(appName: string): Promise<void> {
await BrowserActions.clearSendKeys(this.peopleAppInput, appName);
}

View File

@@ -29,224 +29,220 @@ import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
describe('People Groups Cloud Component', () => {
describe('People Groups Cloud Component', () => {
const loginSSOPage = new LoginPage();
const navigationBarPage = new NavigationBarPage();
const peopleGroupCloudComponentPage = new PeopleGroupCloudComponentPage();
const peopleCloudComponent = new PeopleCloudComponentPage();
const groupCloudComponentPage = new GroupCloudComponentPage();
const loginSSOPage = new LoginPage();
const navigationBarPage = new NavigationBarPage();
const peopleGroupCloudComponentPage = new PeopleGroupCloudComponentPage();
const peopleCloudComponent = new PeopleCloudComponentPage();
const groupCloudComponentPage = new GroupCloudComponentPage();
const apiService = createApiService();
const identityService = new IdentityService(apiService);
const rolesService = new RolesService(apiService);
const groupIdentityService = new GroupIdentityService(apiService);
const apiService = createApiService();
const identityService = new IdentityService(apiService);
const rolesService = new RolesService(apiService);
const groupIdentityService = new GroupIdentityService(apiService);
let apsUser;
let testUser;
let devopsUser;
let activitiUser;
let multipleRolesUser;
let noRoleUser;
let groupUser;
let groupAdmin;
let groupNoRole;
let groupMultipleRoles;
let apsUserRoleId: string;
let apsAdminRoleId: string;
let users = [];
let groups = [];
let apsUser;
let testUser;
let devopsUser;
let activitiUser;
let noRoleUser;
let groupUser;
let groupAdmin;
let groupNoRole;
let apsUserRoleId: string;
let apsAdminRoleId: string;
let users = [];
let groups = [];
beforeAll(async () => {
await apiService.loginWithProfile('identityAdmin');
beforeAll(async () => {
await apiService.loginWithProfile('identityAdmin');
testUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_USER]);
apsUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_USER]);
activitiUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_USER]);
devopsUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_DEVOPS]);
multipleRolesUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_USER, identityService.ROLES.ACTIVITI_ADMIN]);
noRoleUser = await identityService.createIdentityUser();
testUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_USER]);
apsUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_USER]);
activitiUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_USER]);
devopsUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_DEVOPS]);
noRoleUser = await identityService.createIdentityUser();
apsAdminRoleId = await rolesService.getRoleIdByRoleName(identityService.ROLES.ACTIVITI_ADMIN);
apsUserRoleId = await rolesService.getRoleIdByRoleName(identityService.ROLES.ACTIVITI_USER);
apsAdminRoleId = await rolesService.getRoleIdByRoleName(identityService.ROLES.ACTIVITI_ADMIN);
apsUserRoleId = await rolesService.getRoleIdByRoleName(identityService.ROLES.ACTIVITI_USER);
groupUser = await groupIdentityService.createIdentityGroup();
await groupIdentityService.assignRole(groupUser.id, apsUserRoleId, identityService.ROLES.ACTIVITI_USER);
groupUser = await groupIdentityService.createIdentityGroup();
await groupIdentityService.assignRole(groupUser.id, apsUserRoleId, identityService.ROLES.ACTIVITI_USER);
groupAdmin = await groupIdentityService.createIdentityGroup();
await groupIdentityService.assignRole(groupAdmin.id, apsAdminRoleId, identityService.ROLES.ACTIVITI_ADMIN);
groupAdmin = await groupIdentityService.createIdentityGroup();
await groupIdentityService.assignRole(groupAdmin.id, apsAdminRoleId, identityService.ROLES.ACTIVITI_ADMIN);
groupMultipleRoles = await groupIdentityService.createIdentityGroup();
await groupIdentityService.assignRole(groupMultipleRoles.id, apsAdminRoleId, identityService.ROLES.ACTIVITI_ADMIN);
await groupIdentityService.assignRole(groupMultipleRoles.id, apsUserRoleId, identityService.ROLES.ACTIVITI_USER);
groupNoRole = await groupIdentityService.createIdentityGroup();
groupNoRole = await groupIdentityService.createIdentityGroup();
users = [`${apsUser.idIdentityService}`, `${activitiUser.idIdentityService}`, `${noRoleUser.idIdentityService}`,
`${testUser.idIdentityService}`, `${devopsUser.idIdentityService}`];
groups = [`${groupUser.id}`, `${groupAdmin.id}`, `${groupNoRole.id}`];
users = [`${apsUser.idIdentityService}`, `${activitiUser.idIdentityService}`, `${noRoleUser.idIdentityService}`,
`${testUser.idIdentityService}`, `${devopsUser.idIdentityService}`, `${multipleRolesUser.idIdentityService}`];
groups = [`${groupUser.id}`, `${groupAdmin.id}`, `${groupNoRole.id}`, `${groupMultipleRoles.id}`];
await loginSSOPage.login(testUser.username, testUser.password);
});
await loginSSOPage.login(testUser.username, testUser.password);
});
afterAll(async () => {
await apiService.loginWithProfile('identityAdmin');
for (const user of users) {
await identityService.deleteIdentityUser(user);
}
for (const group of groups) {
await groupIdentityService.deleteIdentityGroup(group);
}
});
afterAll(async () => {
await apiService.loginWithProfile('identityAdmin');
for (const user of users) {
await identityService.deleteIdentityUser(user);
}
for (const group of groups) {
await groupIdentityService.deleteIdentityGroup(group);
}
});
beforeEach(async () => {
await navigationBarPage.navigateToPeopleGroupCloudPage();
await peopleGroupCloudComponentPage.checkGroupsCloudComponentTitleIsDisplayed();
await peopleGroupCloudComponentPage.checkPeopleCloudComponentTitleIsDisplayed();
});
afterEach(async () => {
await browser.refresh();
});
describe('[C297674] Should be able to add filtering to People Cloud Component', () => {
beforeEach(async () => {
await navigationBarPage.navigateToPeopleGroupCloudPage();
await peopleGroupCloudComponentPage.checkGroupsCloudComponentTitleIsDisplayed();
await peopleGroupCloudComponentPage.checkPeopleCloudComponentTitleIsDisplayed();
});
afterEach(async () => {
await browser.refresh();
});
describe('[C297674] Should be able to add filtering to People Cloud Component', () => {
beforeEach(async () => {
await peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
await peopleGroupCloudComponentPage.checkPeopleCloudMultipleSelectionIsSelected();
await peopleGroupCloudComponentPage.clickPeopleCloudFilterRole();
await peopleGroupCloudComponentPage.checkPeopleCloudFilterRole();
});
it('No role filtering', async () => {
await peopleCloudComponent.searchAssignee(noRoleUser.lastName);
await peopleCloudComponent.checkUserIsDisplayed(`${noRoleUser.firstName} ${noRoleUser.lastName}`);
await peopleCloudComponent.searchAssignee(apsUser.lastName);
await peopleCloudComponent.checkUserIsDisplayed(`${apsUser.firstName} ${apsUser.lastName}`);
await peopleCloudComponent.searchAssignee(testUser.lastName);
await peopleCloudComponent.checkUserIsDisplayed(`${testUser.firstName} ${testUser.lastName}`);
});
it('One role filtering', async () => {
await peopleGroupCloudComponentPage.enterPeopleRoles(`["${identityService.ROLES.ACTIVITI_USER}"]`);
await peopleCloudComponent.searchAssignee(apsUser.lastName);
await peopleCloudComponent.checkUserIsDisplayed(`${apsUser.firstName} ${apsUser.lastName}`);
await peopleCloudComponent.searchAssignee(devopsUser.lastName);
await peopleCloudComponent.checkNoResultsFoundError();
await peopleCloudComponent.searchAssignee(noRoleUser.lastName);
await peopleCloudComponent.checkNoResultsFoundError();
});
it('Multiple roles filtering', async () => {
await peopleGroupCloudComponentPage.enterPeopleRoles(`["${identityService.ROLES.ACTIVITI_USER}", "${identityService.ROLES.ACTIVITI_USER}"]`);
await peopleCloudComponent.searchAssignee(apsUser.lastName);
await peopleCloudComponent.checkUserIsDisplayed(`${apsUser.firstName} ${apsUser.lastName}`);
await peopleCloudComponent.searchAssignee(testUser.lastName);
await peopleCloudComponent.checkUserIsDisplayed(`${testUser.firstName} ${testUser.lastName}`);
await peopleCloudComponent.searchAssignee(noRoleUser.lastName);
await peopleCloudComponent.checkNoResultsFoundError();
});
});
describe('[C309674] Should be able to add filtering to Group Cloud Component', () => {
beforeEach(async () => {
await peopleGroupCloudComponentPage.clickGroupCloudMultipleSelection();
await peopleGroupCloudComponentPage.clickGroupCloudFilterRole();
});
it('No role filtering', async () => {
await peopleGroupCloudComponentPage.clearField(peopleGroupCloudComponentPage.groupRoleInput);
await groupCloudComponentPage.searchGroups(groupNoRole.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupNoRole.name);
await groupCloudComponentPage.searchGroups(groupAdmin.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupAdmin.name);
await groupCloudComponentPage.searchGroups(groupUser.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupUser.name);
});
it('One role filtering', async () => {
await peopleGroupCloudComponentPage.enterGroupRoles(`["${identityService.ROLES.ACTIVITI_ADMIN}"]`);
await groupCloudComponentPage.searchGroups(groupAdmin.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupAdmin.name);
await groupCloudComponentPage.searchGroups(groupUser.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupAdmin.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupUser.name);
await groupCloudComponentPage.searchGroups(groupNoRole.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupNoRole.name);
});
it('[C309996] Should be able to filter groups based on composite roles ACTIVITI_USER', async () => {
await peopleGroupCloudComponentPage.enterGroupRoles(`["${identityService.ROLES.ACTIVITI_USER}"]`);
await groupCloudComponentPage.searchGroups(groupAdmin.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupAdmin.name);
await groupCloudComponentPage.searchGroups(groupNoRole.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupNoRole.name);
await groupCloudComponentPage.searchGroups(groupUser.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupUser.name);
});
it('Multiple roles filtering', async () => {
await peopleGroupCloudComponentPage.enterGroupRoles(`["${identityService.ROLES.ACTIVITI_ADMIN}", "${identityService.ROLES.ACTIVITI_USER}"]`);
await groupCloudComponentPage.searchGroups(groupAdmin.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupAdmin.name);
await groupCloudComponentPage.searchGroups(groupUser.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupUser.name);
await groupCloudComponentPage.searchGroups(groupNoRole.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupNoRole.name);
});
});
it('[C305033] Should fetch the preselect users based on the Validate flag set to True in Single mode selection', async () => {
await peopleGroupCloudComponentPage.clickPeopleCloudSingleSelection();
await peopleGroupCloudComponentPage.checkPeopleCloudSingleSelectionIsSelected();
await peopleGroupCloudComponentPage.enterPeoplePreselect('[{"id":"12345","username":"someUsername","email":"someEmail"}]');
await expect(await peopleCloudComponent.checkSelectedPeople('someUsername'));
await peopleGroupCloudComponentPage.clickPreselectValidation();
await expect(await peopleGroupCloudComponentPage.getPreselectValidationStatus()).toBe('true');
await peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"id":"${noRoleUser.idIdentityService}"}]`);
await expect(await peopleCloudComponent.checkSelectedPeople(`${noRoleUser.firstName} ${noRoleUser.lastName}`));
await peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"email":"${apsUser.email}"}]`);
await expect(await peopleCloudComponent.checkSelectedPeople(`${apsUser.firstName} ${apsUser.lastName}`));
await peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"username":"${testUser.username}"}]`);
await expect(await peopleCloudComponent.checkSelectedPeople(`${testUser.firstName} ${testUser.lastName}`));
});
it('[C309676] Should fetch the preselect users based on the Validate flag set to True in Multiple mode selection', async () => {
await peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
await peopleGroupCloudComponentPage.checkPeopleCloudMultipleSelectionIsSelected();
await peopleGroupCloudComponentPage.clickPreselectValidation();
await expect(await peopleGroupCloudComponentPage.getPreselectValidationStatus()).toBe('true');
});
await peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"id":"${apsUser.idIdentityService}"},{"id":"${testUser.idIdentityService}"},` +
`{"id":"${noRoleUser.idIdentityService}"}]`);
await peopleCloudComponent.checkSelectedPeople(`${apsUser.firstName} ${apsUser.lastName}`);
await peopleCloudComponent.checkSelectedPeople(`${testUser.firstName} ${testUser.lastName}`);
await peopleCloudComponent.checkSelectedPeople(`${noRoleUser.firstName} ${noRoleUser.lastName}`);
await peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"email":"${apsUser.email}"},{"email":"${testUser.email}"},{"email":"${noRoleUser.email}"}]`);
await peopleCloudComponent.checkSelectedPeople(`${apsUser.firstName} ${apsUser.lastName}`);
await peopleCloudComponent.checkSelectedPeople(`${testUser.firstName} ${testUser.lastName}`);
await peopleCloudComponent.checkSelectedPeople(`${noRoleUser.firstName} ${noRoleUser.lastName}`);
await peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"username":"${apsUser.username}"},{"username":"${testUser.username}"},` +
`{"username":"${noRoleUser.username}"}]`);
await peopleCloudComponent.checkSelectedPeople(`${apsUser.firstName} ${apsUser.lastName}`);
await peopleCloudComponent.checkSelectedPeople(`${testUser.firstName} ${testUser.lastName}`);
await peopleCloudComponent.checkSelectedPeople(`${noRoleUser.firstName} ${noRoleUser.lastName}`);
it('No role filtering', async () => {
await peopleCloudComponent.searchAssignee(noRoleUser.lastName);
await peopleCloudComponent.checkUserIsDisplayed(`${noRoleUser.firstName} ${noRoleUser.lastName}`);
await peopleCloudComponent.searchAssignee(apsUser.lastName);
await peopleCloudComponent.checkUserIsDisplayed(`${apsUser.firstName} ${apsUser.lastName}`);
await peopleCloudComponent.searchAssignee(testUser.lastName);
await peopleCloudComponent.checkUserIsDisplayed(`${testUser.firstName} ${testUser.lastName}`);
});
it('One role filtering', async () => {
await peopleGroupCloudComponentPage.enterPeopleRoles(`["${identityService.ROLES.ACTIVITI_USER}"]`);
await peopleCloudComponent.searchAssignee(apsUser.lastName);
await peopleCloudComponent.checkUserIsDisplayed(`${apsUser.firstName} ${apsUser.lastName}`);
await peopleCloudComponent.searchAssignee(devopsUser.lastName);
await peopleCloudComponent.checkNoResultsFoundError();
await peopleCloudComponent.searchAssignee(noRoleUser.lastName);
await peopleCloudComponent.checkNoResultsFoundError();
});
it('[C309677] Should populate the Users without any validation when the Preselect flag is set to false', async () => {
await peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
await peopleGroupCloudComponentPage.checkPeopleCloudMultipleSelectionIsSelected();
await expect(await peopleGroupCloudComponentPage.getPreselectValidationStatus()).toBe('false');
await peopleGroupCloudComponentPage.enterPeoplePreselect(
`[{"id":"TestId1","firstName":"TestFirstName1","lastName":"TestLastName1"},` +
`{"id":"TestId2","firstName":"TestFirstName2","lastName":"TestLastName2"},` +
`{"id":"TestId3","firstName":"TestFirstName3","lastName":"TestLastName3"}]`);
await peopleCloudComponent.checkSelectedPeople('TestFirstName1 TestLastName1');
await peopleCloudComponent.checkSelectedPeople('TestFirstName2 TestLastName2');
await peopleCloudComponent.checkSelectedPeople('TestFirstName3 TestLastName3');
it('Multiple roles filtering', async () => {
await peopleGroupCloudComponentPage.enterPeopleRoles(`["${identityService.ROLES.ACTIVITI_USER}", "${identityService.ROLES.ACTIVITI_ADMIN}"]`);
await peopleCloudComponent.searchAssignee(multipleRolesUser.lastName);
await peopleCloudComponent.checkUserIsDisplayed(`${multipleRolesUser.firstName} ${multipleRolesUser.lastName}`);
await peopleCloudComponent.searchAssignee(apsUser.lastName);
await peopleCloudComponent.checkUserIsNotDisplayed(`${apsUser.firstName} ${apsUser.lastName}`);
await peopleCloudComponent.searchAssignee(testUser.lastName);
await peopleCloudComponent.checkUserIsNotDisplayed(`${testUser.firstName} ${testUser.lastName}`);
await peopleCloudComponent.searchAssignee(noRoleUser.lastName);
await peopleCloudComponent.checkNoResultsFoundError();
});
});
describe('[C309674] Should be able to add filtering to Group Cloud Component', () => {
beforeEach(async () => {
await peopleGroupCloudComponentPage.clickGroupCloudMultipleSelection();
});
it('No role filtering', async () => {
await peopleGroupCloudComponentPage.clearField(peopleGroupCloudComponentPage.groupRoleInput);
await groupCloudComponentPage.searchGroups(groupNoRole.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupNoRole.name);
await groupCloudComponentPage.searchGroups(groupAdmin.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupAdmin.name);
await groupCloudComponentPage.searchGroups(groupUser.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupUser.name);
});
it('One role filtering', async () => {
await peopleGroupCloudComponentPage.enterGroupRoles(`["${identityService.ROLES.ACTIVITI_ADMIN}"]`);
await groupCloudComponentPage.searchGroups(groupAdmin.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupAdmin.name);
await groupCloudComponentPage.searchGroups(groupUser.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupAdmin.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupUser.name);
await groupCloudComponentPage.searchGroups(groupNoRole.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupNoRole.name);
});
it('[C309996] Should be able to filter groups based on composite roles ACTIVITI_USER', async () => {
await peopleGroupCloudComponentPage.enterGroupRoles(`["${identityService.ROLES.ACTIVITI_USER}"]`);
await groupCloudComponentPage.searchGroups(groupAdmin.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupAdmin.name);
await groupCloudComponentPage.searchGroups(groupNoRole.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupNoRole.name);
await groupCloudComponentPage.searchGroups(groupUser.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupUser.name);
});
it('Multiple roles filtering', async () => {
await peopleGroupCloudComponentPage.enterGroupRoles(`["${identityService.ROLES.ACTIVITI_ADMIN}", "${identityService.ROLES.ACTIVITI_USER}"]`);
await groupCloudComponentPage.searchGroups(groupMultipleRoles.name);
await groupCloudComponentPage.checkGroupIsDisplayed(groupMultipleRoles.name);
await groupCloudComponentPage.searchGroups(groupAdmin.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupAdmin.name);
await groupCloudComponentPage.searchGroups(groupUser.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupUser.name);
await groupCloudComponentPage.searchGroups(groupNoRole.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupNoRole.name);
});
});
it('[C305033] Should fetch the preselect users based on the Validate flag set to True in Single mode selection', async () => {
await peopleGroupCloudComponentPage.clickPeopleCloudSingleSelection();
await peopleGroupCloudComponentPage.checkPeopleCloudSingleSelectionIsSelected();
await peopleGroupCloudComponentPage.enterPeoplePreselect('[{"id":"12345","username":"someUsername","email":"someEmail"}]');
await expect(await peopleCloudComponent.checkSelectedPeople('someUsername'));
await peopleGroupCloudComponentPage.clickPreselectValidation();
await expect(await peopleGroupCloudComponentPage.getPreselectValidationStatus()).toBe('true');
await peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"email":"${apsUser.email}"}]`);
await expect(await peopleCloudComponent.checkSelectedPeople(`${apsUser.firstName} ${apsUser.lastName}`));
await peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"username":"${testUser.username}"}]`);
await expect(await peopleCloudComponent.checkSelectedPeople(`${testUser.firstName} ${testUser.lastName}`));
});
it('[C309676] Should fetch the preselect users based on the Validate flag set to True in Multiple mode selection', async () => {
await peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
await peopleGroupCloudComponentPage.checkPeopleCloudMultipleSelectionIsSelected();
await peopleGroupCloudComponentPage.clickPreselectValidation();
await expect(await peopleGroupCloudComponentPage.getPreselectValidationStatus()).toBe('true');
await peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"email":"${apsUser.email}"},{"email":"${testUser.email}"},{"email":"${noRoleUser.email}"}]`);
await peopleCloudComponent.checkSelectedPeople(`${apsUser.firstName} ${apsUser.lastName}`);
await peopleCloudComponent.checkSelectedPeople(`${testUser.firstName} ${testUser.lastName}`);
await peopleCloudComponent.checkSelectedPeople(`${noRoleUser.firstName} ${noRoleUser.lastName}`);
await peopleGroupCloudComponentPage.enterPeoplePreselect(`[{"username":"${apsUser.username}"},{"username":"${testUser.username}"},` +
`{"username":"${noRoleUser.username}"}]`);
await peopleCloudComponent.checkSelectedPeople(`${apsUser.firstName} ${apsUser.lastName}`);
await peopleCloudComponent.checkSelectedPeople(`${testUser.firstName} ${testUser.lastName}`);
await peopleCloudComponent.checkSelectedPeople(`${noRoleUser.firstName} ${noRoleUser.lastName}`);
await peopleCloudComponent.searchAssignee(noRoleUser.lastName);
await peopleCloudComponent.checkNoResultsFoundError();
});
it('[C309677] Should populate the Users without any validation when the Preselect flag is set to false', async () => {
await peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
await peopleGroupCloudComponentPage.checkPeopleCloudMultipleSelectionIsSelected();
await expect(await peopleGroupCloudComponentPage.getPreselectValidationStatus()).toBe('false');
await peopleGroupCloudComponentPage.enterPeoplePreselect(
`[{"id":"TestId1","firstName":"TestFirstName1","lastName":"TestLastName1"},` +
`{"id":"TestId2","firstName":"TestFirstName2","lastName":"TestLastName2"},` +
`{"id":"TestId3","firstName":"TestFirstName3","lastName":"TestLastName3"}]`);
await peopleCloudComponent.checkSelectedPeople('TestFirstName1 TestLastName1');
await peopleCloudComponent.checkSelectedPeople('TestFirstName2 TestLastName2');
await peopleCloudComponent.checkSelectedPeople('TestFirstName3 TestLastName3');
});
});

View File

@@ -32,7 +32,8 @@ describe('People Groups Cloud Component', () => {
const identityService = new IdentityService(apiService);
const groupIdentityService = new GroupIdentityService(apiService);
let apsUser, testUser;
let apsUser;
let testUser;
let noRoleUser;
let groupNoRole;
let users = [];
@@ -73,7 +74,6 @@ describe('People Groups Cloud Component', () => {
it('[C305041] Should filter the People Single Selection with the Application name filter', async () => {
await peopleGroupCloudComponentPage.checkPeopleCloudSingleSelectionIsSelected();
await peopleGroupCloudComponentPage.clickPeopleFilerByApp();
await peopleGroupCloudComponentPage.enterPeopleAppName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name);
await peopleCloudComponent.searchAssignee(testUser.firstName);
@@ -85,7 +85,6 @@ describe('People Groups Cloud Component', () => {
it('[C305041] Should filter the People Multiple Selection with the Application name filter', async () => {
await peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
await peopleGroupCloudComponentPage.clickPeopleFilerByApp();
await peopleGroupCloudComponentPage.enterPeopleAppName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name);
await peopleCloudComponent.searchAssignee(testUser.firstName);
await peopleCloudComponent.checkUserIsDisplayed(`${testUser.firstName} ${testUser.lastName}`);
@@ -102,7 +101,6 @@ describe('People Groups Cloud Component', () => {
it('[C305041] Should filter the Groups Single Selection with the Application name filter', async () => {
await peopleGroupCloudComponentPage.clickGroupCloudSingleSelection();
await peopleGroupCloudComponentPage.clickGroupFilerByApp();
await peopleGroupCloudComponentPage.enterGroupAppName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name);
await groupCloudComponentPage.searchGroups(hrGroup.name);
await groupCloudComponentPage.checkGroupIsDisplayed(hrGroup.name);
@@ -112,7 +110,6 @@ describe('People Groups Cloud Component', () => {
it('[C305041] Should filter the Groups Multiple Selection with the Application name filter', async () => {
await peopleGroupCloudComponentPage.clickGroupCloudMultipleSelection();
await peopleGroupCloudComponentPage.clickGroupFilerByApp();
await peopleGroupCloudComponentPage.enterGroupAppName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name);
await groupCloudComponentPage.searchGroups(testGroup.name);
await groupCloudComponentPage.checkGroupIsDisplayed(testGroup.name);

View File

@@ -16,6 +16,7 @@ const PROVIDER = process.env.PROVIDER ? process.env.PROVIDER : 'ALL';
const AUTH_TYPE = process.env.AUTH_TYPE ? process.env.AUTH_TYPE : 'BASIC';
const HOST_SSO = process.env.HOST_SSO || process.env.PROXY_HOST_ADF || HOST || 'oauth';
const IDENTITY_HOST = process.env.IDENTITY_HOST || process.env.HOST_SSO + '/auth/admin/realms/alfresco';
const OAUTH_CLIENT_ID = process.env.OAUTH_CLIENDID || 'alfresco';
const IDENTITY_ADMIN_EMAIL = process.env.IDENTITY_ADMIN_EMAIL || "defaultadmin";
@@ -40,7 +41,7 @@ const appConfig = {
"log": E2E_LOG_LEVEL,
"ecmHost": HOST_ECM,
"bpmHost": HOST_BPM,
"identityHost": `${HOST_SSO}/auth/admin/realms/alfresco`,
"identityHost": `${IDENTITY_HOST}`,
"provider": PROVIDER,
"authType": AUTH_TYPE,
"oauth2": {