File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
dev/tests/js/jasmine/tests/app/code/Magento/Multishipping/frontend/js Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,11 @@ define([
6868 var addNewAddressBtn ,
6969 addressflag ,
7070 canContinueBtn ,
71- canContinueFlag ;
71+ canContinueFlag ,
72+ originalGetJSON ;
7273
7374 beforeEach ( function ( ) {
75+ originalGetJSON = $ . getJSON ;
7476 addNewAddressBtn = $ ( '<button type="button" data-role="add-new-address"/>' ) ;
7577 addressflag = $ ( '<input type="hidden" value="0" id="add_new_address_flag"/>' ) ;
7678 canContinueBtn = $ ( '<button type="submit" data-role="can-continue" data-flag="1"/>' ) ;
@@ -79,13 +81,20 @@ define([
7981 . append ( addressflag )
8082 . append ( canContinueBtn )
8183 . append ( canContinueFlag ) ;
84+
85+ $ . getJSON = jasmine . createSpy ( ) . and . callFake ( function ( ) {
86+ var deferred = $ . Deferred ( ) ;
87+
88+ return deferred . promise ( ) ;
89+ } ) ;
8290 } ) ;
8391
8492 afterEach ( function ( ) {
8593 addNewAddressBtn . remove ( ) ;
8694 addressflag . remove ( ) ;
8795 canContinueBtn . remove ( ) ;
8896 canContinueFlag . remove ( ) ;
97+ $ . getJSON = originalGetJSON ;
8998 } ) ;
9099
91100 it ( 'Check add new address event' , function ( ) {
You can’t perform that action at this time.
0 commit comments