refactor: format and lint code

This commit is contained in:
Victor Berchet
2016-12-12 11:30:25 -08:00
parent 20bed46737
commit 7295a5e7f2
4 changed files with 6 additions and 44 deletions

View File

@ -6,12 +6,13 @@
* found in the LICENSE file at https://angular.io/license
*/
import {verifyNoBrowserErrors} from '../../../../_common/e2e_util';
import {browser, by, element, protractor} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../_common/e2e_util';
function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions;
const EC = (<any>protractor).ExpectedConditions;
// Waits for the element with id 'abc' to be present on the dom.
browser.wait(EC.presenceOf($(selector)), 20000);
}
@ -19,10 +20,8 @@ function waitForElement(selector: string) {
describe('Location', () => {
afterEach(verifyNoBrowserErrors);
var URL = '/common/location/ts/#/bar/baz';
it('should verify paths', () => {
browser.get(URL);
browser.get('/common/location/ts/#/bar/baz');
waitForElement('hash-location');
expect(element.all(by.css('path-location code')).get(0).getText())
.toEqual('/common/location/ts');