Update gulpfile and project to add a tsconfig to protractor test folders Change all sample e2e-spec.js -> e2e-spec.ts Split typings between e2e-spec & app code Use same config for all e2e tests Only 1/3 e2e specs truly converted. Most don't pass because they fail TS transpile by Protractor due to missing type annotations
		
			
				
	
	
		
			27 lines
		
	
	
		
			810 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			810 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
/// <reference path='../_protractor/e2e.d.ts' />
 | 
						|
describe('Displaying Data Tests', function () {
 | 
						|
  let _title = 'Tour of Heroes';
 | 
						|
  let _defaultHero = 'Windstorm';
 | 
						|
 | 
						|
  beforeAll(function () {
 | 
						|
    browser.get('');
 | 
						|
  });
 | 
						|
 | 
						|
  it('should display correct title: ' + _title, function () {
 | 
						|
    expect(element(by.css('h1')).getText()).toEqual(_title);
 | 
						|
  });
 | 
						|
 | 
						|
  it('should have correct default hero:  ' + _defaultHero, function () {
 | 
						|
    expect(element(by.css('h2')).getText()).toContain(_defaultHero);
 | 
						|
  });
 | 
						|
 | 
						|
 it('should have heroes', function () {
 | 
						|
    let heroEls = element.all(by.css('li'));
 | 
						|
    expect(heroEls.count()).not.toBe(0, 'should have heroes');
 | 
						|
  });
 | 
						|
 | 
						|
  it('should display "there are many heroes!"', function () {
 | 
						|
    expect(element(by.css('ul ~ p')).getText()).toContain('There are many heroes!');
 | 
						|
  });
 | 
						|
});
 |