Skip to content

Commit cfb9481

Browse files
committed
magento/partners-magento2b2b#459: Automate MC-37569 Custom Customer Address Attribute
1 parent 1c08566 commit cfb9481

7 files changed

+21
-37
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>

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,20 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<!-- Check selected Billing address information on Review Section step -->
1211
<actionGroup name="StorefrontCheckSelectedBillingAddressInCheckoutWithSearchActionGroup">
1312
<annotations>
14-
<description value="Verify customer billing address values on storefront checkout."/>
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>
1514
</annotations>
1615
<arguments>
1716
<argument name="customerVar"/>
1817
<argument name="customerAddressVar"/>
1918
</arguments>
2019
<waitForElement selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" time="30" stepKey="waitForBillingSectionLoaded"/>
21-
<see stepKey="VerifyFirstNameInSelectedAddress" selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerVar.firstname}}" />
22-
<see stepKey="VerifyLastNameInSelectedAddress" selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerVar.lastname}}" />
23-
<see stepKey="VerifyStreetInSelectedAddress" selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerAddressVar.street[0]}}" />
24-
<see stepKey="VerifyCityInSelectedAddress" selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerAddressVar.city}}" />
25-
<see stepKey="VerifyZipInSelectedAddress" selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerAddressVar.postcode}}" />
26-
<see stepKey="VerifyPhoneInSelectedAddress" selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{customerAddressVar.telephone}}" />
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"/>
2726
</actionGroup>
2827
</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>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
<annotations>
1313
<description>Clicks the New Address button on the storefront Checkout Shipping page</description>
1414
</annotations>
15-
<click selector="{{CheckoutShippingSection.newAddressButton}}" stepKey="ClickOnAddNewAddressButton"/>
15+
<waitForElementVisible selector="{{CheckoutShippingSection.newAddressButton}}" stepKey="waitForAddNewAddressButton"/>
16+
<click selector="{{CheckoutShippingSection.newAddressButton}}" stepKey="clickAddNewAddressButton"/>
1617
<waitForPageLoad stepKey="waitForPageToLoad"/>
18+
<waitForElementVisible selector="{{CheckoutShippingSection.newAddressForm}}" stepKey="waitForNewAddressForm"/>
1719
</actionGroup>
1820
</actionGroups>

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

Lines changed: 0 additions & 18 deletions
This file was deleted.

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]"/>

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)