Skip to content

Commit

Permalink
[ACA-3969]Add methods for people-cloud-component.page.ts (#6265)
Browse files Browse the repository at this point in the history
* Add methods for people-cloud-component.page.ts

* Add a new process to candidatebaseapp and content UI

* Fix comments by renaming methods
  • Loading branch information
cristinaj authored Oct 20, 2020
1 parent 8c62754 commit 7dec482
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
Binary file modified e2e/resources/activiti7/candidatebaseapp.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,8 @@ export class CardTextItemPage {
async checkElementIsReadonly(): Promise<void> {
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']`)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class PeopleCloudComponentPage {
labelLocator: Locator = by.css("label[class*='adf-label']");
inputLocator: Locator = by.css('input');
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> {
await BrowserActions.clearSendKeys(this.peopleCloudSearch, ' ');
Expand Down Expand Up @@ -65,6 +66,11 @@ export class PeopleCloudComponentPage {
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> {
try {
const assigneeRow = element(by.cssContainingText('mat-option span.adf-people-label-name', name));
Expand All @@ -81,6 +87,10 @@ export class PeopleCloudComponentPage {
await BrowserVisibility.waitUntilElementIsNotVisible(assigneeRow);
}

async getUsersDisplayedCount(): Promise<number> {
return this.noOfUsersDisplayed.count();
}

async checkOptionIsDisplayed(): Promise<void> {
const optionList = element(by.css('.adf-people-cloud-list'));
await BrowserVisibility.waitUntilElementIsVisible(optionList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"processwithstarteventform": "processwithstarteventform",
"processwithjsonfilemapping": "processwithjsonfilemapping",
"assigneeProcess": "assigneeprocess",
"candidateusersgroups": "candidateusersgroups",
"errorStartEventProcess": {
"process_name": "errorstartevent",
"error_id": "Error_END_EVENT",
Expand Down

0 comments on commit 7dec482

Please sign in to comment.