docs(aio): fix animations example to work with Angular v5 (#19511)

PR Close #19511
This commit is contained in:
Peter Bacon Darwin 2017-10-04 10:38:59 +01:00 committed by Tobias Bosch
parent 4b3f82a47e
commit d3fd088162
1 changed files with 4 additions and 4 deletions

View File

@ -335,17 +335,17 @@ describe('Animation Tests', () => {
});
}
function getBoundingClientWidth(el: ElementFinder): promise.Promise<number> {
function getBoundingClientWidth(el: ElementFinder) {
return browser.executeScript(
'return arguments[0].getBoundingClientRect().width',
el.getWebElement()
);
) as PromiseLike<number>;
}
function getOffsetWidth(el: ElementFinder): promise.Promise<number> {
function getOffsetWidth(el: ElementFinder) {
return browser.executeScript(
'return arguments[0].offsetWidth',
el.getWebElement()
);
) as PromiseLike<number>;
}
});