Skip to content

Unexpected behavior after changing the quantity on one line of the shipping address and clicking the Back button in the browser #32650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AssertStorefrontMultishippingAddressAndItemActionGroup">
<annotations>
<description>Verify item information on Ship to Multiple Addresses page.</description>
</annotations>
<arguments>
<argument name="sequenceNumber" type="string" defaultValue="1"/>
<argument name="productName" type="string" defaultValue="{{SimpleProduct.name}}"/>
<argument name="quantity" type="string" defaultValue="1"/>
<argument name="firstName" type="string" defaultValue="{{US_Address_CA.firstname}}"/>
<argument name="lastName" type="string" defaultValue="{{US_Address_CA.lastname}}"/>
<argument name="city" type="string" defaultValue="{{US_Address_CA.city}}"/>
<argument name="state" type="string" defaultValue="{{US_Address_CA.state}}"/>
<argument name="postCode" type="string" defaultValue="{{US_Address_CA.postcode}}"/>
<argument name="country" type="string" defaultValue="{{US_Address_CA.country}}"/>
<argument name="addressStreetLine1" type="string" defaultValue="{{US_Address_CA.street[0]}}"/>
<argument name="addressStreetLine2" type="string" defaultValue="{{US_Address_CA.street[1]}}"/>
</arguments>

<seeElement selector="{{MultishippingSection.productLink(productName, sequenceNumber)}}" stepKey="verifyProductName"/>
<seeInField selector="{{MultishippingSection.productQty(sequenceNumber)}}" userInput="{{quantity}}" stepKey="verifyQuantity"/>
<seeInField selector="{{MultishippingSection.shippingAddressSelector(sequenceNumber)}}" userInput="{{firstName}} {{lastName}}, {{addressStreetLine1}} {{addressStreetLine2}}, {{city}}, {{state}} {{postCode}}, {{country}}" stepKey="verifyAddress"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontChangeMultishippingItemQtyActionGroup">
<annotations>
<description>Change multishipping item quantity on Ship to Multiple Addresses page.</description>
</annotations>
<arguments>
<argument name="sequenceNumber" type="string" defaultValue="1"/>
<argument name="quantity" type="string" defaultValue="1"/>
</arguments>

<fillField selector="{{MultishippingSection.productQty(sequenceNumber)}}" userInput="{{quantity}}" stepKey="setQuantity"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<element name="shippingAddressSelector" type="select" selector="//tr[position()={{addressPosition}}]//td[@data-th='Send To']//select" parameterized="true"/>
<element name="shippingAddressOptions" type="select" selector="#multiship-addresses-table tbody tr:nth-of-type({{addressPosition}}) .col.address select option:nth-of-type({{optionIndex}})" parameterized="true"/>
<element name="selectShippingAddress" type="select" selector="(//table[@id='multiship-addresses-table'] //div[@class='field address'] //select)[{{sequenceNumber}}]" parameterized="true"/>
<element name="productQty" type="input" selector="#multiship-addresses-table tbody tr:nth-of-type({{sequenceNumber}}) .col.qty input" parameterized="true"/>
<element name="productLink" type="button" selector="(//form[@id='checkout_multishipping_form']//a[contains(text(),'{{productName}}')])[{{sequenceNumber}}]" parameterized="true"/>
<element name="removeItemButton" type="button" selector="//a[contains(@title, 'Remove Item')][{{var}}]" parameterized="true"/>
<element name="back" type="button" selector=".action.back"/>
</section>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="StorefrontMultishippingUpdateProductQtyTest">
<annotations>
<features value="Multishipping"/>
<stories value="Checkout with multiple addresses."/>
<title value="Update Product Quantity on Ship to Multiple Addresses Page."/>
<description value="Verify customer will see correct product quantity after return to Ship to Multiple Addresses from Shipping information page."/>
<severity value="MAJOR"/>
<testCaseId value="MC-41697"/>
<useCaseId value="MC-40021"/>
<group value="multishipping"/>
</annotations>

<before>
<createData entity="SimpleProduct2" stepKey="product"/>
<createData entity="Simple_US_CA_Customer" stepKey="customer"/>
</before>
<after>
<deleteData createDataKey="product" stepKey="deleteProduct"/>
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
<deleteData createDataKey="customer" stepKey="deleteCustomer"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
</after>

<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
<argument name="Customer" value="$customer$"/>
</actionGroup>
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="navigateToSimpleProductDetailsPage">
<argument name="product" value="$product$"/>
</actionGroup>
<actionGroup ref="StorefrontAddProductToCartWithQtyActionGroup" stepKey="addSimpleProductToCart">
<argument name="productQty" value="2"/>
</actionGroup>
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/>
<actionGroup ref="StorefrontCheckoutWithMultipleAddressesActionGroup" stepKey="checkoutWithMultipleAddresses"/>
<actionGroup ref="StorefrontChangeMultishippingItemQtyActionGroup" stepKey="setProductQuantity">
<argument name="quantity" value="2"/>
</actionGroup>
<actionGroup ref="StorefrontNavigateToShippingInformationPageActionGroup" stepKey="navigateToShippingInformation"/>
<moveBack stepKey="moveBackToShippingInformation"/>
<actionGroup ref="AssertStorefrontMultishippingAddressAndItemActionGroup" stepKey="verifyLine1Qty">
<argument name="productName" value="$product.name$"/>
</actionGroup>
<actionGroup ref="AssertStorefrontMultishippingAddressAndItemActionGroup" stepKey="verifyLine2Qty">
<argument name="sequenceNumber" value="2"/>
<argument name="productName" value="$product.name$"/>
</actionGroup>
<actionGroup ref="AssertStorefrontMultishippingAddressAndItemActionGroup" stepKey="verifyLine3Qty">
<argument name="sequenceNumber" value="3"/>
<argument name="productName" value="$product.name$"/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
size="2"
min="0"
class="input-text qty"
data-validate="{number: true, required:true, 'validate-greater-than-zero':true}"/>
data-validate="{number: true, required:true, 'validate-greater-than-zero':true}"
autocomplete="off"
/>
</div>
</div>
</td>
Expand Down