-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAGETWO-82400: Credit Memo - Wrong tax calculation! #10982
- Loading branch information
1 parent
0d99623
commit de3df20
Showing
8 changed files
with
164 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Sales/Test/Mftf/Page/AdminOrderInvoiceViewPage.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> | ||
<page name="AdminOrderInvoiceViewPage" url="/sales/order_invoice/view/invoice_id/{{invoiceId}}" parameterized="true" area="admin" module="Magento_Sales"> | ||
<section name="AdminOrderInvoiceViewMainActionsSection"/> | ||
</page> | ||
</pages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Sales/Test/Mftf/Section/AdminOrderInvoiceViewMainActionsSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminOrderInvoiceViewMainActionsSection"> | ||
<element name="creditMemo" type="button" selector=".credit-memo" timeout="30"/> | ||
</section> | ||
</sections> |
104 changes: 104 additions & 0 deletions
104
app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingCreditMemoTotalsTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminCheckingCreditMemoTotalsTest"> | ||
<annotations> | ||
<features value="CreditMemo"/> | ||
<stories value="MAGETWO-82400: Credit Memo - Wrong tax calculation! #10982"/> | ||
<title value="Checking Credit Memo Totals"/> | ||
<description value="Checking Credit Memo Totals"/> | ||
<severity value="MAJOR"/> | ||
<testCaseId value="MAGETWO-97140"/> | ||
<group value="sales"/> | ||
<group value="tax"/> | ||
</annotations> | ||
<before> | ||
<!--Create category--> | ||
<createData entity="_defaultCategory" stepKey="createCategory"/> | ||
<!--Create simple product--> | ||
<createData entity="_defaultProduct" stepKey="createSimpleProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
<field key="price">100</field> | ||
</createData> | ||
<!--Create Tax Rule--> | ||
<createData entity="SimpleTaxRule" stepKey="createTaxRule"/> | ||
<!--Create customer--> | ||
<createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/> | ||
<!--Configure Tax Class for shipping--> | ||
<createData entity="TaxClassForShippingConfig" stepKey="configureTaxClassForShipping"/> | ||
<!--Configure Braintree--> | ||
<createData entity="SandboxBraintreeConfig" stepKey="configureBraintree"/> | ||
<!--Login to admin page--> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<!--Delete category--> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
<!--Delete simple product--> | ||
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> | ||
<!--Delete Tax Rule--> | ||
<deleteData createDataKey="createTaxRule" stepKey="deleteTaxRule"/> | ||
<!--Delete customer--> | ||
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> | ||
<!--Restore default configuration for Tax Class for shipping--> | ||
<createData entity="DefaultTaxClassForShippingConfig" stepKey="restoreTaxClassForShippingConfig"/> | ||
<!--Restore default configuration for Braintree--> | ||
<createData entity="DefaultBraintreeConfig" stepKey="restoreBraintreeConfig"/> | ||
<!--Logout from admin page--> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!--Create new order with existing customer--> | ||
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderPage"> | ||
<argument name="customer" value="$$createCustomer$$"/> | ||
</actionGroup> | ||
<!--Add simple product to order--> | ||
<actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToOrder"> | ||
<argument name="product" value="$$createSimpleProduct$$"/> | ||
</actionGroup> | ||
<!--Select Flat Rate shipping method--> | ||
<actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping"/> | ||
<!--Fill Braintree credit card for payment method--> | ||
<actionGroup ref="AdminOrderFillBraintreeCreditCardActionGroup" stepKey="fillBraintreeCreditCard"/> | ||
<!--Submit order--> | ||
<click selector="{{AdminOrderFormActionSection.submitOrder}}" stepKey="submitOrder"/> | ||
<see selector="{{AdminMessagesSection.success}}" userInput="You created the order." | ||
stepKey="seeSuccessMessage"/> | ||
|
||
<!--Create invoice--> | ||
<actionGroup ref="StartCreateInvoiceFromOrderPage" stepKey="startCreateInvoice"/> | ||
<!--Submit invoice--> | ||
<actionGroup ref="SubmitInvoice" stepKey="submitInvoice"/> | ||
|
||
<!--Go to invoice page--> | ||
<click selector="{{AdminOrderViewTabsSection.invoices}}" stepKey="clickInvoicesTab"/> | ||
<waitForPageLoad stepKey="waitForInvoiceGridToLoad"/> | ||
<see selector="{{AdminOrderInvoicesTabSection.gridRow('1')}}" userInput="$113.66" stepKey="seeInvoiceInGrid"/> | ||
<click selector="{{AdminDataGridTableSection.rowViewAction('1')}}" stepKey="clickViewInvoice"/> | ||
|
||
<!--Create Credit Memo--> | ||
<click selector="{{AdminOrderInvoiceViewMainActionsSection.creditMemo}}" stepKey="clickCreditMemo"/> | ||
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Memo" stepKey="seeNewMemoPageTitle"/> | ||
<fillField selector="{{AdminCreditMemoTotalSection.refundShipping}}" userInput="0" stepKey="setRefundShipping"/> | ||
<click selector="{{AdminCreditMemoTotalSection.updateTotals}}" stepKey="clickUpdateTotals"/> | ||
<waitForPageLoad stepKey="waitForUpdateTotals"/> | ||
<click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickRefundOffline"/> | ||
<see selector="{{AdminMessagesSection.success}}" userInput="You created the credit memo." | ||
stepKey="seeCreatedCreditMemoSuccessMessage"/> | ||
|
||
<!--Go to Credit Memo tab--> | ||
<click selector="{{AdminOrderViewTabsSection.creditMemos}}" stepKey="clickCreditMemosTab"/> | ||
<waitForPageLoad stepKey="waitForCreditMemosGridToLoad"/> | ||
|
||
<!--Check refunded total --> | ||
<see selector="{{AdminOrderCreditMemosTabSection.gridRow('1')}}" userInput="$108.25" | ||
stepKey="seeCreditMemoInGrid"/> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters