Skip to content

Commit 5b1fa47

Browse files
authored
Merge pull request #6462 from magento-arcticfoxes/534_incorrect_shipping_address_on_purchase_order_final_checkout_page
534 incorrect shipping address on purchase order final checkout page
2 parents 59c6176 + 6b40802 commit 5b1fa47

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed
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>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="StorefrontCheckoutShippingNewAddressModalSection">
12+
<element name="firstName" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='firstname']"/>
13+
<element name="lastName" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='lastname']"/>
14+
<element name="company" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='company']"/>
15+
<element name="street" type="input" parameterized="true" selector="//div[@id='shipping-new-address-form']//input[@name='street[{{index}}]']"/>
16+
<element name="city" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='city']"/>
17+
<element name="region" type="select" selector="//div[@id='shipping-new-address-form']//select[@name='region_id']"/>
18+
<element name="postcode" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='postcode']"/>
19+
<element name="country" type="select" selector="//div[@id='shipping-new-address-form']//select[@name='country_id']"/>
20+
<element name="telephone" type="input" selector="//div[@id='shipping-new-address-form']//input[@name='telephone']"/>
21+
<element name="saveAddress" type="button" selector="//div[@id='shipping-new-address-form']//button[contains(@class, 'action-save-address')]"/>
22+
<element name="cancelChangeAddress" type="button" selector="//div[@id='shipping-new-address-form']//button[contains(@class, 'action-hide-popup')]"/>
23+
</section>
24+
</sections>

0 commit comments

Comments
 (0)