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 39
39
</after >
40
40
<!-- Open product and add product to cart-->
41
41
<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]$" />
43
43
</actionGroup >
44
44
<actionGroup ref =" StorefrontAddProductToCartActionGroup" stepKey =" addProductToCart" >
45
- <argument name =" product" value =" $$ createProduct$ $" />
45
+ <argument name =" product" value =" $createProduct$" />
46
46
<argument name =" productCount" value =" 1" />
47
47
</actionGroup >
48
48
<!-- Go to cart -->
59
59
<actualResult type =" const" >$grabCountry</actualResult >
60
60
<expectedResult type =" string" >{{DE_Address_Berlin_Not_Default_Address.country_id}}</expectedResult >
61
61
</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 >
62
74
</test >
63
75
</tests >
Original file line number Diff line number Diff line change @@ -121,7 +121,9 @@ define([
121
121
) ;
122
122
}
123
123
checkoutProvider . on ( 'shippingAddress' , function ( shippingAddrsData ) {
124
- checkoutData . setShippingAddressFromData ( shippingAddrsData ) ;
124
+ if ( shippingAddrsData . street && ! _ . isEmpty ( shippingAddrsData . street [ 0 ] ) ) {
125
+ checkoutData . setShippingAddressFromData ( shippingAddrsData ) ;
126
+ }
125
127
} ) ;
126
128
shippingRatesValidator . initFields ( fieldsetName ) ;
127
129
} ) ;
You can’t perform that action at this time.
0 commit comments