e2e test components refactoring (#76)

This commit is contained in:
Adina Parpalita
2017-11-22 10:51:49 +02:00
committed by Cilibiu Bogdan
parent 8df9aab5c0
commit 56d62276d7
6 changed files with 38 additions and 27 deletions

View File

@@ -46,10 +46,7 @@ export class Sidenav extends Component {
}
isActiveByLabel(label: string): promise.Promise<boolean> {
return this
.getLinkByLabel(label)
.getWebElement()
.then(element => element.getAttribute('class'))
return this.getLinkByLabel(label).getAttribute('class')
.then(className => className.includes(Sidenav.selectors.activeLink.replace('.', '')));
}