From 16a1dcd1d37894130d33f61914f05f1ebc1ac5b1 Mon Sep 17 00:00:00 2001 From: Pierre Brisorgueil Date: Thu, 13 Jul 2017 19:57:09 +0200 Subject: [PATCH 1/3] feat(dependencies): replace PhantomJS in favor of chrome (#1776) * fix(users): test for usernameOrEmail * Add comment to remind change for mongo replicaset connection * clean comment .. * Generic pageTitle concept * Revert "Generic pageTitle concept" This reverts commit ff00ec950f085ca3b6d1abb564eab1965ab0a56e. * align on meanjs state * fix atom beautify newline * align to mean indent * upgrade protractor * Switch from firefox to chrome for travis * fix build * clean npm install protractor * enable sudo * clean order for mean * clean dependencies --- .travis.yml | 8 ++++---- karma.conf.js | 18 +++++++++++++++--- package.json | 3 --- protractor.conf.js | 11 ----------- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97822f8585..df095c8caf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js dist: trusty -sudo: false +sudo: required node_js: - '6.10' - '7' @@ -24,18 +24,18 @@ addons: apt: sources: - ubuntu-toolchain-r-test + - google-chrome packages: - g++-4.8 - gcc-4.8 - clang + - google-chrome-stable before_install: - npm install nsp -g # - npm install snyk -g - - npm install protractor + - 'export PATH=$PATH:/usr/lib/chromium-browser/' - 'export DISPLAY=:99.0' - 'sh -e /etc/init.d/xvfb start' - - 'node_modules/protractor/bin/webdriver-manager update --standalone' - - 'node_modules/protractor/bin/webdriver-manager start 2>&1 &' - sleep 3 #before_script: # - snyk auth $SNYK_TOKEN diff --git a/karma.conf.js b/karma.conf.js index 409af1168d..5ef83e610f 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -11,7 +11,7 @@ var _ = require('lodash'), // Karma configuration module.exports = function (karmaConfig) { - karmaConfig.set({ + var configuration = { frameworks: ['jasmine'], preprocessors: { @@ -54,7 +54,13 @@ module.exports = function (karmaConfig) { // - Safari (only Mac) // - PhantomJS // - IE (only Windows) - browsers: ['PhantomJS'], + browsers: ['Chrome'], + customLaunchers: { + Chrome_travis_ci: { + base: 'Chrome', + flags: ['--no-sandbox'] + } + }, // If browser does not capture in given timeout [ms], kill it captureTimeout: 60000, @@ -62,5 +68,11 @@ module.exports = function (karmaConfig) { // Continuous Integration mode // If true, it capture browsers, run tests and exit singleRun: true - }); + }; + + if (process.env.TRAVIS) { + configuration.browsers = ['Chrome_travis_ci']; + } + + karmaConfig.set(configuration); }; diff --git a/package.json b/package.json index 2128504918..bdd0352740 100644 --- a/package.json +++ b/package.json @@ -105,11 +105,8 @@ "karma": "~1.6.0", "karma-chrome-launcher": "~2.0.0", "karma-coverage": "~1.1.1", - "karma-firefox-launcher": "~1.0.0", "karma-jasmine": "~1.1.0", "karma-ng-html2js-preprocessor": "~1.0.0", - "karma-phantomjs-launcher": "~1.0.0", - "phantomjs-prebuilt": "~2.1.14", "lcov-result-merger": "~1.2.0", "run-sequence": "~1.2.2", "semver": "~5.3.0", diff --git a/protractor.conf.js b/protractor.conf.js index b9af182894..46fd39cd79 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -5,15 +5,4 @@ var config = { specs: ['modules/*/tests/e2e/*.js'] }; -if (process.env.TRAVIS) { - config.capabilities = { - // Without this setting, Travis CI would default - // to using Chrome anyway. - // NOTE: Firefox is currently not working with - // the Travis CI builds. For more info see: - // https://github.com/meanjs/mean/pull/1805 - browserName: 'chrome' - }; -} - exports.config = config; From 19478ba942ab2058114cba638268edd90fb629d9 Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Thu, 13 Jul 2017 22:25:12 +0300 Subject: [PATCH 2/3] feat(Travis): Don't allow Node.js 8 testing fail (#1815) --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index df095c8caf..6d89aaa6bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,8 @@ node_js: - '8' matrix: fast_finish: true - allow_failures: - - node_js: '8' +# allow_failures: +# - node_js: '8' os: - linux - centos From f43d3ead05251e1ca637304bd99e6874a10053df Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Thu, 13 Jul 2017 22:54:05 +0300 Subject: [PATCH 3/3] feat(Karma): Add mocha style progress to Karma tests --- karma.conf.js | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/karma.conf.js b/karma.conf.js index 5ef83e610f..c5b89e1db0 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -7,7 +7,7 @@ var _ = require('lodash'), defaultAssets = require('./config/assets/default'), testAssets = require('./config/assets/test'), testConfig = require('./config/env/test'), - karmaReporters = ['progress']; + karmaReporters = ['mocha']; // Karma configuration module.exports = function (karmaConfig) { diff --git a/package.json b/package.json index bdd0352740..a0f9c681ed 100644 --- a/package.json +++ b/package.json @@ -106,6 +106,7 @@ "karma-chrome-launcher": "~2.0.0", "karma-coverage": "~1.1.1", "karma-jasmine": "~1.1.0", + "karma-mocha-reporter": "~2.2.3", "karma-ng-html2js-preprocessor": "~1.0.0", "lcov-result-merger": "~1.2.0", "run-sequence": "~1.2.2",