File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
dev/tests/js/jasmine/tests/app/code/Magento/CheckoutAgreements/frontend/js/model Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ define([
1414 'Magento_Checkout/js/action/place-order' : jasmine . createSpy ( 'placeOrderAction' ) ,
1515 'Magento_CheckoutAgreements/js/model/agreements-assigner' : jasmine . createSpy ( 'agreementsAssigner' )
1616 } ,
17+ defaultContext = require . s . contexts . _ ,
1718 mixin ,
1819 placeOrderAction ;
1920
@@ -35,6 +36,11 @@ define([
3536 } ) ;
3637
3738 describe ( 'Magento_Checkout/js/action/place-order' , function ( ) {
39+ it ( 'Magento_CheckoutAgreements/js/model/place-order-mixin is applied' , function ( ) {
40+ var placeOrderMixins = defaultContext . config . config . mixins [ 'Magento_Checkout/js/action/place-order' ] ;
41+ expect ( placeOrderMixins [ 'Magento_CheckoutAgreements/js/model/place-order-mixin' ] ) . toBe ( true ) ;
42+ } ) ;
43+
3844 it ( 'Magento_CheckoutAgreements/js/model/agreements-assigner is called' , function ( ) {
3945 var messageContainer = jasmine . createSpy ( 'messageContainer' ) ,
4046 paymentData = { } ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ define([
1414 'Magento_Checkout/js/action/set-payment-information' : jasmine . createSpy ( 'placeOrderAction' ) ,
1515 'Magento_CheckoutAgreements/js/model/agreements-assigner' : jasmine . createSpy ( 'agreementsAssigner' )
1616 } ,
17+ defaultContext = require . s . contexts . _ ,
1718 mixin ,
1819 placeOrderAction ;
1920
@@ -35,6 +36,13 @@ define([
3536 } ) ;
3637
3738 describe ( 'Magento_Checkout/js/action/set-payment-information' , function ( ) {
39+ it ( 'Magento_CheckoutAgreements/js/model/set-payment-information-mixin is applied' , function ( ) {
40+ var placeOrderMixins = defaultContext
41+ . config . config . mixins [ 'Magento_Checkout/js/action/set-payment-information' ] ;
42+ expect ( placeOrderMixins [ 'Magento_CheckoutAgreements/js/model/set-payment-information-mixin' ] )
43+ . toBe ( true ) ;
44+ } ) ;
45+
3846 it ( 'Magento_CheckoutAgreements/js/model/agreements-assigner is called' , function ( ) {
3947 var messageContainer = jasmine . createSpy ( 'messageContainer' ) ,
4048 paymentData = { } ;
You can’t perform that action at this time.
0 commit comments