-
+
+
+
+
+
+
+
+
-
-
Your Wallet Password(doesn't need to be shared) Required
-
-
-
-
Wallet name Optional
-
-
-
-
Your name Optional
-
-
-
-
-
Go back
+
+
+
+
+
+
diff --git a/js/controllers/header.js b/js/controllers/header.js
index 9c76edf88..30eb00d59 100644
--- a/js/controllers/header.js
+++ b/js/controllers/header.js
@@ -20,8 +20,6 @@ angular.module('copay.header').controller('HeaderController',
'icon': 'fi-archive',
'link': '#/backup'
}];
-
- var beep = new Audio('sound/transaction.mp3');
$http.get('https://api.github.com/repos/bitpay/copay/tags').success(function(data){
var toInt = function (s) { return parseInt(s); };
@@ -54,6 +52,7 @@ angular.module('copay.header').controller('HeaderController',
}
}
if (currentAddr) {
+ var beep = new Audio('sound/transaction.mp3');
$notification.funds('Received fund', currentAddr, receivedFund);
beep.play();
}
diff --git a/js/controllers/import.js b/js/controllers/import.js
index 8a3ad9268..c2328e0ae 100644
--- a/js/controllers/import.js
+++ b/js/controllers/import.js
@@ -43,6 +43,7 @@ angular.module('copay.import').controller('ImportController',
if (!backupFile && !backupText) {
$scope.loading = false;
$rootScope.$flashMessage = { message: 'Please, select your backup file or paste the text', type: 'error'};
+ $scope.loading = false;
return;
}
diff --git a/js/controllers/signin.js b/js/controllers/signin.js
index 79d8d1d3b..213e0a4aa 100644
--- a/js/controllers/signin.js
+++ b/js/controllers/signin.js
@@ -12,10 +12,6 @@ angular.module('copay.signin').controller('SigninController',
$scope.selectedWalletId = $scope.wallets.length ? $scope.wallets[0].id : null;
$scope.openPassword = '';
- $scope.create = function(form) {
- $location.path('setup');
- };
-
$scope.open = function(form) {
if (form && form.$invalid) {
$rootScope.$flashMessage = { message: 'Please, enter required fields', type: 'error'};
diff --git a/karma.conf.js b/karma.conf.js
index cfd36e3f8..63e9fb1e0 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -15,37 +15,54 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files: [
- //3rd Party Code
- 'lib/angular/angular.min.js',
- 'lib/angular-route/angular-route.js',
- 'lib/angular-mocks/angular-mocks.js',
- 'lib/bitcore.js',
- 'lib/socket.io.js',
+ //Configs
+ 'config.js',
- //App-specific Code
- 'js/*.js',
- 'js/**/*.js',
+ 'lib/angular/angular.min.js',
+ 'lib/angular-mocks/angular-mocks.js',
+ 'lib/moment/moment.js',
+ 'lib/angular-moment/angular-moment.js',
+ 'lib/qrcode-generator/js/qrcode.js',
+ 'lib/angular-qrcode/qrcode.js',
+ 'lib/angular-route/angular-route.min.js',
+ 'lib/angular-foundation/mm-foundation.min.js',
+ 'lib/angular-foundation/mm-foundation-tpls.min.js',
+ 'lib/peer.js',
+ 'lib/bitcore/browser/bundle.js',
+ 'lib/crypto-js/rollups/sha256.js',
+ 'lib/crypto-js/rollups/pbkdf2.js',
+ 'lib/crypto-js/rollups/aes.js',
+ 'lib/file-saver/FileSaver.js',
+ 'lib/socket.io.js',
+ 'lib/sjcl.js',
+ 'lib/ios-imagefile-megapixel/megapix-image.js',
+ 'lib/qrcode-decoder-js/lib/qrcode-decoder.min.js',
+ 'js/copayBundle.js',
//Test-Specific Code
'lib/chai/chai.js',
'test/lib/chai-should.js',
'test/lib/chai-expect.js',
-
+
//Mocha stuff
'test/mocha.conf.js',
- //Configs
- 'config.js',
-
//test files
- 'test/unit/**/*.js'
+ 'test/unit/**/*.js',
+
+ //App-specific Code
+ 'js/app.js',
+ 'js/routes.js',
+ 'js/directives.js',
+ 'js/filters.js',
+ 'js/services/*.js',
+ 'js/controllers/*.js',
+ 'js/init.js'
],
// list of files to exclude
- exclude: [
- 'js/models/**/*.js',
- ],
+ exclude: [],
// preprocess matching files before serving them to the browser
diff --git a/test/unit/controllers/controllersSpec.js b/test/unit/controllers/controllersSpec.js
index 6554e692d..12502bd8a 100644
--- a/test/unit/controllers/controllersSpec.js
+++ b/test/unit/controllers/controllersSpec.js
@@ -33,4 +33,9 @@ describe("Unit: Testing Controllers", function() {
expect(copayApp.TransactionsController).not.to.equal(null);
});
+ beforeEach(angular.mock.module('copay.walletFactory'));
+ it('should display a link to create a new wallet if no wallets in localStorage', inject(function(walletFactory) {
+ expect(walletFactory.storage.getWalletIds()).to.be.empty;
+ }));
+
});
diff --git a/test/unit/services/servicesSpec.js b/test/unit/services/servicesSpec.js
index 3c2efa884..fd3563eee 100644
--- a/test/unit/services/servicesSpec.js
+++ b/test/unit/services/servicesSpec.js
@@ -17,10 +17,11 @@ describe("Unit: Testing Services", function() {
}));
- beforeEach(angular.mock.module('copay.controllerUtils'));
+ // TODO
+ /*beforeEach(angular.mock.module('copay.controllerUtils'));
it('should contain a controllerUtils service', inject(function(controllerUtils) {
expect(controllerUtils).not.to.equal(null);
}));
-
+*/
});