-
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.
Added improvements for credit memo (new page) total fields
- Loading branch information
Vaha
committed
Mar 30, 2020
1 parent
55f3961
commit 4046760
Showing
7 changed files
with
214 additions
and
27 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
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
27 changes: 27 additions & 0 deletions
27
...ode/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminCreditMemoNewPageTotalsActionGroup.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,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AssertAdminCreditMemoNewPageTotalsActionGroup"> | ||
<annotations> | ||
<description>Checks totals values on the Credit Memo new page.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="refundShipping" type="string" defaultValue="0"/> | ||
<argument name="adjustmentRefund" type="string" defaultValue="0"/> | ||
<argument name="adjustmentFee" type="string" defaultValue="0"/> | ||
<argument name="grandTotal" type="string" defaultValue="0"/> | ||
</arguments> | ||
|
||
<seeInField selector="{{AdminCreditMemoTotalSection.refundShipping}}" userInput="{{refundShipping}}" stepKey="seeRefundShipping"/> | ||
<seeInField selector="{{AdminCreditMemoTotalSection.adjustmentRefund}}" userInput="{{adjustmentRefund}}" stepKey="seeAdjustmentRefund"/> | ||
<seeInField selector="{{AdminCreditMemoTotalSection.adjustmentFee}}" userInput="{{adjustmentFee}}" stepKey="seeAdjustmentFee"/> | ||
<see selector="{{AdminCreditMemoTotalSection.grandTotal}}" userInput="{{grandTotal}}" stepKey="seeGrandTotal"/> | ||
</actionGroup> | ||
</actionGroups> |
27 changes: 27 additions & 0 deletions
27
...de/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminCreditMemoViewPageTotalsActionGroup.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,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AssertAdminCreditMemoViewPageTotalsActionGroup"> | ||
<annotations> | ||
<description>Checks totals values on the Credit Memo view page.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="subtotal" type="string" defaultValue="0"/> | ||
<argument name="adjustmentRefund" type="string" defaultValue="0"/> | ||
<argument name="adjustmentFee" type="string" defaultValue="0"/> | ||
<argument name="grandTotal" type="string" defaultValue="0"/> | ||
</arguments> | ||
|
||
<see selector="{{AdminCreditMemoViewTotalSection.subtotal}}" userInput="{{subtotal}}" stepKey="seeSubtotal"/> | ||
<see selector="{{AdminCreditMemoViewTotalSection.adjustmentRefund}}" userInput="{{adjustmentRefund}}" stepKey="seeAdjustmentRefund"/> | ||
<see selector="{{AdminCreditMemoViewTotalSection.adjustmentFee}}" userInput="{{adjustmentFee}}" stepKey="seeAdjustmentFee"/> | ||
<see selector="{{AdminCreditMemoViewTotalSection.grandTotal}}" userInput="{{grandTotal}}" stepKey="seeGrandTotal"/> | ||
</actionGroup> | ||
</actionGroups> |
52 changes: 52 additions & 0 deletions
52
app/code/Magento/Sales/Test/Mftf/Test/AdminCheckNewCreditMemoTotalsForFranceTest.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,52 @@ | ||
<?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="AdminCheckNewCreditMemoTotalsForFranceTest" extends="AdminCreateCreditMemoWithCashOnDeliveryTest"> | ||
<annotations> | ||
<stories value="Credit memo entity for France locale"/> | ||
<title value="Credit memo entity for France locale"/> | ||
<description value="Create Credit Memo with cash on delivery payment and assert 0 shipping refund for France locale"/> | ||
<group value="sales"/> | ||
</annotations> | ||
<before> | ||
<magentoCLI command="setup:static-content:deploy fr_FR" stepKey="deployStaticContentWithFrenchLocale" before="LoginAsAdmin"/> | ||
<actionGroup ref="SetAdminAccountActionGroup" stepKey="setAdminInterfaceLocaleToFrance" after="LoginAsAdmin"> | ||
<argument name="InterfaceLocaleByValue" value="fr_FR"/> | ||
</actionGroup> | ||
</before> | ||
<after> | ||
<actionGroup ref="SetAdminAccountActionGroup" stepKey="setAdminInterfaceLocaleToDefaultValue" before="logout"> | ||
<argument name="InterfaceLocaleByValue" value="en_US"/> | ||
</actionGroup> | ||
</after> | ||
|
||
<actionGroup ref="AdminOpenAndFillCreditMemoRefundActionGroup" stepKey="fillCreditMemoRefund"> | ||
<argument name="itemQtyToRefund" value="1"/> | ||
<argument name="shippingRefund" value="0"/> | ||
<argument name="adjustmentRefund" value="5,31"/> | ||
<argument name="adjustmentFee" value="10,31"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AssertAdminCreditMemoNewPageTotalsActionGroup" stepKey="assertCreditMemoRefundTotals" after="fillCreditMemoRefund"> | ||
<argument name="refundShipping" value="0,00"/> | ||
<argument name="adjustmentRefund" value="5,31"/> | ||
<argument name="adjustmentFee" value="10,31"/> | ||
<argument name="subtotalRow" value="560,00"/> | ||
<argument name="grandTotal" value="555,00"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AssertAdminCreditMemoViewPageTotalsActionGroup" stepKey="assertCreditMemoViewPageTotals"> | ||
<argument name="subtotal" value="560,00"/> | ||
<argument name="adjustmentRefund" value="5,31"/> | ||
<argument name="adjustmentFee" value="10,31"/> | ||
<argument name="grandTotal" value="555,00"/> | ||
</actionGroup> | ||
</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