refactor: format and lint code
This commit is contained in:
parent
20bed46737
commit
7295a5e7f2
@ -6,12 +6,13 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {verifyNoBrowserErrors} from '../../../../_common/e2e_util';
|
|
||||||
import {browser, by, element, protractor} from 'protractor';
|
import {browser, by, element, protractor} from 'protractor';
|
||||||
|
|
||||||
|
import {verifyNoBrowserErrors} from '../../../../_common/e2e_util';
|
||||||
|
|
||||||
|
|
||||||
function waitForElement(selector: string) {
|
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.
|
// Waits for the element with id 'abc' to be present on the dom.
|
||||||
browser.wait(EC.presenceOf($(selector)), 20000);
|
browser.wait(EC.presenceOf($(selector)), 20000);
|
||||||
}
|
}
|
||||||
@ -19,10 +20,8 @@ function waitForElement(selector: string) {
|
|||||||
describe('Location', () => {
|
describe('Location', () => {
|
||||||
afterEach(verifyNoBrowserErrors);
|
afterEach(verifyNoBrowserErrors);
|
||||||
|
|
||||||
var URL = '/common/location/ts/#/bar/baz';
|
|
||||||
|
|
||||||
it('should verify paths', () => {
|
it('should verify paths', () => {
|
||||||
browser.get(URL);
|
browser.get('/common/location/ts/#/bar/baz');
|
||||||
waitForElement('hash-location');
|
waitForElement('hash-location');
|
||||||
expect(element.all(by.css('path-location code')).get(0).getText())
|
expect(element.all(by.css('path-location code')).get(0).getText())
|
||||||
.toEqual('/common/location/ts');
|
.toEqual('/common/location/ts');
|
||||||
|
@ -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
|
|
@ -82,6 +82,7 @@ export class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
|||||||
if (console.error) {
|
if (console.error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
} else {
|
} else {
|
||||||
|
// tslint:disable-next-line:no-console
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,9 +27,7 @@ var BROWSER_OPTIONS = {
|
|||||||
exports.config = {
|
exports.config = {
|
||||||
onPrepare: function() { beforeEach(function() { browser.ignoreSynchronization = false; }); },
|
onPrepare: function() { beforeEach(function() { browser.ignoreSynchronization = false; }); },
|
||||||
allScriptsTimeout: 11000,
|
allScriptsTimeout: 11000,
|
||||||
specs: [
|
specs: ['dist/examples/**/e2e_test/*_spec.js'],
|
||||||
'dist/examples/**/e2e_test/*_spec.js'
|
|
||||||
],
|
|
||||||
capabilities: process.env.TRAVIS ? BROWSER_OPTIONS.ChromeOnTravis : BROWSER_OPTIONS.LocalChrome,
|
capabilities: process.env.TRAVIS ? BROWSER_OPTIONS.ChromeOnTravis : BROWSER_OPTIONS.LocalChrome,
|
||||||
directConnect: true,
|
directConnect: true,
|
||||||
baseUrl: 'http://localhost:8001/',
|
baseUrl: 'http://localhost:8001/',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user