@@ -7,6 +7,7 @@ import Logger from 'browser/services/logger';
77import Platform from 'browser/services/platform' ;
88import ElectronMock from '../../../mock/electron' ;
99import ConfirmController from 'browser/pages/confirm/controller' ;
10+
1011import fs from 'fs' ;
1112
1213require ( '../../../angular-test-helper' ) ;
@@ -45,9 +46,7 @@ describe('ConfirmController', function() {
4546 sandbox . stub ( fs , 'existsSync' ) . returns ( true ) ;
4647 sandbox . spy ( _$state_ , 'go' ) ;
4748 installerDataSvc . setup ( ) ;
48- for ( var installer of installerDataSvc . allInstallables ( ) . values ( ) ) {
49- sandbox . stub ( installer , 'detectExistingInstall' ) . resolves ( ) ;
50- }
49+
5150 confirmController = $controller ( 'ConfirmController' , {
5251 $scope,
5352 $state : _$state_ ,
@@ -56,6 +55,9 @@ describe('ConfirmController', function() {
5655 electron
5756 } ) ;
5857 sandbox . spy ( confirmController , 'setIsDisabled' ) ;
58+ for ( let installer of installerDataSvc . allInstallables ( ) . values ( ) ) {
59+ sandbox . stub ( installer , 'detectExistingInstall' ) . resolves ( ) ;
60+ }
5961 } ;
6062
6163 describe ( 'initial state' , function ( ) {
@@ -157,7 +159,7 @@ describe('ConfirmController', function() {
157159 } ) ;
158160 beforeEach ( inject ( context ) ) ;
159161 it ( 'should deselect openjdk if jbosseap and devstudio are not selected' , function ( ) {
160- debugger ;
162+
161163 return confirmController . initPage ( ) . then ( function ( ) {
162164 expect ( confirmController . sc . checkboxModel . jdk . selectedOption ) . equals ( 'install' ) ;
163165 $watch . args . forEach ( function ( el ) {
@@ -211,7 +213,7 @@ describe('ConfirmController', function() {
211213 $watch . args . forEach ( function ( el ) {
212214 if ( el [ 1 ] . name == 'watchComponent'
213215 && el [ 0 ] == 'checkboxModel.devstudio.selectedOption' ) {
214- el [ 1 ] ( 'install' , 'detected' ) ;
216+ el [ 1 ] ( 'install' , 'detected' ) ;
215217 }
216218 } ) ;
217219 expect ( confirmController . sc . checkboxModel . jdk . selectedOption ) . equals ( 'install' ) ;
0 commit comments