Skip to content

Commit 9681ef2

Browse files
Manjusha.SManjusha.S
authored andcommitted
Merge branch 'ACQE-4086' into functional-testing-automation
2 parents 3d18fe0 + b9591fb commit 9681ef2

File tree

6 files changed

+77
-1
lines changed

6 files changed

+77
-1
lines changed

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,8 @@
3737
<element name="selectRowBasedOnName" type="input" selector="//td/div[text()='{{var1}}']" parameterized="true"/>
3838
<element name="changeStatus" type="button" selector="//div[contains(@class,'admin__data-grid-header-row') and contains(@class, 'row')]//div[contains(@class, 'action-menu-item')]//ul/li/span[text() = '{{status}}']" parameterized="true"/>
3939
<element name="productRowByTypeAndName" type="block" selector="//div[@data-role='grid-wrapper']//table[contains(@class, 'data-grid')]//td[count(../../..//th[./*[.='Type']]/preceding-sibling::th) + 1][./*[.='{{type}}']]/../td[contains(.,'{{name}}')]" parameterized="true" />
40+
<element name="productCollapsibleColumns" type="button" selector="//div[@data-state-collapsible='{{state}}']//strong[@class='admin__collapsible-title']//span[text()='{{expandTitle}}']" parameterized="true"/>
41+
<element name="allowGiftMessageCheckbox" type="checkbox" selector="//input[@type='checkbox' and @name='product[use_config_gift_message_available]']" />
42+
<element name="allowGiftMessageToggle" type="button" selector="//input[@type='checkbox' and @name='product[gift_message_available]' and @value='{{var1}}']/..//label[@class='admin__actions-switch-label']" parameterized="true"/>
4043
</section>
4144
</sections>

app/code/Magento/Checkout/Test/Mftf/Section/StorefrontProductCartGiftOptionSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<element name="message" type="textarea" selector=".gift-options-content .field.text .input-text"/>
1616
<element name="update" type="button" selector=".action-update"/>
1717
<element name="cancel" type="button" selector=".action-cancel"/>
18+
<element name="viewGiftOptions" type="button" selector="//tbody[@class='cart item']//a[text()='{{product_name}}']/../../../../..//tr[@class='item-actions']//button[@class='action action-gift']" parameterized="true"/>
1819
</section>
1920
</sections>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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="AdminConfigureSalesGiftOptionsActionGroup">
12+
<annotations>
13+
<description>Sets Allow Gift Message For a product</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="allowGiftMsgOnOrderLevel" type="string"/>
17+
<argument name="allowGiftMsgOnOrderItems" type="string"/>
18+
<argument name="allowWrappingGiftOnOrderLevel" type="string"/>
19+
<argument name="allowWrappingGiftOnItemLevel" type="string"/>
20+
<argument name="allowGiftReceipt" type="string"/>
21+
<argument name="allowPrintedCard" type="string"/>
22+
23+
</arguments>
24+
<amOnPage url="{{AdminSalesConfigPage.url('')}}" stepKey="amOnSalesConfigurationPage"/>
25+
<scrollTo selector="{{AdminSalesConfigSection.giftOptions}}" x="-200" y="-200" stepKey="scrollToGiftOptions"/>
26+
<conditionalClick selector="{{AdminSalesConfigSection.expandGiftOptions('')}}" dependentSelector="{{AdminSalesConfigSection.giftOptions('')}}" visible="true" stepKey="expandGiftOptions"/>
27+
<uncheckOption selector="{{AdminSalesConfigSection.chkAllowGiftMessagesOnOrderLevel}}" stepKey="uncheckGiftMessagesOnOrderLevel"/>
28+
<uncheckOption selector="{{AdminSalesConfigSection.chkAllowGiftMessagesOnOrderItem}}" stepKey="uncheckGiftMessagesOnOrderItem"/>
29+
<selectOption userInput="{{allowGiftMsgOnOrderLevel}}" selector="{{AdminSalesConfigSection.selectAllowGiftMessagesOnOrderLevel}}" stepKey="selectAllowGiftMsgOnOrderLevel"/>
30+
<selectOption userInput="{{allowGiftMsgOnOrderItems}}" selector="{{AdminSalesConfigSection.selectAllowGiftMessagesOnOrderItem}}" stepKey="selectAllowGiftMsgOnOrderItems"/>
31+
<selectOption userInput="{{allowWrappingGiftOnOrderLevel}}" selector="{{AdminSalesConfigSection.selectAllowWrappingGiftOnOrderLevel}}" stepKey="selectAllowWrappingGiftOnOrderLevel"/>
32+
<selectOption userInput="{{allowWrappingGiftOnItemLevel}}" selector="{{AdminSalesConfigSection.selectAllowWrappingGiftOnItemLevel}}" stepKey="selectAllowWrappingGiftOnItemLevel"/>
33+
<selectOption userInput="{{allowGiftReceipt}}" selector="{{AdminSalesConfigSection.selectAllowGiftReceipt}}" stepKey="selectAllowGiftReceipt"/>
34+
<selectOption userInput="{{allowPrintedCard}}" selector="{{AdminSalesConfigSection.selectAllowPrintedCard}}" stepKey="selectAllowPrintedCard"/>
35+
<conditionalClick selector="{{AdminSalesConfigSection.expandGiftOptions('open')}}" dependentSelector="{{AdminSalesConfigSection.giftOptions('open')}}" visible="true" stepKey="collapseGiftOptions"/>
36+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveTheGiftOptionsConfig"/>
37+
</actionGroup>
38+
</actionGroups>

