mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
[ADF-4278][ADF-4277] - Should fetch the preselect users (#4535)
* C305033 Preselect Users automated. * fix the LastName issue failing. * C305041 automated * in progress * in progress * in progress * in progress * lint fix * moving the assignee filed to PeopleCloudComponent * moving the assignee filed to PeopleCloudComponent * split the tests into smaller chunks for easy understandability. * added the missing check and renamed the method appropriately. * fixes for flakiness
This commit is contained in:
committed by
Eugenio Romano
parent
7a2a8a1ed3
commit
1336fbee0e
@@ -21,17 +21,24 @@ import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
export class PeopleGroupCloudComponentPage {
|
||||
|
||||
peopleCloudSingleSelection = element(by.css('mat-radio-button[data-automation-id="adf-people-single-mode"]'));
|
||||
peopleCloudSingleSelectionChecked = element(by.css('mat-radio-button[data-automation-id="adf-people-single-mode"][class*="mat-radio-checked"]'));
|
||||
peopleCloudMultipleSelection = element(by.css('mat-radio-button[data-automation-id="adf-people-multiple-mode"]'));
|
||||
peopleCloudFilterRole = element(by.css('mat-radio-button[data-automation-id="adf-people-filter-role"]'));
|
||||
groupCloudSingleSelection = element(by.css('mat-radio-button[data-automation-id="adf-group-single-mode"]'));
|
||||
groupCloudMultipleSelection = element(by.css('mat-radio-button[data-automation-id="adf-group-multiple-mode"]'));
|
||||
groupCloudFilterRole = element(by.css('mat-radio-button[data-automation-id="adf-group-filter-role"]'));
|
||||
peopleRoleInput = element(by.css('input[data-automation-id="adf-people-roles-input"]'));
|
||||
peopleAppInput = element(by.css('input[data-automation-id="adf-people-app-input"]'));
|
||||
peoplePreselect = element(by.css('input[data-automation-id="adf-people-preselect-input"]'));
|
||||
groupRoleInput = element(by.css('input[data-automation-id="adf-group-roles-input"]'));
|
||||
groupAppInput = element(by.css('input[data-automation-id="adf-group-app-input"]'));
|
||||
groupPreselect = element(by.css('input[data-automation-id="adf-group-preselect-input"]'));
|
||||
peopleCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'People Cloud Component'));
|
||||
groupCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'Groups Cloud Component'));
|
||||
preselectValidation = element(by.css('mat-checkbox.adf-preselect-value'));
|
||||
preselectValidationStatus = element(by.css('mat-checkbox.adf-preselect-value label input'));
|
||||
peopleFilterByAppName = element(by.css('.people-control-options mat-radio-button[value="appName"]'));
|
||||
groupFilterByAppName = element(by.css('.groups-control-options mat-radio-button[value="appName"]'));
|
||||
|
||||
checkPeopleCloudComponentTitleIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudComponentTitle);
|
||||
@@ -48,6 +55,15 @@ export class PeopleGroupCloudComponentPage {
|
||||
this.peopleCloudMultipleSelection.click();
|
||||
}
|
||||
|
||||
clickPeopleCloudSingleSelection() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudSingleSelection);
|
||||
this.peopleCloudSingleSelection.click();
|
||||
}
|
||||
|
||||
checkPeopleCloudSingleSelectionIsSelected() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudSingleSelectionChecked);
|
||||
}
|
||||
|
||||
clickPeopleCloudFilterRole() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudFilterRole);
|
||||
this.peopleCloudFilterRole.click();
|
||||
@@ -65,6 +81,13 @@ export class PeopleGroupCloudComponentPage {
|
||||
return this;
|
||||
}
|
||||
|
||||
enterPeoplePreselect(preselect) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.peoplePreselect);
|
||||
this.peoplePreselect.clear();
|
||||
this.peoplePreselect.sendKeys(preselect);
|
||||
return this;
|
||||
}
|
||||
|
||||
clearField(locator) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(locator);
|
||||
locator.getAttribute('value').then((result) => {
|
||||
@@ -74,6 +97,11 @@ export class PeopleGroupCloudComponentPage {
|
||||
});
|
||||
}
|
||||
|
||||
clickGroupCloudSingleSelection() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.groupCloudSingleSelection);
|
||||
this.groupCloudSingleSelection.click();
|
||||
}
|
||||
|
||||
clickGroupCloudMultipleSelection() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.groupCloudMultipleSelection);
|
||||
this.groupCloudMultipleSelection.click();
|
||||
@@ -86,4 +114,38 @@ export class PeopleGroupCloudComponentPage {
|
||||
return this;
|
||||
}
|
||||
|
||||
clickPreselectValidation() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.preselectValidation);
|
||||
this.preselectValidation.click();
|
||||
}
|
||||
|
||||
getPreselectValidationStatus() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.preselectValidationStatus);
|
||||
return this.preselectValidationStatus.getAttribute('aria-checked');
|
||||
}
|
||||
|
||||
clickPeopleFilerByApp() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.peopleFilterByAppName);
|
||||
return this.peopleFilterByAppName.click();
|
||||
}
|
||||
|
||||
clickGroupFilerByApp() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.groupFilterByAppName);
|
||||
return this.groupFilterByAppName.click();
|
||||
}
|
||||
|
||||
enterPeopleAppName(appName) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.peopleAppInput);
|
||||
this.peopleAppInput.clear();
|
||||
this.peopleAppInput.sendKeys(appName);
|
||||
return this;
|
||||
}
|
||||
|
||||
enterGroupAppName(appName) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.groupAppInput);
|
||||
this.groupAppInput.clear();
|
||||
this.groupAppInput.sendKeys(appName);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user