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

fix: removed travis-specific configuration from karma.conf.js #1815

Merged
merged 1 commit into from
Aug 26, 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
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap caskroom/cask; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cask install google-chrome --force; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir ~/.config && echo "--no-sandbox" > ~/.config/chrome-flags.conf; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DISPLAY=:99.0; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CHROME_BIN=chromium-browser; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo "--no-sandbox" > ~/.config/chromium-flags.conf; fi
- if [[ "$TARGET" == "mobile" ]]; then export MOBILE_TEST=true; fi
- npm config set spin false
- npm config set progress false
Expand All @@ -48,4 +50,4 @@ install:
- npm install --no-optional

script:
- npm run-script $SCRIPT
- npm run-script $SCRIPT
7 changes: 0 additions & 7 deletions addon/ng2/blueprints/ng2/files/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ module.exports = function (config) {
require('karma-remap-istanbul'),
require('angular-cli/plugins/karma')
],
customLaunchers: {
// chrome setup for travis CI using chromium
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
files: [
{ pattern: './<%= sourceDir %>/test.ts', watched: false }
],
Expand Down
13 changes: 3 additions & 10 deletions tests/e2e/e2e_workflow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ describe('Basic end-to-end Workflow', function () {

var testArgs = ['test', '--watch', 'false'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line still needs to stay though. CI fails because it's missing, and it's what makes unit tests run in single run mode.


// In travis CI only run tests in Chrome_travis_ci
if (process.env.TRAVIS) {
testArgs.push('--browsers');
testArgs.push('Chrome_travis_ci');
}


it('Installs angular-cli correctly', function () {
this.timeout(300000);

Expand Down Expand Up @@ -492,7 +485,7 @@ describe('Basic end-to-end Workflow', function () {
let stylesPath = path.join(process.cwd(), 'src', 'styles.css');
let testStyle = 'body { background-color: blue; }';
fs.writeFileSync(stylesPath, testStyle, 'utf8');

sh.exec(`${ngBin} build`);

var stylesBundlePath = path.join(process.cwd(), 'dist', 'styles.bundle.js');
Expand Down Expand Up @@ -548,15 +541,15 @@ describe('Basic end-to-end Workflow', function () {
expect(stylesBundleContent).to.include('* Bootstrap ');

const scriptsBundlePath = path.join(process.cwd(), 'dist', 'scripts.bundle.js');
const scriptsBundleContent = fs.readFileSync(scriptsBundlePath, { encoding: 'utf8' });
const scriptsBundleContent = fs.readFileSync(scriptsBundlePath, { encoding: 'utf8' });
expect(scriptsBundleContent).to.include('* jQuery JavaScript');
expect(scriptsBundleContent).to.include('/*! tether ');
expect(scriptsBundleContent).to.include('* Bootstrap ');

// check the scripts are loaded in the correct order
const indexPath = path.join(process.cwd(), 'dist', 'index.html');
const indexContent = fs.readFileSync(indexPath, { encoding: 'utf8' });
let scriptTags = '<script type="text/javascript" src="inline.js"></script>' +
let scriptTags = '<script type="text/javascript" src="inline.js"></script>' +
'<script type="text/javascript" src="styles.bundle.js"></script>' +
'<script type="text/javascript" src="scripts.bundle.js"></script>' +
'<script type="text/javascript" src="main.bundle.js"></script>'
Expand Down