-
Notifications
You must be signed in to change notification settings - Fork 9.4k
#30255: Fixed "The coupon code has been accepted." message remains after a Coupon Code was removed #30391
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
Merged
magento-engcom-team
merged 8 commits into
magento:2.4-develop
from
cedcommerce:2.4-dev_30255
Nov 13, 2020
Merged
#30255: Fixed "The coupon code has been accepted." message remains after a Coupon Code was removed #30391
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f54561e
#30255: Fixed "The coupon code has been accepted." message remains af…
16e962d
#30255: Fixed The coupon code has been accepted. message remains afte…
shikhamis11 9c09485
#30255:#30255: Fixed The coupon code has been accepted message
shikhamis11 1ee91ca
Updated suggestes changes
15fdf8d
#30255: Fixed The coupon code has been accepted message
shikhamis11 2362ad9
#30255: Fixed The coupon code has been accepted message
shikhamis11 28376be
#30255: Fixed The coupon code has been accepted message
d011456
#30255: Fixed The coupon code has been accepted message
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 hidden or 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
app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminRemoveCouponFromOrderActionGroup.xml
This file contains hidden or 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="AdminRemoveCouponFromOrderActionGroup"> | ||
<click selector="{{AdminOrderFormItemsSection.removeCoupon}}" stepKey="removeCoupon"/> | ||
<waitForPageLoad stepKey="waitForRemovingCoupon"/> | ||
<dontSee selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The coupon code has been accepted." stepKey="dontSeePreviousMessage"/> | ||
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The coupon code has been removed." stepKey="seeSuccessMessage"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains hidden or 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
72 changes: 72 additions & 0 deletions
72
...ode/Magento/Sales/Test/Mftf/Test/AdminCreateOrderToVerifyApplyAndRemoveCouponCodeTest.xml
This file contains hidden or 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,72 @@ | ||
<?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="AdminCreateOrderToVerifyApplyAndRemoveCouponCodeTest"> | ||
<annotations> | ||
<stories value="Create Order with offline payment methods"/> | ||
<title value="Create Order to verify apply and remove coupon code test"/> | ||
<description value="Create Order to verify apply and remove coupon code test"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-37386"/> | ||
<group value="sales"/> | ||
</annotations> | ||
<before> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> | ||
<createData entity="Simple_US_Customer" stepKey="createCustomer"/> | ||
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"> | ||
<field key="price">10</field> | ||
</createData> | ||
<createData entity="SalesRuleSpecificCouponWithFixedDiscount" stepKey="createCartPriceRule"/> | ||
<createData entity="SimpleSalesRuleCoupon" stepKey="createCouponForCartPriceRule"> | ||
<requiredEntity createDataKey="createCartPriceRule"/> | ||
</createData> | ||
<magentoCLI | ||
command="config:set {{EnablePaymentBankTransferConfigData.path}} {{EnablePaymentBankTransferConfigData.value}}" | ||
stepKey="enableBankTransferPayment"/> | ||
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" | ||
stepKey="enableFlatRate"/> | ||
</before> | ||
<after> | ||
<magentoCLI | ||
command="config:set {{DisablePaymentBankTransferConfigData.path}} {{DisablePaymentBankTransferConfigData.value}}" | ||
stepKey="disableBankTransferPayment"/> | ||
<magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" | ||
stepKey="disableFlatRate"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe flat rate is enabled by default, by disabling it we may have made other tests flaky. I guess you can keep the CLI to enable it, but remove this one. |
||
<deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/> | ||
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> | ||
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> | ||
</after> | ||
<actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="goToCreateOrderPage"> | ||
<argument name="customer" value="$$createCustomer$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addProductToOrder"> | ||
<argument name="product" value="$$createSimpleProduct$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminApplyCouponToOrderActionGroup" stepKey="applyCoupon"> | ||
<argument name="couponCode" value="$$createCouponForCartPriceRule.code$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminRemoveCouponFromOrderActionGroup" stepKey="removeCoupon"/> | ||
gabrieldagama marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<actionGroup ref="AdminSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/> | ||
<waitForElementVisible selector="{{AdminOrderFormPaymentSection.paymentBlock}}" | ||
stepKey="waitForPaymentOptions"/> | ||
<conditionalClick selector="{{AdminOrderFormPaymentSection.bankTransferOption}}" | ||
dependentSelector="{{AdminOrderFormPaymentSection.bankTransferOption}}" visible="true" | ||
stepKey="checkBankTransferOption"/> | ||
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/> | ||
<grabTextFrom selector="|Order # (\d+)|" stepKey="getOrderId"/> | ||
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="goToOrdersPage"/> | ||
<waitForPageLoad stepKey="waitForOrdersPageLoad"/> | ||
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrdersGridById"> | ||
<argument name="orderId" value="$getOrderId"/> | ||
</actionGroup> | ||
<click selector="{{AdminDataGridTableSection.firstRow}}" stepKey="clickCreatedOrderInGrid"/> | ||
</test> | ||
</tests> |
This file contains hidden or 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.
@shikhamis11 could you please update
severity
andtestCaseId
?Thank you.