[ADF-3989] appname duplicated after switching between saved filters (#4395)

* C297646 - automated

* linting fixes
This commit is contained in:
gmandakini
2019-03-08 13:30:50 +00:00
committed by Eugenio Romano
parent 8b8f1e147f
commit 10699cb7b0
3 changed files with 152 additions and 86 deletions

View File

@@ -98,6 +98,32 @@ export class EditProcessFilterCloudComponent {
Util.waitUntilElementIsVisible(this.selectedOption);
}
setAppNameDropDown(option) {
this.clickOnDropDownArrow('appName');
let appNameElement = element.all(by.cssContainingText('mat-option span', option)).first();
Util.waitUntilElementIsClickable(appNameElement);
Util.waitUntilElementIsVisible(appNameElement);
appNameElement.click();
return this;
}
async checkAppNamesAreUnique() {
let appNameList = element.all(by.css('mat-option[data-automation-id="adf-cloud-edit-process-property-optionsappName"] span'));
let appTextList = await appNameList.getText();
let uniqueArray = appTextList.filter((appName) => {
let sameAppNameArray = appTextList.filter((eachApp) => eachApp === appName);
return sameAppNameArray.length === 1;
});
return uniqueArray.length === appTextList.length;
}
getNumberOfAppNameOptions() {
this.clickOnDropDownArrow('appName');
let dropdownOptions = element.all(by.css('.mat-select-panel mat-option'));
return dropdownOptions.count();
}
setProcessInstanceId(option) {
return this.setProperty('processInstanceId', option);
}