diff --git a/src/js/services/onGoingProcess.js b/src/js/services/onGoingProcess.js index ddaa915c2..5583d739d 100644 --- a/src/js/services/onGoingProcess.js +++ b/src/js/services/onGoingProcess.js @@ -44,6 +44,7 @@ angular.module('copayApp.services').factory('ongoingProcess', function($log, $ti root.set = function(processName, isOn) { +console.log('[onGoingProcess.js.46]', processName); //TODO $log.debug('ongoingProcess', processName, isOn); root[processName] = isOn; ongoingProcess[processName] = isOn; @@ -58,13 +59,21 @@ angular.module('copayApp.services').factory('ongoingProcess', function($log, $ti root.onGoingProcessName = name; var showName = processNames[name] || gettextCatalog.getString(name); + +console.log('[onGoingProcess.js.62]'); //TODO if (root.onGoingProcessName) { + +console.log('[onGoingProcess.js.65]'); //TODO if (isCordova) { window.plugins.spinnerDialog.show(null, showName, true); } else { + +console.log('[onGoingProcess.js.70]'); //TODO $ionicLoading.show({ template: showName, }); + +console.log('[onGoingProcess.js.75]'); //TODO } } else { if (isCordova) { diff --git a/test/controllers/create.test.js b/test/controllers/create.test.js index 8010fde85..bc908cf87 100644 --- a/test/controllers/create.test.js +++ b/test/controllers/create.test.js @@ -117,6 +117,7 @@ describe('createController', function() { it('should create a 1-1 wallet from mnemonic', function(done) { var fakeForm = {}; +console.log('[create.test.js.119]'); //TODO // FROM DATA scope.seedSource = { id: 'set' @@ -131,8 +132,12 @@ describe('createController', function() { scope._walletPrivKey = 'Kz4CFSTgLzoYfMkt97BTBotUbZYXjMts6Ej9HbVfCf5oLmun1BXy'; ctrl.setSeedSource(); + +console.log('[create.test.js.135]'); //TODO ctrl.create(fakeForm); +console.log('[create.test.js.138]'); //TODO + should.not.exist(ctrl.error); mocks.go.walletHome.calledOnce.should.equal(true); // diff --git a/test/controllers/disclaimer.test.js b/test/controllers/disclaimer.test.js index 52452b026..c508d35a8 100644 --- a/test/controllers/disclaimer.test.js +++ b/test/controllers/disclaimer.test.js @@ -74,7 +74,8 @@ describe('disclaimerController', function() { mnemonic: 'tunnel fork scare industry noble snow tank bullet over gesture nuclear next', }); setTimeout(function() { - ctrl.creatingProfile.should.equal(false); + mocks.ongoingProcess.set.getCall(1).args[0].should.equal('creatingWallet'); + mocks.ongoingProcess.set.getCall(1).args[1].should.equal(false); done(); }, 100); }); diff --git a/test/helpers.js b/test/helpers.js index 001a164d3..ab3effb29 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -42,6 +42,10 @@ mocks.$timeout = function(cb) { }; mocks.modal = function() {}; +mocks.ongoingProcess = { + set: sinon.stub(), + clear: sinon.stub(), +}; mocks.setProfile = function(profile) {}; @@ -192,6 +196,7 @@ mocks.init = function(fixtures, controllerName, opts, done) { ctrl = $controller(controllerName, { $scope: scope, $modal: mocks.modal, + ongoingProcess: mocks.ongoingProcess, notification: mocks.notification, configService: _configService_, profileService: _profileService_,