Skip to content

Commit fd611a7

Browse files
committed
MAGETWO-70996: [GitHub] Customer Address "default billing address" Attribute Not Used in Checkout #8777
# Conflicts: # app/code/Magento/Braintree/Test/Mftf/Test/BraintreeCreditCardOnCheckoutTest.xml # app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml # app/code/Magento/Checkout/Test/Mftf/Test/DefaultBillingAddressShouldBeCheckedOnPaymentPageTest.xml # app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml # app/code/Magento/Checkout/view/frontend/web/js/model/checkout-data-resolver.js
1 parent 0b7455f commit fd611a7

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

app/code/Magento/Braintree/Test/Mftf/Test/BraintreeCreditCardOnCheckoutTest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
<waitForPageLoad stepKey="waitForPageLoad10"/>
8888
<click selector="{{BraintreeConfigurationPaymentSection.paymentMethod}}" stepKey="SelectBraintreePaymentMethod1"/>
8989
<waitForPageLoad stepKey="waitForPageLoad11"/>
90-
<waitForPageLoad stepKey="waitForPageLoad12"/>
9190
<!--Place order-->
9291
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="PlaceOrder1"/>
9392
<waitForPageLoad stepKey="waitForPageLoad13"/>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
<element name="addressBook" type="button" selector="//a[text()='Address Book']"/>
5555
<element name="noQuotes" type="text" selector=".no-quotes-block"/>
5656
<element name="paymentMethodByName" type="text" selector="//*[@id='checkout-payment-method-load']//*[contains(@class, 'payment-group')]//label[normalize-space(.)='{{var1}}']" parameterized="true"/>
57-
<element name="billingAddressSelect" type="select" selector="select[name='billing_address_id']"/>
57+
<element name="billingAddressSelect" type="select" selector=".payment-method._active select[name='billing_address_id']"/>
58+
<element name="billingAddressSelectShared" type="select" selector=".checkout-billing-address select[name='billing_address_id']"/>
5859
</section>
5960
</sections>

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,7 @@
256256

257257
<!-- Fill UK Address and verify that payment available and checkout successful -->
258258
<uncheckOption selector="{{StorefrontCheckoutPaymentMethodSection.billingAddressSameAsShippingShared}}" stepKey="uncheckBillingAddressSameAsShippingCheckCheckBox"/>
259-
<click selector="{{CheckoutShippingSection.addressDropdown}}" stepKey="clickOnAddressDropDown"/>
260-
<selectOption selector="{{CheckoutPaymentSection.billingAddressSelect}}" userInput="New Address" stepKey="clickOnNewAddress"/>
259+
<selectOption selector="{{CheckoutPaymentSection.billingAddressSelectShared}}" userInput="New Address" stepKey="clickOnNewAddress"/>
261260
<waitForPageLoad stepKey="waitNewAddressBillingForm"/>
262261
<actionGroup ref="LoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="changeAddress">
263262
<argument name="Address" value="updateCustomerUKAddress"/>

dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/FillBillingInformationStep.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ public function run()
170170
*/
171171
private function getDefaultBillingAddress()
172172
{
173-
$addresses = $this->customer->getDataFieldConfig('address')['source']->getAddresses();
173+
$addresses = $this->customer->hasData('address')
174+
? $this->customer->getDataFieldConfig('address')['source']->getAddress()
175+
: [];
174176
$defaultAddress = null;
175177
foreach ($addresses as $address) {
176178
if ($address->getDefaultBilling() === 'Yes') {

0 commit comments

Comments
 (0)