[ACA-3969]Add methods for people-cloud-component.page.ts (#6265)

* Add methods for people-cloud-component.page.ts

* Add a new process to candidatebaseapp and content UI

* Fix comments by renaming methods
This commit is contained in:
Cristina Jalba
2020-10-20 15:43:44 +03:00
committed by GitHub
parent 8c62754d4b
commit 7dec482d91
4 changed files with 15 additions and 0 deletions

View File

@@ -70,4 +70,8 @@ export class CardTextItemPage {
async checkElementIsReadonly(): Promise<void> { async checkElementIsReadonly(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.rootElement.element(this.readOnlyField)); await BrowserVisibility.waitUntilElementIsVisible(this.rootElement.element(this.readOnlyField));
} }
async clickField(): Promise<void> {
await BrowserActions.click(this.rootElement.element(by.css(`button[data-automation-id*='clickable-icon']`)));
}
} }

View File

@@ -29,6 +29,7 @@ export class PeopleCloudComponentPage {
labelLocator: Locator = by.css("label[class*='adf-label']"); labelLocator: Locator = by.css("label[class*='adf-label']");
inputLocator: Locator = by.css('input'); inputLocator: Locator = by.css('input');
assigneeChipList = element(by.css('mat-chip-list[data-automation-id="adf-cloud-people-chip-list"]')); assigneeChipList = element(by.css('mat-chip-list[data-automation-id="adf-cloud-people-chip-list"]'));
noOfUsersDisplayed = element.all(by.css('mat-option span.adf-people-label-name'));
async clearAssignee(): Promise<void> { async clearAssignee(): Promise<void> {
await BrowserActions.clearSendKeys(this.peopleCloudSearch, ' '); await BrowserActions.clearSendKeys(this.peopleCloudSearch, ' ');
@@ -65,6 +66,11 @@ export class PeopleCloudComponentPage {
return this.assigneeChipList.all(by.css('mat-chip')).first().getText(); return this.assigneeChipList.all(by.css('mat-chip')).first().getText();
} }
async getChipAssigneeCount(): Promise<number> {
await BrowserVisibility.waitUntilElementIsVisible(this.assigneeChipList);
return this.assigneeChipList.all(by.css('mat-chip')).count();
}
async checkUserIsDisplayed(name: string): Promise<boolean> { async checkUserIsDisplayed(name: string): Promise<boolean> {
try { try {
const assigneeRow = element(by.cssContainingText('mat-option span.adf-people-label-name', name)); const assigneeRow = element(by.cssContainingText('mat-option span.adf-people-label-name', name));
@@ -81,6 +87,10 @@ export class PeopleCloudComponentPage {
await BrowserVisibility.waitUntilElementIsNotVisible(assigneeRow); await BrowserVisibility.waitUntilElementIsNotVisible(assigneeRow);
} }
async getUsersDisplayedCount(): Promise<number> {
return this.noOfUsersDisplayed.count();
}
async checkOptionIsDisplayed(): Promise<void> { async checkOptionIsDisplayed(): Promise<void> {
const optionList = element(by.css('.adf-people-cloud-list')); const optionList = element(by.css('.adf-people-cloud-list'));
await BrowserVisibility.waitUntilElementIsVisible(optionList); await BrowserVisibility.waitUntilElementIsVisible(optionList);

View File

@@ -10,6 +10,7 @@
"processwithstarteventform": "processwithstarteventform", "processwithstarteventform": "processwithstarteventform",
"processwithjsonfilemapping": "processwithjsonfilemapping", "processwithjsonfilemapping": "processwithjsonfilemapping",
"assigneeProcess": "assigneeprocess", "assigneeProcess": "assigneeprocess",
"candidateusersgroups": "candidateusersgroups",
"errorStartEventProcess": { "errorStartEventProcess": {
"process_name": "errorstartevent", "process_name": "errorstartevent",
"error_id": "Error_END_EVENT", "error_id": "Error_END_EVENT",