Skip to content

Commit 800eae8

Browse files
committed
MC-20070: Fix Skipped MFTF Tests From MC-17140: MAGETWO-95175, MAGETWO-97001, MAGETWO-98189
1 parent 6da226d commit 800eae8

7 files changed

+187
-3
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="AdminAssertCreditMemoGrandTotalActionGroup">
12+
<annotations>
13+
<description>Admin assert creditmemo grant total sum</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="expectedGrandTotal" type="string" defaultValue="$123.00"/>
17+
</arguments>
18+
<grabTextFrom selector="{{AdminCreditMemoTotalSection.grandTotal}}" stepKey="getGrandTotal"/>
19+
<assertEquals expected='{{expectedGrandTotal}}' expectedType="string" actual="$getGrandTotal" stepKey="assertGrandTotalValue"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="AdminOpenCreditMemoFromOrderPageActionGroup">
12+
<annotations>
13+
<description>Admin open creditmemo from order</description>
14+
</annotations>
15+
<click selector="{{AdminCreditMemoTotalSection.creditMemoItem}}" stepKey="goToCreatedCreditMemo"/>
16+
<waitForElementVisible selector="{{AdminCreditMemoTotalSection.viewMemo}}" stepKey="waitForCreditMemoPage"/>
17+
<click selector="{{AdminCreditMemoTotalSection.viewMemo}}" stepKey="viewMemo"/>
18+
<waitForPageLoad stepKey="waitForCreditMemoOpened"/>
19+
</actionGroup>
20+
</actionGroups>
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="AdminStartToCreateCreditMemoFromOrderPageActionGroup">
12+
<annotations>
13+
<description>Admin start to create credit memo from order</description>
14+
</annotations>
15+
<click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreditMemo"/>
16+
<waitForElementVisible selector="{{AdminHeaderSection.pageTitle}}" stepKey="waitForPageTitle"/>
17+
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Memo" stepKey="seeNewMemoPageTitle"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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="AdminCreateTaxRuleCustomProductTaxClassActionGroup">
12+
<annotations>
13+
<description>Admin create tax rule with custom product tax class</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="taxRateCode" type="string" defaultValue="{{US_NY_Rate_1.code}}"/>
17+
<argument name="taxRuleCode" type="string" defaultValue="{{defaultTaxRule.code}}"/>
18+
<argument name="productTaxClassName" type="string" defaultValue="NewTaxClass"/>
19+
</arguments>
20+
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/>
21+
<waitForPageLoad stepKey="waitForTaxRatePageLoaded"/>
22+
<click selector="{{AdminMainActionsSection.add}}" stepKey="addNewTaxRate"/>
23+
<fillField selector="{{AdminTaxRulesSection.ruleName}}" userInput="{{taxRuleCode}}" stepKey="fillRuleName"/>
24+
<click selector="{{AdminTaxRulesSection.selectTaxRate(taxRateCode)}}" stepKey="selectTaxRate"/>
25+
<click selector="{{AdminTaxRuleFormSection.additionalSettings}}" stepKey="clickAdditionalSettings"/>
26+
<click selector="{{AdminTaxRulesSection.selectTaxClass(taxableGoodsTaxClass.class_name)}}" stepKey="unSelectTaxClass"/>
27+
<click selector="{{AdminTaxRulesSection.selectTaxClass(productTaxClassName)}}" stepKey="selectProductTaxClass"/>
28+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSave"/>
29+
<waitForElementVisible selector="{{AdminMessagesSection.successMessage}}" stepKey="waitForSuccessMessage"/>
30+
<see selector="{{AdminMessagesSection.successMessage}}" userInput="You saved the tax rule." stepKey="verifyRuleSaved"/>
31+
</actionGroup>
32+
</actionGroups>

