File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
app/code/Magento/Checkout
view/frontend/web/js/view Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 3939 </after >
4040 <!-- Open product and add product to cart-->
4141 <actionGroup ref =" OpenStoreFrontProductPageActionGroup" stepKey =" openProductPage" >
42- <argument name =" productUrlKey" value =" $$ createProduct.custom_attributes[url_key]$ $" />
42+ <argument name =" productUrlKey" value =" $createProduct.custom_attributes[url_key]$" />
4343 </actionGroup >
4444 <actionGroup ref =" StorefrontAddProductToCartActionGroup" stepKey =" addProductToCart" >
45- <argument name =" product" value =" $$ createProduct$ $" />
45+ <argument name =" product" value =" $createProduct$" />
4646 <argument name =" productCount" value =" 1" />
4747 </actionGroup >
4848 <!-- Go to cart -->
5959 <actualResult type =" const" >$grabCountry</actualResult >
6060 <expectedResult type =" string" >{{DE_Address_Berlin_Not_Default_Address.country_id}}</expectedResult >
6161 </assertEquals >
62+ <!-- Go to cart -->
63+ <actionGroup ref =" StorefrontCartPageOpenActionGroup" stepKey =" returnToCartPage" />
64+ <!-- Switch to default store view -->
65+ <actionGroup ref =" StorefrontSwitchDefaultStoreViewActionGroup" stepKey =" switchToDefaultStoreView" />
66+ <!-- Go to checkout page -->
67+ <actionGroup ref =" OpenStoreFrontCheckoutShippingPageActionGroup" stepKey =" proceedToCheckoutWithDefaultStore" />
68+ <!-- Grab country code from checkout page and assert value with default country for default store view -->
69+ <grabValueFrom selector =" {{CheckoutShippingSection.country}}" stepKey =" grabDefaultStoreCountry" />
70+ <assertEquals stepKey =" assertDefaultCountryValue" >
71+ <actualResult type =" const" >$grabDefaultStoreCountry</actualResult >
72+ <expectedResult type =" string" >{{US_Address_TX.country_id}}</expectedResult >
73+ </assertEquals >
6274 </test >
6375</tests >
Original file line number Diff line number Diff line change @@ -121,7 +121,9 @@ define([
121121 ) ;
122122 }
123123 checkoutProvider . on ( 'shippingAddress' , function ( shippingAddrsData ) {
124- checkoutData . setShippingAddressFromData ( shippingAddrsData ) ;
124+ if ( shippingAddrsData . street && ! _ . isEmpty ( shippingAddrsData . street [ 0 ] ) ) {
125+ checkoutData . setShippingAddressFromData ( shippingAddrsData ) ;
126+ }
125127 } ) ;
126128 shippingRatesValidator . initFields ( fieldsetName ) ;
127129 } ) ;
You can’t perform that action at this time.
0 commit comments