Skip to content

Commit 1bc941d

Browse files
committed
MAGETWO-73613: My Wishlist - quantity input box issue
- Adding min/max qty checks - Adding js validation - Adding MFTF test
1 parent a55de3c commit 1bc941d

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceItemsSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminInvoiceItemsSection">
1212
<element name="itemQty" type="text" selector=".order-invoice-tables tbody:nth-of-type({{row}}) .col-qty .qty-table" parameterized="true"/>
13-
<element name="itemQtyToInvoice" type="input" selector=".order-invoice-tables tbody:nth-of-type({{row}}) .col-qty-invoice .qty-input" parameterized="true" timeout="30"/>
14-
<element name="updateQty" type="button" selector=".order-invoice-tables tfoot button[data-ui-id='order-items-update-button']"/>
13+
<element name="itemQtyToInvoice" type="input" selector=".order-invoice-tables tbody:nth-of-type({{row}}) .col-qty-invoice .qty-input" parameterized="true"/>
14+
<element name="updateQtyEnabled" type="button" selector="//*[@id='invoice_item_container']//*[@class='action-default scalable update-button']"/>
1515
</section>
1616
</sections>

app/code/Magento/Sales/Test/Mftf/Test/AdminAbleToShipPartiallyInvoicedItemsTest.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,13 @@
6969
<scrollTo selector="{{AdminInvoiceItemsSection.itemQtyToInvoice('1')}}" stepKey="scrollToItemsInvoiced"/>
7070
<!--Change invoiced items count-->
7171
<fillField selector="{{AdminInvoiceItemsSection.itemQtyToInvoice('1')}}" userInput="5" stepKey="invoiceHalfTheItems"/>
72-
<click selector="{{AdminInvoiceItemsSection.updateQty}}" stepKey="updateQtyToBeInvoiced"/>
72+
<waitForLoadingMaskToDisappear stepKey="waitForUpdateQtyButton"/>
73+
<click selector="{{AdminInvoiceItemsSection.updateQtyEnabled}}" stepKey="updateQtyToBeInvoiced"/>
7374
<waitForLoadingMaskToDisappear stepKey="waitForQtyToUpdate"/>
7475
<waitForElementVisible selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="waitforSubmitInvoiceBtn"/>
7576
<!--Submit Invoice-->
7677
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="submitInvoice"/>
77-
<waitForLoadingMaskToDisappear stepKey="waitForInvoiceToSubmit"/>
78+
<waitForPageLoad stepKey="waitForInvoiceToSubmit1"/>
7879
<!--Invoice created successfully-->
7980
<see selector="{{AdminMessagesSection.success}}" userInput="The invoice has been created." stepKey="seeInvoiceSuccessMessage"/>
8081
<scrollTo selector="{{AdminOrderItemsOrderedSection.itemStatus('1')}}" stepKey="scrollToOrderItems"/>
@@ -135,7 +136,7 @@
135136
<see selector="{{AdminInvoiceItemsSection.itemQty('1')}}" userInput="Refunded 5" stepKey="seeQtyOfItemsRefunded"/>
136137
<!--Submit Invoice-->
137138
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="submitInvoice2" />
138-
<waitForLoadingMaskToDisappear stepKey="waitForInvoiceToSubmit1"/>
139+
<waitForPageLoad stepKey="waitForInvoiceToSubmit2"/>
139140
<!--Invoice created successfully for the rest of the ordered items-->
140141
<see selector="{{AdminMessagesSection.success}}" userInput="The invoice has been created." stepKey="seeInvoiceSuccessMessage2"/>
141142
<scrollTo selector="{{AdminOrderItemsOrderedSection.itemStatus('1')}}" stepKey="scrollToOrderItems3"/>

app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerWishlistActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,6 @@
102102
<click selector="{{StorefrontCustomerWishlistProductSection.productUpdateWishList}}" stepKey="clickAddToWishlistButton"/>
103103
<moveMouseOver selector="{{StorefrontCustomerWishlistProductSection.productInfoByName(product.name)}}" stepKey="wishlistMoveMouseOverProduct" />
104104
<!--Check error message-->
105-
<see selector="{{StorefrontCustomerWishlistProductSection.productQtyError}}" userInput="The maximum you may purchase is {{errorNum}}." stepKey="checkQtyError"/>
105+
<see selector="{{StorefrontCustomerWishlistProductSection.productQtyError(product.name)}}" userInput="The maximum you may purchase is {{errorNum}}." stepKey="checkQtyError"/>
106106
</actionGroup>
107107
</actionGroups>

app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistProductSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
<element name="productEditButtonByName" type="button" selector="//li[.//a[contains(text(), '{{var1}}')]]//span[contains(text(), 'Edit')]" parameterized="true"/>
2121
<element name="productUpdateWishList" type="button" selector=".column.main .actions-toolbar .action.update" timeout="30"/>
2222
<element name="productAddAllToCart" type="button" selector=".column.main .actions-toolbar .action.tocart" timeout="30"/>
23-
<element name="productQtyError" type="text" selector=".box-tocart div.mage-error" timeout="30"/>
23+
<element name="productQtyError" type="text" selector="//li[.//a[contains(text(), '{{var1}}')]]//div[@class='mage-error']" parameterized="true" timeout="30"/>
2424
</section>
2525
</sections>

0 commit comments

Comments
 (0)