File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
dev/tests/js/jasmine/tests/app/code/Magento/Bundle/base/js Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ define([
33
33
htmlContainer . priceBundle ( ) ;
34
34
35
35
expect ( $ . mage . priceBundle . prototype . _updatePriceBox ) . toEqual ( jasmine . any ( Function ) ) ;
36
- expect ( $ . mage . priceBundle . prototype . _updatePriceBox ) . toHaveBeenCalled ( ) ;
37
36
expect ( $ . mage . priceBundle . prototype . _updatePriceBox ) . toHaveBeenCalledTimes ( 1 ) ;
38
37
} ) ;
39
38
@@ -45,6 +44,24 @@ define([
45
44
expect ( $ . mage . priceBundle . prototype . _updatePriceBox ) . toHaveBeenCalledTimes ( 2 ) ;
46
45
} ) ;
47
46
47
+ it ( 'Check _applyOptionNodeFix method doesn\'t call after priceBox initialization.' , function ( ) {
48
+ var optionConfig = {
49
+ optionConfig : {
50
+ prices : { }
51
+ }
52
+ } ,
53
+ priceConfig = {
54
+ priceConfig : 10
55
+ } ;
56
+
57
+ spyOn ( $ . mage . priceBundle . prototype , '_applyOptionNodeFix' ) . and . callThrough ( ) ;
58
+ htmlContainer . priceBundle ( optionConfig ) ;
59
+ $ ( '.price-box' , htmlContainer ) . priceBox ( priceConfig ) ;
60
+ $ ( '.price-box' , htmlContainer ) . trigger ( 'price-box-initialized' ) ;
61
+ expect ( $ . mage . priceBundle . prototype . _applyOptionNodeFix ) . toEqual ( jasmine . any ( Function ) ) ;
62
+ expect ( $ . mage . priceBundle . prototype . _applyOptionNodeFix ) . toHaveBeenCalledTimes ( 2 ) ;
63
+ } ) ;
64
+
48
65
it ( 'Check _updatePriceBox method call before priceBox was initialized.' , function ( ) {
49
66
spyOn ( $ . mage . priceBundle . prototype , '_updatePriceBox' ) . and . callThrough ( ) ;
50
67
$ ( '.price-box' , htmlContainer ) . priceBox ( ) ;
You can’t perform that action at this time.
0 commit comments