-
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.
ENGCOM-8426: #30255: Fixed "The coupon code has been accepted." messa…
…ge remains after a Coupon Code was removed #30391
- Loading branch information
Showing
5 changed files
with
91 additions
and
0 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
17 changes: 17 additions & 0 deletions
17
app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminRemoveCouponFromOrderActionGroup.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="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 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
70 changes: 70 additions & 0 deletions
70
...ode/Magento/Sales/Test/Mftf/Test/AdminCreateOrderToVerifyApplyAndRemoveCouponCodeTest.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,70 @@ | ||
<?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="AVERAGE"/> | ||
<testCaseId value="MC-38919"/> | ||
<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"/> | ||
<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"/> | ||
<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 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