Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 61c85a9

Browse files
filipesilvanaomiblack
authored andcommitted
chore: add async/await support to e2e tests
1 parent 643c59a commit 61c85a9

File tree

40 files changed

+70
-34
lines changed

40 files changed

+70
-34
lines changed

public/docs/_examples/_protractor/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "es6",
44
"module": "commonjs",
55
"moduleResolution": "node",
66
"sourceMap": true,

public/docs/_examples/_protractor/typings.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"globalDependencies": {
33
"angular-protractor": "registry:dt/angular-protractor#1.5.0+20160425143459",
4-
"core-js": "registry:dt/core-js#0.0.0+20160317120654",
54
"jasmine": "registry:dt/jasmine#2.2.0+20160505161446",
65
"node": "registry:dt/node#6.0.0+20160613154055",
76
"selenium-webdriver": "registry:dt/selenium-webdriver#2.44.0+20160317120654"

public/docs/_examples/animations/e2e-spec.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
/**
34
* The tests here basically just checking that the end styles
45
* of each animation are in effect.
@@ -307,7 +308,9 @@ describe('Animation Tests', () => {
307308
return protractor.promise.all([
308309
getBoundingClientWidth(el),
309310
getOffsetWidth(el)
310-
]).then(function([clientWidth, offsetWidth]) {
311+
]).then(function(promiseResolutions) {
312+
let clientWidth = promiseResolutions[0];
313+
let offsetWidth = promiseResolutions[1];
311314
return clientWidth / offsetWidth;
312315
});
313316
}

public/docs/_examples/architecture/e2e-spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Architecture', function () {
34

45
let title = 'Hero List';

public/docs/_examples/attribute-directives/e2e-spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Attribute directives', function () {
34

45
let _title = 'My First Attribute Directive';

public/docs/_examples/cb-a1-a2-quick-reference/e2e-spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Angular 1 to 2 Quick Reference Tests', function () {
34

45
beforeAll(function () {

public/docs/_examples/cb-component-communication/e2e-spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Component Communication Cookbook Tests', function () {
34

45
// Note: '?e2e' which app can read to know it is running in protractor

public/docs/_examples/cb-component-relative-paths/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Cookbook: component-relative paths', function () {
34

45
interface Page {

public/docs/_examples/cb-dependency-injection/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Dependency Injection Cookbook', function () {
34

45
beforeAll(function () {

public/docs/_examples/cb-dynamic-form/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
/* tslint:disable:quotemark */
34
describe('Dynamic Form', function () {
45

public/docs/_examples/cb-set-document-title/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
// gulp run-e2e-tests --filter=cb-set-document-title
34
describe('Set Document Title', function () {
45

public/docs/_examples/cb-ts-to-js/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('TypeScript to Javascript tests', function () {
34

45
beforeAll(function () {

public/docs/_examples/cli-quickstart/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('cli-quickstart App', () => {
34
beforeEach(() => {
45
return browser.get('/');

public/docs/_examples/component-styles/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Component Style Tests', function () {
34

45
beforeAll(function () {

public/docs/_examples/dependency-injection/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Dependency Injection Tests', function () {
34

45

public/docs/_examples/displaying-data/e2e-spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Displaying Data Tests', function () {
34
let _title = 'Tour of Heroes';
45
let _defaultHero = 'Windstorm';

public/docs/_examples/forms/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describeIf(browser.appIsTs || browser.appIsJs, 'Forms Tests', function () {
34

45
beforeEach(function () {

public/docs/_examples/hierarchical-dependency-injection/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Hierarchical dependency injection', function () {
34

45
beforeEach(function () {

public/docs/_examples/homepage-hello-world/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Homepage Hello World', function () {
34

45
beforeAll(function () {

public/docs/_examples/homepage-tabs/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Homepage Tabs', function () {
34

45
beforeAll(function () {

public/docs/_examples/homepage-todo/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Homepage Todo', function () {
34

45
beforeAll(function () {

public/docs/_examples/lifecycle-hooks/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Lifecycle hooks', function () {
34

45
beforeAll(function () {

public/docs/_examples/pipes/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Pipes', function () {
34

45
beforeAll(function () {

public/docs/_examples/quickstart/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('QuickStart E2E Tests', function () {
34

45
let expectedMsg = 'My First Angular 2 App';

public/docs/_examples/router-deprecated/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Router', function () {
34

45
beforeAll(function () {

public/docs/_examples/router/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Router', function () {
34

45
beforeAll(function () {

public/docs/_examples/server-communication/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Server Communication', function () {
34

45
beforeAll(function () {

public/docs/_examples/structural-directives/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Structural Directives', function () {
34

45
// tests interact - so we need beforeEach instead of beforeAll

public/docs/_examples/style-guide/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Style Guide', function () {
34
it('01-01', function () {
45
browser.get('#/01-01');

public/docs/_examples/styleguide/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Documentation StyleGuide E2E Tests', function() {
34

45
let expectedMsg = 'My First Angular 2 App';

public/docs/_examples/template-syntax/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
// Not yet complete
34
describe('Template Syntax', function () {
45

public/docs/_examples/toh-1/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Tutorial part 1', () => {
34

45
let expectedH1 = 'Tour of Heroes';

public/docs/_examples/toh-5/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Tutorial', function () {
34

45
beforeAll(function () {

public/docs/_examples/toh-6/e2e-spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('TOH Http Chapter', function () {
34

45
beforeEach(function () {

public/docs/_examples/upgrade-adapter/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('Upgrade Tests', function () {
34

45
// Protractor doesn't support the UpgradeAdapter's asynchronous

public/docs/_examples/upgrade-phonecat-1-typescript/e2e-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
22
'use strict';
33

44
// Angular E2E Testing Guide:

public/docs/_examples/upgrade-phonecat-2-hybrid/e2e-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
22
'use strict';
33

44
// Angular E2E Testing Guide:

public/docs/_examples/upgrade-phonecat-3-final/e2e-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
22
'use strict';
33

44
// Angular E2E Testing Guide:

public/docs/_examples/user-input/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('User Input Tests', function () {
34

45
beforeAll(function () {

public/docs/_examples/webpack/e2e-spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="../_protractor/e2e.d.ts" />
1+
/// <reference path='../_protractor/e2e.d.ts' />
2+
'use strict';
23
describe('QuickStart E2E Tests', function () {
34

45
let expectedMsg = 'Hello from Angular 2 App with Webpack';

0 commit comments

Comments
 (0)