app/code/Magento/Config/Test/Mftf/Section/AdminSalesConfigSection.xml

100644100755
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,15 @@
1313
<element name="allowGiftReceipt" type="select" selector="#sales_gift_options_allow_gift_receipt"/>
1414
<element name="allowPrintedCard" type="select" selector="#sales_gift_options_allow_printed_card"/>
1515
<element name="go" type="select" selector="//a[@id='sales_gift_options-head']/ancestor::div[@class='entry-edit-head admin__collapsible-block']"/>
16+
17+
<element name="expandGiftOptions" type="select" selector="//a[@id='sales_gift_options-head' and @class='{{var}}']" parameterized="true"/>
18+
<element name="chkAllowGiftMessagesOnOrderLevel" type="checkbox" selector="//input[@id='sales_gift_options_allow_order_inherit' and @type='checkbox']"/>
19+
<element name="chkAllowGiftMessagesOnOrderItem" type="checkbox" selector="//input[@id='sales_gift_options_allow_items_inherit' and @type='checkbox']"/>
20+
<element name="selectAllowGiftMessagesOnOrderLevel" type="select" selector="//select[@id='sales_gift_options_allow_order']"/>
21+
<element name="selectAllowGiftMessagesOnOrderItem" type="select" selector="//select[@id='sales_gift_options_allow_items']"/>
22+
<element name="selectAllowWrappingGiftOnOrderLevel" type="select" selector="//select[@id='sales_gift_options_wrapping_allow_order']"/>
23+
<element name="selectAllowWrappingGiftOnItemLevel" type="select" selector="//select[@id='sales_gift_options_wrapping_allow_items']"/>
24+
<element name="selectAllowGiftReceipt" type="select" selector="//select[@id='sales_gift_options_allow_gift_receipt']"/>
25+
<element name="selectAllowPrintedCard" type="select" selector="//select[@id='sales_gift_options_allow_printed_card']"/>
1626
</section>
17-
</sections>
27+
</sections>

app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerInformationSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
<element name="billingAgreements" type="button" selector="#tab_customer_edit_tab_agreements_content"/>
1919
<element name="productReviews" type="button" selector="#tab_reviews_content"/>
2020
<element name="wishList" type="button" selector="#tab_wishlist_content"/>
21+
<element name="showCart" type="button" selector="//a[@class='action showcart']"/>
2122
</section>
2223
</sections>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="AllowGiftMessageForProductActionGroup">
12+
<annotations>
13+
<description>Sets Allow Gift Message For a product</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="allowGiftMsg" type="string"/>
17+
</arguments>
18+
<conditionalClick selector="{{AdminProductGridSection.productCollapsibleColumns('closed','Gift Options')}}" dependentSelector="{{AdminProductGridSection.productCollapsibleColumns('closed','Gift Options')}}" visible="true" stepKey="expandGiftOptions"/>
19+
<scrollTo selector="{{AdminProductGridSection.allowGiftMessageCheckbox}}" x="-200" y="-200" stepKey="scrollToUncheckUseConfigSettings"/>
20+
<uncheckOption selector="{{AdminProductGridSection.allowGiftMessageCheckbox}}" stepKey="uncheckUseConfigSettings"/>
21+
<conditionalClick selector="{{AdminProductGridSection.allowGiftMessageToggle(allowGiftMsg)}}" dependentSelector="{{AdminProductGridSection.allowGiftMessageToggle(allowGiftMsg)}}" visible="true" stepKey="setTheValue"/>
22+
</actionGroup>
23+
</actionGroups>

0 commit comments

Comments
 (0)