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');

View File

@ -1,36 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var core_1 = require('@angular/core');
var platform_browser_1 = require('@angular/platform-browser');
var platform_browser_dynamic_1 = require('@angular/platform-browser-dynamic');
var MyAppComponent = (function () {
function MyAppComponent() {
}
MyAppComponent = __decorate([
core_1.Component({ selector: 'my-component' })
], MyAppComponent);
return MyAppComponent;
}());
// #docregion providers
var AppModule = (function () {
function AppModule() {
}
AppModule = __decorate([
core_1.NgModule({ imports: [platform_browser_1.BrowserModule], bootstrap: [MyAppComponent] })
], AppModule);
return AppModule;
}());
platform_browser_dynamic_1.platformBrowserDynamic().bootstrapModule(AppModule);
// #enddocregion

View File

@ -82,6 +82,7 @@ export class BrowserDomAdapter extends GenericBrowserDomAdapter {
if (console.error) {
console.error(error);
} else {
// tslint:disable-next-line:no-console
console.log(error);
}
}

View File

@ -27,9 +27,7 @@ var BROWSER_OPTIONS = {
exports.config = {
onPrepare: function() { beforeEach(function() { browser.ignoreSynchronization = false; }); },
allScriptsTimeout: 11000,
specs: [
'dist/examples/**/e2e_test/*_spec.js'
],
specs: ['dist/examples/**/e2e_test/*_spec.js'],
capabilities: process.env.TRAVIS ? BROWSER_OPTIONS.ChromeOnTravis : BROWSER_OPTIONS.LocalChrome,
directConnect: true,
baseUrl: 'http://localhost:8001/',