app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRulesSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@
3131
<element name="defaultTaxClass" type="button" selector="//*[@id='tax_product_class']/following-sibling::section//div[@class='mselect-items-wrapper']/div[1]"/>
3232
<element name="deleteTaxClassName" type="button" selector="//span[contains(text(),'{{var1}}')]" parameterized="true"/>
3333
<element name="deleteTaxClass" type="button" selector="//span[contains(text(),'{{var1}}')]/../..//*[@class='mselect-delete']" parameterized="true"/>
34-
<element name="popUpDialogOK" type="button" selector="//*[@class='modal-footer']//*[contains(text(),'OK')]"/>
34+
<element name="popUpDialogOK" type="button" selector=".modal-footer .action-accept"/>
3535
<element name="taxRateMultiSelectItems" type="block" selector=".mselect-list-item"/>
3636
<element name="taxRateNumber" type="button" selector="//div[@data-ui-id='tax-rate-form-fieldset-element-form-field-tax-rate']//div[@class='mselect-items-wrapper']//label[{{var}}]" parameterized="true"/>
3737
<element name="selectTaxRate" type="input" selector="//span[text()='{{taxCode}}']" parameterized="true"/>
38+
<element name="selectTaxClass" type="input" selector="//span[text()='{{taxClass}}']" parameterized="true"/>
3839
</section>
3940
</sections>
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCheckCreditMemoTotalsTest">
12+
<annotations>
13+
<features value="Tax"/>
14+
<stories value="Credit memo entity"/>
15+
<title value="Checking Credit memo Totals"/>
16+
<description value="Checking Credit memo Totals"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-6159"/>
19+
<group value="creditMemo"/>
20+
<group value="tax"/>
21+
</annotations>
22+
<before>
23+
<!-- Create productTaxClass -->
24+
<createData entity="productTaxClass" stepKey="createProductTaxClass"/>
25+
<!--Set configs-->
26+
<magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 0" stepKey="disableGenerateUrlRewrite"/>
27+
<magentoCLI command="config:set tax/classes/default_product_tax_class $createProductTaxClass.return$" stepKey="setDefaultProductTaxClass"/>
28+
<!--Create category and product-->
29+
<createData entity="_defaultCategory" stepKey="createCategory"/>
30+
<createData entity="_defaultProduct" stepKey="createSimpleProduct">
31+
<requiredEntity createDataKey="createCategory"/>
32+
<field key="productTaxClass">$createProductTaxClass.taxClass[class_name]$</field>
33+
</createData>
34+
<!--Create customer-->
35+
<createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/>
36+
<!--Login as admin-->
37+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
38+
<!--Create tax rule-->
39+
<actionGroup ref="AdminCreateTaxRuleCustomProductTaxClassActionGroup" stepKey="createTaxRuleCustomProductTaxClass">
40+
<argument name="productTaxClassName" value="$createProductTaxClass.taxClass[class_name]$"/>
41+
</actionGroup>
42+
</before>
43+
<after>
44+
<!--Set configs-->
45+
<magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="enableGenerateUrlRewrite"/>
46+
<magentoCLI command="config:set tax/classes/default_product_tax_class 2" stepKey="setDefaultProductTaxClass"/>
47+
<!--Delete category and product-->
48+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
49+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
50+
<!--Delete customer-->
51+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
52+
<!-- Reset admin order filter -->
53+
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilters"/>
54+
<!-- Go to the tax rule page and delete the row we created-->
55+
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/>
56+
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule">
57+
<argument name="name" value="{{defaultTaxRule.code}}"/>
58+
<argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/>
59+
</actionGroup>
60+
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearTaxRuleFilter"/>
61+
<!-- Delete Tax Class -->
62+
<deleteData createDataKey="createProductTaxClass" stepKey="deleteProductTaxClass"/>
63+
<!--Logout-->
64+
<actionGroup ref="logout" stepKey="logout"/>
65+
</after>
66+
<!--Create new order-->
67+
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="createNewOrder">
68+
<argument name="customer" value="Simple_US_Customer_NY"/>
69+
</actionGroup>
70+
<!--Add product to order-->
71+
<actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToOrder">
72+
<argument name="product" value="$createSimpleProduct$"/>
73+
</actionGroup>
74+
<!--Set shipping method-->
75+
<actionGroup ref="orderSelectFlatRateShipping" stepKey="orderSelectFlatRateShipping"/>
76+
<!--Submit order-->
77+
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/>
78+
<!--Create order invoice-->
79+
<actionGroup ref="StartCreateInvoiceFromOrderPage" stepKey="startCreateInvoice"/>
80+
<actionGroup ref="SubmitInvoice" stepKey="submitInvoice"/>
81+
<!--Create Credit Memo-->
82+
<actionGroup ref="AdminStartToCreateCreditMemoFromOrderPageActionGroup" stepKey="createCreditMemo"/>
83+
<fillField selector="{{AdminCreditMemoTotalSection.refundShipping}}" userInput="0" stepKey="setRefundShipping"/>
84+
<actionGroup ref="UpdateCreditMemoTotalsActionGroup" stepKey="updateTotals"/>
85+
<actionGroup ref="SubmitCreditMemoActionGroup" stepKey="submitCreditMemo"/>
86+
<actionGroup ref="AdminOpenCreditMemoFromOrderPageActionGroup" stepKey="openCreditMemoFromOrderPageActionGroup"/>
87+
<actionGroup ref="AdminAssertCreditMemoGrandTotalActionGroup" stepKey="assertGrandTotal">
88+
<argument name="expectedGrandTotal" value="$133.30"/>
89+
</actionGroup>
90+
</test>
91+
</tests>

app/code/Magento/Tax/Test/Mftf/Test/CheckCreditMemoTotalsTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
<annotations>
1313
<features value="Tax"/>
1414
<stories value="MAGETWO-91769 - Credit Memo - Wrong tax calculation! #10982"/>
15-
<title value="Checking Credit memo Totals"/>
15+
<title value="DEPRECATED. Checking Credit memo Totals"/>
1616
<description value="Checking Credit memo Totals"/>
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MAGETWO-95175"/>
1919
<group value="creditMemo"/>
2020
<group value="tax"/>
2121
<skip>
22-
<issueId value="MC-17140"/>
22+
<issueId value="DEPRECATED">Use AdminCheckCreditMemoTotalsTest instead</issueId>
2323
</skip>
2424
</annotations>
2525
<before>

0 commit comments

Comments
 (0)