Skip to content

Commit

Permalink
Added e2e test to travis.yml
Browse files Browse the repository at this point in the history
Closes #203.
  • Loading branch information
imolorhe committed Jan 12, 2018
1 parent 558f932 commit 7fcf19f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -31,6 +31,7 @@ before_script:
script:
- ng lint
- if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then karma start karma.conf.js --single-run; fi
- ng e2e
before_deploy:
- if [ ! -z "$TRAVIS_TAG" ]; then npm run build-electron; fi
deploy:
Expand Down
4 changes: 2 additions & 2 deletions e2e/app.e2e-spec.ts
Expand Up @@ -7,8 +7,8 @@ describe('altair App', () => {
page = new AltairPage();
});

it('should display message saying app works', () => {
it('should have at lease one window', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('app works!');
expect(page.getWindows().isDisplayed()).toBe(true);
});
});
11 changes: 11 additions & 0 deletions e2e/app.po.ts
@@ -1,11 +1,22 @@
import { browser, element, by } from 'protractor';

export class AltairPage {
constructor() {
browser.waitForAngularEnabled(false);
}
navigateTo() {
return browser.get('/');
}

getParagraphText() {
return element(by.css('app-root h1')).getText();
}

getWindows() {
return element(by.css('app-window'));
}

title() {
return browser.getTitle();
}
}

0 comments on commit 7fcf19f

Please sign in to comment.