chore: add async/await support to e2e tests
This commit is contained in:
		
							parent
							
								
									643c59a15e
								
							
						
					
					
						commit
						61c85a92a4
					
				| @ -1,6 +1,6 @@ | ||||
| { | ||||
|   "compilerOptions": { | ||||
|     "target": "es5", | ||||
|     "target": "es6", | ||||
|     "module": "commonjs", | ||||
|     "moduleResolution": "node", | ||||
|     "sourceMap": true, | ||||
|  | ||||
| @ -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" | ||||
|  | ||||
| @ -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; | ||||
|     }); | ||||
|   } | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('Architecture', function () { | ||||
| 
 | ||||
|   let title = 'Hero List'; | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('Attribute directives', function () { | ||||
| 
 | ||||
|   let _title = 'My First Attribute Directive'; | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('Angular 1 to 2 Quick Reference Tests', function () { | ||||
| 
 | ||||
|   beforeAll(function () { | ||||
|  | ||||
| @ -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
 | ||||
|  | ||||
| @ -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 { | ||||
|  | ||||
| @ -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 () { | ||||
|  | ||||
| @ -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 () { | ||||
| 
 | ||||
|  | ||||
| @ -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 () { | ||||
| 
 | ||||
|  | ||||
| @ -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 () { | ||||
|  | ||||
| @ -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('/'); | ||||
|  | ||||
| @ -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 () { | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path="../_protractor/e2e.d.ts" />
 | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('Dependency Injection Tests', function () { | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -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'; | ||||
|  | ||||
| @ -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 () { | ||||
|  | ||||
| @ -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 () { | ||||
|  | ||||
| @ -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 () { | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path="../_protractor/e2e.d.ts" />
 | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('Homepage Tabs', function () { | ||||
| 
 | ||||
|   beforeAll(function () { | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path="../_protractor/e2e.d.ts" />
 | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('Homepage Todo', function () { | ||||
| 
 | ||||
|   beforeAll(function () { | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path="../_protractor/e2e.d.ts" />
 | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('Lifecycle hooks', function () { | ||||
| 
 | ||||
|   beforeAll(function () { | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path="../_protractor/e2e.d.ts" />
 | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('Pipes', function () { | ||||
| 
 | ||||
|   beforeAll(function () { | ||||
|  | ||||
| @ -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'; | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path="../_protractor/e2e.d.ts" />
 | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('Router', function () { | ||||
| 
 | ||||
|   beforeAll(function () { | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path="../_protractor/e2e.d.ts" />
 | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('Router', function () { | ||||
| 
 | ||||
|   beforeAll(function () { | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path="../_protractor/e2e.d.ts" />
 | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('Server Communication', function () { | ||||
| 
 | ||||
|   beforeAll(function () { | ||||
|  | ||||
| @ -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
 | ||||
|  | ||||
| @ -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'); | ||||
|  | ||||
| @ -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'; | ||||
|  | ||||
| @ -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 () { | ||||
| 
 | ||||
|  | ||||
| @ -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'; | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path="../_protractor/e2e.d.ts" />
 | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('Tutorial', function () { | ||||
| 
 | ||||
|   beforeAll(function () { | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| describe('TOH Http Chapter', function () { | ||||
| 
 | ||||
|   beforeEach(function () { | ||||
|  | ||||
| @ -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
 | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /// <reference path="../_protractor/e2e.d.ts" />
 | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| 
 | ||||
| // Angular E2E Testing Guide:
 | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /// <reference path="../_protractor/e2e.d.ts" />
 | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| 
 | ||||
| // Angular E2E Testing Guide:
 | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /// <reference path="../_protractor/e2e.d.ts" />
 | ||||
| /// <reference path='../_protractor/e2e.d.ts' />
 | ||||
| 'use strict'; | ||||
| 
 | ||||
| // Angular E2E Testing Guide:
 | ||||
|  | ||||
| @ -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 () { | ||||
|  | ||||
| @ -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'; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user