diff --git a/.travis.yml b/.travis.yml index 5a0bbe949..15feb56fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,16 @@ language: node_js node_js: - '0.10' -before_install: npm install -g grunt-cli -install: npm install -before_script: grunt shell +before_install: + - npm install -g bower + - npm install -g grunt-cli + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start +install: + - npm install + - bower install +before_script: + - grunt shell --target=dev notifications: hipchat: rooms: diff --git a/bower.json b/bower.json index b59d171fd..ce49fc3c1 100644 --- a/bower.json +++ b/bower.json @@ -23,5 +23,8 @@ "mousetrap": "1.4.6", "zeroclipboard": "~2.1.6", "ng-idle": "*" + }, + "resolutions": { + "angular": "=1.2.19" } } diff --git a/js/services/notifications.js b/js/services/notifications.js index 908ae74b7..ba8cb49f9 100644 --- a/js/services/notifications.js +++ b/js/services/notifications.js @@ -200,8 +200,11 @@ factory('notification', ['$timeout', }, settings[type].duration); } - // Movile notification - window.navigator.vibrate([200,100,200]); + // Mobile notification + if (window && window.navigator && window.navigator.vibrate) { + window.navigator.vibrate([200,100,200]); + }; + if (document.hidden && (type == 'info' || type == 'funds')) { new window.Notification(title, {body: content, icon:'img/notification.png'}); } diff --git a/package.json b/package.json index bdb0562f2..449f59d17 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "setup-shell": "node shell/scripts/download-atom-shell.js", "start": "node server.js", "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter spec test", - "test": "node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", + "test": "node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && ./node_modules/karma/bin/karma start --browsers Firefox --single-run", "dist": "node shell/scripts/dist.js", "sign": "gpg -u 1112CFA1 --output browser-extensions/firefox/copay.xpi.sig --detach-sig browser-extensions/firefox/copay.xpi; gpg -u 1112CFA1 --output browser-extensions/chrome/copay-chrome-extension.zip.sig --detach-sig browser-extensions/chrome/copay-chrome-extension.zip", "verify": "gpg --verify browser-extensions/firefox/copay.xpi.sig browser-extensions/firefox/copay.xpi; gpg --verify browser-extensions/chrome/copay-chrome-extension.zip.sig browser-extensions/chrome/copay-chrome-extension.zip" @@ -60,6 +60,7 @@ "istanbul": "0.2.10", "karma": "0.12.9", "karma-chrome-launcher": "0.1.3", + "karma-firefox-launcher": "~0.1", "karma-mocha": "0.1.3", "karma-phantomjs-launcher": "^0.1.4", "mocha": "1.18.2",