-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MFTF] Refactoring AdminCreateCreditMemoForOrderWithCashOnDeliveryTest #31395
Merged
magento-engcom-team
merged 8 commits into
magento:2.4-develop
from
AnnaAPak:ref-AdminCreateCreditMemoWithCashOnDeliveryTest
Mar 7, 2021
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
bc147e2
refactored AdminCreateCreditMemoWithCashOnDeliveryTest
AnnaAPak 0344b4a
Merge branch '2.4-develop' into ref-AdminCreateCreditMemoWithCashOnDe…
AnnaAPak 012fb44
fixed conflicts
AnnaAPak 725ac04
refactoring
engcom-Hotel a6f783e
Merge branch '2.4-develop' into ref-AdminCreateCreditMemoWithCashOnDe…
engcom-Hotel a66c188
refactoring
engcom-Hotel 1efbd9f
Merge remote-tracking branch 'AnnaAPak/ref-AdminCreateCreditMemoWithC…
engcom-Hotel 201960d
test refactoring
engcom-Hotel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
17 changes: 17 additions & 0 deletions
17
...agento/Sales/Test/Mftf/ActionGroup/AdminClickRefundOfflineOnMemoDetailPageActionGroup.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,17 @@ | ||
<?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="AdminClickRefundOfflineOnMemoDetailPageActionGroup"> | ||
|
||
<click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickRefundOffline"/> | ||
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccesMessage"/> | ||
<see selector="{{AdminMessagesSection.success}}" userInput="You created the credit memo." stepKey="seeSuccessMessage"/> | ||
</actionGroup> | ||
</actionGroups> |
99 changes: 99 additions & 0 deletions
99
...code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoForOrderWithCashOnDeliveryTest.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,99 @@ | ||
<?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="AdminCreateCreditMemoForOrderWithCashOnDeliveryTest"> | ||
<annotations> | ||
<stories value="Credit memo entity"/> | ||
<title value="Create Credit Memo with cash on delivery payment method"/> | ||
<description value="Create Credit Memo with cash on delivery payment and assert 0 shipping refund"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-15863"/> | ||
<group value="sales"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> | ||
|
||
<createData entity="Simple_US_Customer" stepKey="createCustomer"/> | ||
<createData entity="_defaultCategory" stepKey="createCategory"/> | ||
<createData entity="defaultSimpleProduct" stepKey="createProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
|
||
<magentoCLI command="config:set {{enabledCashOnDeliveryPayment.label}} {{enabledCashOnDeliveryPayment.value}}" stepKey="enableBankTransfer"/> | ||
|
||
<createData entity="CustomerCart" stepKey="createCustomerCart"> | ||
<requiredEntity createDataKey="createCustomer"/> | ||
</createData> | ||
|
||
<createData entity="CustomerCartItem" stepKey="addCartItem"> | ||
<requiredEntity createDataKey="createCustomerCart"/> | ||
<requiredEntity createDataKey="createProduct"/> | ||
</createData> | ||
|
||
<createData entity="CustomerAddressInformation" stepKey="addCustomerOrderAddress"> | ||
<requiredEntity createDataKey="createCustomerCart"/> | ||
</createData> | ||
|
||
<updateData createDataKey="createCustomerCart" entity="CashOnDeliveryOrderPaymentMethod" stepKey="sendCustomerPaymentInformation"> | ||
<requiredEntity createDataKey="createCustomerCart"/> | ||
</updateData> | ||
|
||
<createData entity="Invoice" stepKey="invoiceOrderOne"> | ||
<requiredEntity createDataKey="createCustomerCart"/> | ||
</createData> | ||
|
||
</before> | ||
<after> | ||
<magentoCLI command="config:set {{disabledCashOnDeliveryPayment.label}} {{disabledCashOnDeliveryPayment.value}}" stepKey="disableBankTransfer"/> | ||
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> | ||
</after> | ||
|
||
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="onOrderPage"/> | ||
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFilters"/> | ||
<grabTextFrom selector="{{AdminOrdersGridSection.orderIdByIncrementId($createCustomerCart.return$)}}" stepKey="grabOrderId"/> | ||
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrdersGridById"> | ||
<argument name="orderId" value="{$grabOrderId}"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AdminOpenAndFillCreditMemoRefundActionGroup" stepKey="fillCreditMemoRefund"> | ||
<argument name="itemQtyToRefund" value="1"/> | ||
<argument name="shippingRefund" value="0"/> | ||
<argument name="adjustmentRefund" value="5"/> | ||
<argument name="adjustmentFee" value="10"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AdminClickRefundOfflineOnMemoDetailPageActionGroup" stepKey="clickRefundOffline"/> | ||
|
||
<actionGroup ref="AdminOpenCreditMemoFromOrderPageActionGroup" stepKey="openCreditMemo"/> | ||
|
||
<actionGroup ref="AssertAdminCreditMemoViewPageTotalsActionGroup" stepKey="assertCreditMemoViewPageTotals"> | ||
<argument name="subtotal" value="$560.00"/> | ||
<argument name="adjustmentRefund" value="$5.00"/> | ||
<argument name="adjustmentFee" value="$10.00"/> | ||
<argument name="grandTotal" value="$555.00"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> | ||
<argument name="Customer" value="$$createCustomer$$"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="StorefrontGoToCustomerOrderDetailsPageActionGroup" stepKey="openOrderDetailPage"> | ||
<argument name="orderId" value="$createCustomerCart.return$"/> | ||
<argument name="orderNumber" value="{$grabOrderId}"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="StorefrontClickRefundTabCustomerOrderViewActionGroup" stepKey="clickRefund"/> | ||
<see selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" userInput="555.00" stepKey="seeGrandTotal"/> | ||
</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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use the original
CreditMemo
entity name. Since justMemo
might be confusing (it has many other meanings).Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has been refactored.