chore: add async/await support to e2e tests

This commit is contained in:
Filipe Silva 2016-06-16 02:01:03 +01:00 committed by Naomi Black
parent 643c59a15e
commit 61c85a92a4
40 changed files with 70 additions and 34 deletions

View File

@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,

View File

@ -1,7 +1,6 @@
{
"globalDependencies": {
"angular-protractor": "registry:dt/angular-protractor#1.5.0+20160425143459",
"core-js": "registry:dt/core-js#0.0.0+20160317120654",
"jasmine": "registry:dt/jasmine#2.2.0+20160505161446",
"node": "registry:dt/node#6.0.0+20160613154055",
"selenium-webdriver": "registry:dt/selenium-webdriver#2.44.0+20160317120654"

View File

@ -1,4 +1,5 @@
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
/**
* The tests here basically just checking that the end styles
* of each animation are in effect.
@ -307,7 +308,9 @@ describe('Animation Tests', () => {
return protractor.promise.all([
getBoundingClientWidth(el),
getOffsetWidth(el)
]).then(function([clientWidth, offsetWidth]) {
]).then(function(promiseResolutions) {
let clientWidth = promiseResolutions[0];
let offsetWidth = promiseResolutions[1];
return clientWidth / offsetWidth;
});
}

View File

@ -1,4 +1,5 @@
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Architecture', function () {
let title = 'Hero List';

View File

@ -1,4 +1,5 @@
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Attribute directives', function () {
let _title = 'My First Attribute Directive';

View File

@ -1,4 +1,5 @@
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Angular 1 to 2 Quick Reference Tests', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Component Communication Cookbook Tests', function () {
// Note: '?e2e' which app can read to know it is running in protractor

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Cookbook: component-relative paths', function () {
interface Page {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Dependency Injection Cookbook', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
/* tslint:disable:quotemark */
describe('Dynamic Form', function () {

View File

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

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('TypeScript to Javascript tests', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('cli-quickstart App', () => {
beforeEach(() => {
return browser.get('/');

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Component Style Tests', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Dependency Injection Tests', function () {

View File

@ -1,4 +1,5 @@
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Displaying Data Tests', function () {
let _title = 'Tour of Heroes';
let _defaultHero = 'Windstorm';

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describeIf(browser.appIsTs || browser.appIsJs, 'Forms Tests', function () {
beforeEach(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Hierarchical dependency injection', function () {
beforeEach(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Homepage Hello World', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Homepage Tabs', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Homepage Todo', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Lifecycle hooks', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Pipes', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('QuickStart E2E Tests', function () {
let expectedMsg = 'My First Angular 2 App';

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Router', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Router', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Server Communication', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Structural Directives', function () {
// tests interact - so we need beforeEach instead of beforeAll

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Style Guide', function () {
it('01-01', function () {
browser.get('#/01-01');

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Documentation StyleGuide E2E Tests', function() {
let expectedMsg = 'My First Angular 2 App';

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
// Not yet complete
describe('Template Syntax', function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Tutorial part 1', () => {
let expectedH1 = 'Tour of Heroes';

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Tutorial', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('TOH Http Chapter', function () {
beforeEach(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('Upgrade Tests', function () {
// Protractor doesn't support the UpgradeAdapter's asynchronous

View File

@ -1,4 +1,4 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
// Angular E2E Testing Guide:

View File

@ -1,4 +1,4 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
// Angular E2E Testing Guide:

View File

@ -1,4 +1,4 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
// Angular E2E Testing Guide:

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('User Input Tests', function () {
beforeAll(function () {

View File

@ -1,4 +1,5 @@
/// <reference path="../_protractor/e2e.d.ts" />
/// <reference path='../_protractor/e2e.d.ts' />
'use strict';
describe('QuickStart E2E Tests', function () {
let expectedMsg = 'Hello from Angular 2 App with Webpack';