Skip to content

Commit b96c338

Browse files
author
Stas Puga
committed
MAGETWO-90370: Automate with MFTF Gift Options
1 parent 166dd61 commit b96c338

File tree

6 files changed

+43
-0
lines changed

6 files changed

+43
-0
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutCartProductSection.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,13 @@
2626
parameterized="true"/>
2727
<element name="RemoveItem" type="button"
2828
selector="//table[@id='shopping-cart-table']//tbody//tr[contains(@class,'item-actions')]//a[contains(@class,'action-delete')]"/>
29+
<element name="giftOption" type="text" selector="//tr[contains(., '{{var1}}')]/following-sibling::*[contains(., '{{var2}}')]" parameterized="true"/>
30+
<element name="giftOptionAll" type="text" selector="//div[contains(@class,'cart-gift-item')][contains(., '{{var1}}')]" parameterized="true"/>
31+
<element name="clickGiftOptionsItem" type="button" selector=".gift-options-cart-item .action-gift"/>
32+
<element name="clickGiftOptionsAll" type="button" selector=".gift-item-block .title span"/>
33+
<element name="visibleSmallImageAll" type="text" selector=".gift-item-block .gift-options-content img"/>
34+
<element name="visibleSmallImageItems" type="text" selector="#shopping-cart-table .gift-options-content img"/>
35+
<element name="giftMessageAll" type="block" selector=".cart-gift-item .gift-message"/>
36+
<element name="giftMessageItem" type="block" selector="#shopping-cart-table .gift-options .gift-message"/>
2937
</section>
3038
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutCartSummarySection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@
1414
<element name="shipping" type="text" selector="//*[@id='cart-totals']//tr[@class='totals shipping excl']//td//span[@class='price']"/>
1515
<element name="total" type="text" selector="//*[@id='cart-totals']//tr[@class='grand totals']//td//span[@class='price']"/>
1616
<element name="proceedToCheckout" type="button" selector=".action.primary.checkout span" timeout="30"/>
17+
<element name="giftWrappingOrderPrice" type="text" selector="//tr[@class='totals giftwrapping']//td[@data-th='Gift Wrapping for Order']"/>
18+
<element name="giftPrintedCardPrice" type="text" selector="//tr[@class='totals giftwrapping']//td[@data-th='Printed Card']"/>
1719
</section>
1820
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutOrderSummarySection.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@
1313
<element name="productItemName" type="text" selector=".product-item-name"/>
1414
<element name="productItemQty" type="text" selector=".value"/>
1515
<element name="productItemPrice" type="text" selector=".price"/>
16+
<element name="giftWrappingName" type="text" selector=".gift-wrapping-name"/>
17+
<element name="giftWrappingReqularPrice" type="text" selector=".gift-wrapping-title .regular-price span"/>
18+
<element name="giftRemoveButton" type="button" selector=".gift-wrapping-title .action-remove"/>
19+
<element name="clickImage" type="text" selector=".gift-wrapping-preview"/>
20+
<element name="clickButtonGiftUpdate" type="button" selector=".gift-options .actions-toolbar button[type='submit']"/>
1621
</section>
1722
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontMiniCartSection.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,16 @@
2323
<element name="viewAndEditCart" type="button" selector=".action.viewcart" timeout="30"/>
2424
<element name="miniCartItemsText" type="text" selector=".minicart-items"/>
2525
<element name="deleteMiniCartItem" type="button" selector=".action.delete" timeout="30"/>
26+
<element name="giftWrapping" type="text" selector="//*[@id='cart-totals']//tr[@class='totals giftwrapping']//td[@class='amount']"/>
27+
<element name="giftReceipt" type="text" selector=".gift-receipt label span"/>
28+
<element name="giftReceiptCheckbox" type="checkbox" selector=".gift-receipt input"/>
29+
<element name="giftPrintedCardCheckbox" type="checkbox" selector=".gift-printed-card input"/>
30+
<element name="giftMessageTo" type="input" selector=".cart-gift-item .gift-message .gift-options-content .field-to input"/>
31+
<element name="giftMessageFrom" type="input" selector=".cart-gift-item .gift-message .gift-options-content .field-from input"/>
32+
<element name="giftMessage" type="textarea" selector=".cart-gift-item .gift-message .gift-options-content .text textarea"/>
33+
<element name="giftWrappingNameResult" type="text" selector=".gift-summary .gift-wrapping-summary .gift-wrapping-name"/>
34+
<element name="giftWrappingPriceResult" type="text" selector="//*[contains(., '{{var1}}')]/../span[@class='regular-price']//span[contains(., '{{var2}}')]" parameterized="true"/>
35+
<element name="giftReceiptResult" type="text" selector=".gift-wrapping-summary span.label"/>
36+
<element name="giftMessageResult" type="text" selector=".gift-message-summary span"/>
2637
</section>
2738
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminOrderDetailsPage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
<section name="AdminOrderShipmentsTabSection"/>
2323
<section name="AdminOrderCommentsTabSection"/>
2424
<section name="AdminOrderTotalSection"/>
25+
<section name="AdminOrderGiftOptionSection"/>
2526
</page>
2627
</pages>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="AdminOrderGiftOptionSection">
12+
<element name="giftOptionsImage" type="file" selector=".order-gift-options img"/>
13+
<element name="giftWrappingDesignName" type="text" selector="//div[contains(@class, 'gift-wrapping-design')]/span"/>
14+
<element name="giftWrappingDesignPrice" type="text" selector=".gift-wrapping-design #price-box span .price"/>
15+
</section>
16+
</sections>

0 commit comments

Comments
 (0)