2016-05-30 14:05:09 -04:00
|
|
|
/// <reference path="../_protractor/e2e.d.ts" />
|
|
|
|
/*global browser, element, by */
|
|
|
|
describe('Getting Started E2E Tests', function() {
|
|
|
|
|
|
|
|
// #docregion shared
|
|
|
|
let expectedMsg = 'My First Angular 2 App';
|
|
|
|
|
|
|
|
// tests shared across languages
|
2016-06-01 12:11:58 -04:00
|
|
|
function sharedTests(basePath: string) {
|
2016-05-30 14:05:09 -04:00
|
|
|
beforeEach(function () {
|
|
|
|
browser.get(basePath + 'index.html');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should display: '+ expectedMsg, function() {
|
|
|
|
expect(element(by.id('output')).getText()).toEqual(expectedMsg);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
// #enddocregion
|
|
|
|
|
|
|
|
describe('Getting Started in JavaScript', function() {
|
|
|
|
sharedTests('gettingstarted/js/');
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('Getting Started in TypeScript', function() {
|
|
|
|
sharedTests('gettingstarted/ts/');
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|