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

Commit 59408b1

Browse files
chalinwardbell
authored andcommitted
test(toh-1): add e2e for Dart and TS
closes 1620 Contributes to #1619.
1 parent 2fc7e5a commit 59408b1

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

public/docs/_examples/toh-1/dart/example-config.json

Whitespace-only changes.
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/// <reference path="../_protractor/e2e.d.ts" />
2+
describe('Tutorial part 1', () => {
3+
4+
let expectedH1 = 'Tour of Heroes';
5+
let expectedTitle = `Angular 2 ${expectedH1}`;
6+
let hero = { id: 1, name: 'Windstorm' };
7+
let expectedH2 = `${hero.name} details!`;
8+
9+
beforeEach(() => {
10+
return browser.get('');
11+
});
12+
13+
it(`should have title '${expectedTitle}'`, () => {
14+
expect(browser.getTitle()).toEqual(expectedTitle);
15+
});
16+
17+
it(`should have '${expectedH2}'`, () => {
18+
var text = element(by.css('h2')).getText()
19+
expect(text).toEqual(expectedH2);
20+
});
21+
22+
it(`should have input name '${hero.name}'`, () => {
23+
var name = element(by.css('input')).getAttribute('value');
24+
expect(name).toEqual(hero.name);
25+
});
26+
});

0 commit comments

Comments
 (0)