Skip to content

Commit 52783f8

Browse files
committed
Merge branch '459_verify_custom_customer_address_attribute_shows_at_checkout' into 2.4-develop-pr
2 parents 89fc890 + 917e413 commit 52783f8

7 files changed

+78
-10
lines changed

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckSelectedShippingAddressInCheckoutActionGroup.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@
1616
<argument name="customerVar"/>
1717
<argument name="customerAddressVar"/>
1818
</arguments>
19-
2019
<waitForElement selector="{{CheckoutShippingSection.shippingTab}}" time="30" stepKey="waitForShippingSectionLoaded"/>
21-
<see stepKey="VerifyFirstNameInSelectedAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerVar.firstname}}"/>
22-
<see stepKey="VerifyLastNameInSelectedAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerVar.lastname}}"/>
23-
<see stepKey="VerifyStreetInSelectedAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.street[0]}}"/>
24-
<see stepKey="VerifyCityInSelectedAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.city}}"/>
25-
<see stepKey="VerifyZipInSelectedAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.postcode}}"/>
26-
<see stepKey="VerifyPhoneInSelectedAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.telephone}}"/>
20+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerVar.firstname}}" stepKey="VerifyFirstNameInSelectedAddress"/>
21+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerVar.lastname}}" stepKey="VerifyLastNameInSelectedAddress"/>
22+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.street[0]}}" stepKey="VerifyStreetInSelectedAddress"/>
23+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.city}}" stepKey="VerifyCityInSelectedAddress"/>
24+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.postcode}}" stepKey="VerifyZipInSelectedAddress"/>
25+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.telephone}}" stepKey="VerifyPhoneInSelectedAddress"/>
2726
</actionGroup>
2827
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontCheckSelectedBillingAddressInCheckoutWithSearchActionGroup">
12+
<annotations>
13+
<description>Validates that the provided Customer and Address details are listed on the Storefront Checkout page under the 'Billing Address' section when multiple Addresses are present for a Customer.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="customerVar"/>
17+
<argument name="customerAddressVar"/>
18+
</arguments>
19+
<waitForElement selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" time="30" stepKey="waitForBillingSectionLoaded"/>
20+
<see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerVar.firstname}}" stepKey="verifyFirstNameInSelectedAddress"/>
21+
<see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerVar.lastname}}" stepKey="verifyLastNameInSelectedAddress"/>
22+
<see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerAddressVar.street[0]}}" stepKey="verifyStreetInSelectedAddress"/>
23+
<see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerAddressVar.city}}" stepKey="verifyCityInSelectedAddress"/>
24+
<see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerAddressVar.postcode}}" stepKey="verifyZipInSelectedAddress"/>
25+
<see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerAddressVar.telephone}}" stepKey="verifyPhoneInSelectedAddress"/>
26+
</actionGroup>
27+
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontCheckoutClickSaveAddressButtonActionGroup.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
<annotations>
1313
<description>Click Save Address button on checkout.</description>
1414
</annotations>
15-
16-
<click selector="{{CheckoutShippingSection.saveAddress}}" stepKey="saveAddress"/>
15+
<waitForElementVisible selector="{{CheckoutShippingSection.saveAddress}}" stepKey="waitForSaveButton"/>
16+
<click selector="{{CheckoutShippingSection.saveAddress}}" stepKey="clickSaveButton"/>
1717
<waitForPageLoad stepKey="waitForAddressSaved"/>
18+
<waitForElementNotVisible selector="{{CheckoutShippingSection.newAddressForm}}" stepKey="waitForNewAddressFormGone"/>
1819
</actionGroup>
1920
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontClickAddNewAddressButtonFromCheckoutShippingActionGroup">
12+
<annotations>
13+
<description>Clicks the New Address button on the storefront Checkout Shipping page</description>
14+
</annotations>
15+
<waitForElementVisible selector="{{CheckoutShippingSection.newAddressButton}}" stepKey="waitForAddNewAddressButton"/>
16+
<click selector="{{CheckoutShippingSection.newAddressButton}}" stepKey="clickAddNewAddressButton"/>
17+
<waitForPageLoad stepKey="waitForPageToLoad"/>
18+
<waitForElementVisible selector="{{CheckoutShippingSection.newAddressForm}}" stepKey="waitForNewAddressForm"/>
19+
</actionGroup>
20+
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<element name="editAddressButton" type="button" selector=".action-edit-address" timeout="30"/>
1616
<element name="addressDropdown" type="select" selector="[name=billing_address_id]"/>
1717
<element name="newAddressButton" type="button" selector=".action-show-popup" timeout="30"/>
18+
<element name="newAddressForm" type="text" selector="#co-shipping-form"/>
1819
<element name="email" type="input" selector="input[id*=customer-email]"/>
1920
<element name="password" type="input" selector="#customer-password"/>
2021
<element name="firstName" type="input" selector="input[name=firstname]"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminOpenAddressesTabFromCustomerEditPageActionGroup">
12+
<annotations>
13+
<description>Open the Addresses tab from a Customer's edit page in admin</description>
14+
</annotations>
15+
<waitForElementVisible selector="{{AdminCustomerInformationSection.addresses}}" stepKey="waitForAddressesTab"/>
16+
<click selector="{{AdminCustomerInformationSection.addresses}}" stepKey="clickAddressesTab"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
<waitForElementVisible selector="{{AdminCustomerAddressesGridSection.customerAddressGrid}}" stepKey="waitForCustomerAddressesGrid"/>
19+
</actionGroup>
20+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/ActionGroup/SelectDropdownCustomerAddressAttributeValueActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<argument name="customerAddressAttribute"/>
1717
<argument name="optionValue" type="string"/>
1818
</arguments>
19-
19+
<waitForElementVisible selector="{{AdminEditCustomerAddressesSection.dropDownAttribute(customerAddressAttribute.code)}}" stepKey="waitForSelectOption"/>
2020
<selectOption selector="{{AdminEditCustomerAddressesSection.dropDownAttribute(customerAddressAttribute.code)}}" userInput="{{optionValue}}" stepKey="selectOptionValue"/>
2121
<click selector="{{AdminEditCustomerAddressesSection.save}}" stepKey="saveAddress"/>
2222
<waitForPageLoad stepKey="waitForAddressSaved"/>

0 commit comments

Comments
 (0)