Fix e2e test

This commit is contained in:
Nabil BENDAFI
2018-02-23 17:22:14 +01:00
parent 8b3d953fd3
commit 8d6b5cbd96
2 changed files with 6 additions and 2 deletions

View File

@ -7,8 +7,8 @@ describe('gns3-web-ui App', () => {
page = new Gns3WebUiPage(); page = new Gns3WebUiPage();
}); });
it('should display welcome message', () => { it('should display title', () => {
page.navigateTo(); page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!'); expect(page.getTitleText()).toEqual('GNS3 Web UI Demo');
}); });
}); });

View File

@ -5,6 +5,10 @@ export class Gns3WebUiPage {
return browser.get('/'); return browser.get('/');
} }
getTitleText() {
return browser.getTitle();
}
getParagraphText() { getParagraphText() {
return element(by.css('app-root h1')).getText(); return element(by.css('app-root h1')).getText();
} }