Skip to content

Commit 01860b3

Browse files
committed
magento/partners-magento2b2b#534 Incorrect Shipping Address on Purchase Order Final Checkout Page
- Cleaning up changes for StorefrontPlaceOrderFromPurchaseOrderUsingOnlinePaymentMethodTest
1 parent b458a90 commit 01860b3

File tree

3 files changed

+32
-12
lines changed

3 files changed

+32
-12
lines changed

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616
<argument name="address"/>
1717
</arguments>
1818

19-
<selectOption stepKey="selectRegion" selector="{{CheckoutShippingAddressModalSection.region}}" userInput="{{address.state}}" after="fillCityName"/>
20-
<fillField stepKey="fillFirstName" selector="{{CheckoutShippingAddressModalSection.firstName}}" userInput="{{address.firstname}}"/>
21-
<fillField stepKey="fillLastName" selector="{{CheckoutShippingAddressModalSection.lastName}}" userInput="{{address.lastname}}"/>
22-
<fillField stepKey="fillCompany" selector="{{CheckoutShippingAddressModalSection.company}}" userInput="{{address.company}}"/>
23-
<fillField stepKey="fillPhoneNumber" selector="{{CheckoutShippingAddressModalSection.telephone}}" userInput="{{address.telephone}}"/>
24-
<fillField stepKey="fillStreetAddress" selector="{{CheckoutShippingAddressModalSection.street}}" userInput="{{address.street[0]}}"/>
25-
<fillField stepKey="fillCityName" selector="{{CheckoutShippingAddressModalSection.city}}" userInput="{{address.city}}"/>
26-
<selectOption stepKey="selectCounty" selector="{{CheckoutShippingAddressModalSection.country}}" userInput="{{address.country_id}}"/>
27-
<fillField stepKey="fillZip" selector="{{CheckoutShippingAddressModalSection.postcode}}" userInput="{{address.postcode}}"/>
19+
<selectOption stepKey="selectRegion" selector="{{CheckoutShippingSection.region}}" userInput="{{address.state}}" after="fillCityName"/>
2820
</actionGroup>
2921
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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="StorefrontFillNewShippingAddressFormInCheckoutActionGroup">
12+
<annotations>
13+
<description>Fills in the provided Address details in the New Address form on the Storefront Checkout pages. By default, this works for the Shipping Address but this can be used for Billing Addresses as well if you pass in the correct 'section' argument value</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="address"/>
17+
<argument name="section" defaultValue="StorefrontCheckoutShippingNewAddressModalSection"/>
18+
</arguments>
19+
<fillField stepKey="fillFirstName" selector="{{section.firstName}}" userInput="{{address.firstname}}"/>
20+
<fillField stepKey="fillLastName" selector="{{section.lastName}}" userInput="{{address.lastname}}"/>
21+
<fillField stepKey="fillCompany" selector="{{section.company}}" userInput="{{address.company}}"/>
22+
<fillField stepKey="fillStreetAddress" selector="{{section.street('0')}}" userInput="{{address.street[0]}}"/>
23+
<selectOption stepKey="selectCounty" selector="{{section.country}}" userInput="{{address.country_id}}"/>
24+
<selectOption stepKey="selectRegion" selector="{{section.region}}" userInput="{{address.state}}"/>
25+
<fillField stepKey="fillCityName" selector="{{section.city}}" userInput="{{address.city}}"/>
26+
<fillField stepKey="fillZip" selector="{{section.postcode}}" userInput="{{address.postcode}}"/>
27+
<fillField stepKey="fillPhoneNumber" selector="{{section.telephone}}" userInput="{{address.telephone}}"/>
28+
</actionGroup>
29+
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingAddressModalSection.xml renamed to app/code/Magento/Checkout/Test/Mftf/Section/StorefrontCheckoutShippingNewAddressModalSection.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11-
<section name="CheckoutShippingAddressModalSection">
11+
<section name="StorefrontCheckoutShippingNewAddressModalSection">
1212
<element name="firstName" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='firstname']"/>
1313
<element name="lastName" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='lastname']"/>
1414
<element name="company" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='company']"/>
15-
<element name="street" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='street[0]']"/>
16-
<element name="street2" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='street[1]']"/>
15+
<element name="street" type="input" parameterized="true" selector="//div[@id='shipping-new-address-form']//input[@name='street[{{index}}]']"/>
1716
<element name="city" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='city']"/>
1817
<element name="region" type="select" selector="//div[@id='shipping-new-address-form']//select[@name='region_id']"/>
1918
<element name="postcode" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='postcode']"/>

0 commit comments

Comments
 (0)