feat(aio): add initial doc viewer

with lots of fixes from Igor and Ward <3
This commit is contained in:
Rob Wormald
2017-02-02 12:10:47 -08:00
committed by Igor Minar
parent 559cf9d192
commit 6e2c9cb586
20 changed files with 169 additions and 20 deletions

View File

@ -7,8 +7,10 @@ describe('site App', function() {
page = new SitePage();
});
it('should display message saying app works', () => {
it('should show features text after clicking "Features"', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('home-page works!');
page.featureLink.click().then(() => {
expect(page.getDocViewerText()).toContain('Progressive web apps');
});
});
});

View File

@ -1,11 +1,14 @@
import { browser, element, by } from 'protractor';
export class SitePage {
featureLink = element(by.css('md-toolbar a[aioNavLink=features]'));
navigateTo() {
return browser.get('/');
}
getParagraphText() {
return element(by.css('app-home-page p')).getText();
getDocViewerText() {
return element(by.css('aio-doc-viewer')).getText();
}
}