Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes initial e2e tests #837

Merged
merged 2 commits into from
Aug 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ node_js:
- "4"
- "5"
- "node"

before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3
sudo: false
16 changes: 14 additions & 2 deletions config/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module.exports = function(config) {
var testWebpackConfig = require('./webpack.test.js');

config.set({
var configuration = {

// base path that will be used to resolve all patterns (e.g. files, exclude)
basePath: '',
Expand Down Expand Up @@ -79,11 +79,23 @@ module.exports = function(config) {
'Chrome'
],

customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},

/*
* Continuous Integration mode
* if true, Karma captures browsers, runs the tests and exits
*/
singleRun: true
});
};

if(process.env.TRAVIS){
configuration.browsers = ['Chrome_travis_ci'];
}

config.set(configuration);
};
2 changes: 1 addition & 1 deletion src/app/app.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('App', () => {

it('should have buttons', () => {
let subject = element(by.css('button')).getText();
let result = 'Index';
let result = 'Submit Value';
expect(subject).toEqual(result);
});

Expand Down