Skip to content

Commit 84e6e1e

Browse files
committed
refactored AdminCreateOrderAddProductCheckboxTest
1 parent f55f411 commit 84e6e1e

File tree

2 files changed

+30
-8
lines changed

2 files changed

+30
-8
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AddSimpleProductToOrderAndCheckCheckboxActionGroup" extends="AddSimpleProductToOrderActionGroup">
12+
<annotations>
13+
<description>Adds the provided Simple Product to an Order. Checks of checkbox is checkedFills in the provided Product Qty. Clicks on 'Add Selected Product(s) to Order'.</description>
14+
</annotations>
15+
16+
<seeCheckboxIsChecked selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="verifyProductChecked" after="selectProduct"/>
17+
18+
</actionGroup>
19+
</actionGroups>

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,20 @@
3434
<argument name="customer" value="$$createSimpleCustomer$$"/>
3535
</actionGroup>
3636

37-
<click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
38-
<fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="$$createSimpleProduct.sku$$" stepKey="fillSkuFilterBundle"/>
39-
<click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchBundle"/>
40-
<scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
41-
<checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectProduct"/>
42-
<seeCheckboxIsChecked selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="verifyProductChecked"/>
43-
37+
<actionGroup ref="AddSimpleProductToOrderAndCheckCheckboxActionGroup" stepKey="clickAddProducts">
38+
<argument name="product" value="$createSimpleProduct$"/>
39+
</actionGroup>
40+
41+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillSkuFilterBundle"/>
42+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchBundle"/>
43+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollToCheckColumn"/>
44+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectProduct"/>
45+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="verifyProductChecked"/>
46+
4447
<after>
4548
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
4649
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
4750
<deleteData createDataKey="createSimpleCustomer" stepKey="deleteSimpleCustomer"/>
4851
</after>
4952
</test>
50-
</tests>
53+
</tests>

0 commit comments

Comments
 (0)