[ADF-4121] Fix tasks-custom-filters test (#4329)

* Fix tasks-custom-filters test

* Changed the locators for edit task cloud component to be unique.
This commit is contained in:
cristinaj
2019-02-22 12:50:37 +02:00
committed by Eugenio Romano
parent b967b77946
commit bf4d1a2806
3 changed files with 5 additions and 6 deletions

View File

@@ -51,7 +51,7 @@ export class EditTaskFilterCloudComponent {
}
getStateFilterDropDownValue() {
return element(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-state'] span")).getText();
return element.all(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-state'] span")).first().getText();
}
setSortFilterDropDown(option) {
@@ -65,7 +65,7 @@ export class EditTaskFilterCloudComponent {
}
getSortFilterDropDownValue() {
let elementSort = element(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-sort'] span"));
let elementSort = element.all(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-sort'] span")).first();
Util.waitUntilElementIsVisible(elementSort);
return elementSort.getText();
}
@@ -81,11 +81,11 @@ export class EditTaskFilterCloudComponent {
}
getOrderFilterDropDownValue() {
return element(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-order'] span")).getText();
return element.all(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-order'] span")).first().getText();
}
clickOnDropDownArrow(option) {
let dropDownArrow = element(by.css("mat-form-field[data-automation-id='" + option + "'] div[class*='arrow']"));
let dropDownArrow = element.all(by.css("mat-form-field[data-automation-id='" + option + "'] div[class*='arrow']")).first();
Util.waitUntilElementIsVisible(dropDownArrow);
dropDownArrow.click();
Util.waitUntilElementIsVisible(this.selectedOption);