Skip to content

Commit

Permalink
docs(aio): add e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kapunahelewong committed Dec 5, 2017
1 parent 83b2d55 commit f945fe9
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions aio/content/examples/service-worker-getstart/e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ describe('sw-example App', () => {
page = new AppPage();
});



it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to Service Workers!');
Expand All @@ -21,12 +19,19 @@ describe('sw-example App', () => {
expect(logo.isPresent()).toBe(true);
});

it('shows a list of links', function () {
const listItem = getListItemsStruct();
// expect(this.listItem0.getText()).toBe('something');
// expect(listItem.getText()).toBe('something');
expect(listItem.count()).toBe(3);
// expect(listItem.items.get(0).getText()).toBe('Angular Service Worker Intro');
it('should show a header for the list of links', function () {
var listHeader = element(by.css('app-root > h2'));
expect(listHeader.getText()).toEqual('Here are some links to help you start:');
});

it('should show a list of links', function () {
element.all(by.css('ul > li > h2 > a')).then(function(items) {
expect(items.length).toBe(4);
expect(items[0].getText()).toBe('Angular Service Worker Intro');
expect(items[1].getText()).toBe('Tour of Heroes');
expect(items[2].getText()).toBe('CLI Documentation');
expect(items[3].getText()).toBe('Angular blog');
});
});

});

0 comments on commit f945fe9

Please sign in to comment.