Skip to content

Commit 7e1e6cf

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

File tree

7 files changed

+41
-42
lines changed

7 files changed

+41
-42
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/CheckoutCartPage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<page name="CheckoutCartPage" url="/checkout/cart" module="Checkout" area="storefront">
1212
<section name="CheckoutCartProductSection"/>
1313
<section name="CheckoutCartSummarySection"/>
14+
<section name="CheckoutCartSection"/>
1415
</page>
1516
</pages>

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@
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"/>
29+
<element name="cartItemGiftOption" type="text" selector="//tr[contains(., '{{var1}}')]/following-sibling::*[contains(., '{{var2}}')]" parameterized="true"/>
30+
<element name="cartGiftOptionAll" type="text" selector="//div[contains(@class,'cart-gift-item')][contains(., '{{var1}}')]" parameterized="true"/>
31+
<element name="clickCartItemGiftOptions" type="button" selector=".gift-options-cart-item .action-gift"/>
32+
<element name="clickCartGiftOptions" type="button" selector=".cart-gift-item div[data-role='title']"/>
33+
<element name="cartVisibleSmallImage" type="text" selector=".gift-item-block .gift-options-content img"/>
34+
<element name="cartItemVisibleSmallImage" type="text" selector="#shopping-cart-table .gift-options-content img"/>
35+
<element name="cartGiftMessage" type="block" selector=".cart-gift-item .gift-message"/>
36+
<element name="cartItemGiftMessage" type="block" selector="#shopping-cart-table .gift-options .gift-message"/>
37+
<element name="cartItemClickButtonGiftUpdate" type="button" selector=".gift-options-cart-item button[type='submit']"/>
3738
</section>
3839
</sections>
Lines changed: 29 additions & 0 deletions
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+
<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="CheckoutCartSection">
12+
<element name="giftWrappingName" type="text" selector=".gift-wrapping-name"/>
13+
<element name="giftWrappingReqularPrice" type="text" selector=".gift-wrapping-title .regular-price span"/>
14+
<element name="giftRemoveButton" type="button" selector=".gift-wrapping-title .action-remove"/>
15+
<element name="clickImage" type="text" selector=".gift-wrapping-preview"/>
16+
<element name="clickButtonGiftUpdate" type="button" selector=".cart-gift-item .actions-toolbar button[type='submit']"/>
17+
<element name="giftWrapping" type="text" selector="//*[@id='cart-totals']//tr[@class='totals giftwrapping']//td[@class='amount']"/>
18+
<element name="giftReceipt" type="text" selector=".gift-receipt label span"/>
19+
<element name="giftReceiptCheckbox" type="checkbox" selector=".gift-receipt input"/>
20+
<element name="giftPrintedCardCheckbox" type="checkbox" selector=".gift-printed-card input"/>
21+
<element name="giftMessageTo" type="input" selector=".cart-gift-item .gift-message .gift-options-content .field-to input"/>
22+
<element name="giftMessageFrom" type="input" selector=".cart-gift-item .gift-message .gift-options-content .field-from input"/>
23+
<element name="giftMessage" type="textarea" selector=".cart-gift-item .gift-message .gift-options-content .text textarea"/>
24+
<element name="giftWrappingNameResult" type="text" selector=".gift-summary .gift-wrapping-summary .gift-wrapping-name"/>
25+
<element name="giftWrappingPriceResult" type="text" selector="//*[contains(., '{{var1}}')]/../span[@class='regular-price']//span[contains(., '{{var2}}')]" parameterized="true"/>
26+
<element name="giftReceiptResult" type="text" selector=".gift-wrapping-summary span.label"/>
27+
<element name="giftMessageResult" type="text" selector=".gift-message-summary"/>
28+
</section>
29+
</sections>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +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']"/>
17+
<element name="giftWrappingOrderPrice" type="text" selector="#cart-totals td[data-th='Gift Wrapping for Order']"/>
18+
<element name="giftPrintedCardPrice" type="text" selector="#cart-totals td[data-th='Printed Card']"/>
1919
</section>
2020
</sections>

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,5 @@
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']"/>
2116
</section>
2217
</sections>

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,5 @@
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"/>
3726
</section>
3827
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderGiftOptionSection.xml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)