Skip to content

Commit 15fdf8d

Browse files
committed
#30255: Fixed The coupon code has been accepted message
Added after action for disable Flatrate in MFTF test Added Verification for previous message removed
1 parent 1ee91ca commit 15fdf8d

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminRemoveCouponFromOrderActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<actionGroup name="AdminRemoveCouponFromOrderActionGroup">
1212
<click selector="{{AdminOrderFormItemsSection.removeCoupon}}" stepKey="removeCoupon"/>
1313
<waitForPageLoad stepKey="waitForRemovingCoupon"/>
14+
<dontSee selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The coupon code has been accepted." stepKey="dontSeePreviousMessage"/>
1415
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The coupon code has been removed." stepKey="seeSuccessMessage"/>
1516
</actionGroup>
1617
</actionGroups>

app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderToVerifyApplyAndRemoveCouponCodeTest.xml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,24 @@
3636
</createData>
3737

3838
<!-- Enable Bank Transfer payment -->
39-
<magentoCLI command="config:set {{EnablePaymentBankTransferConfigData.path}} {{EnablePaymentBankTransferConfigData.value}}" stepKey="enableBankTransferPayment"/>
39+
<magentoCLI
40+
command="config:set {{EnablePaymentBankTransferConfigData.path}} {{EnablePaymentBankTransferConfigData.value}}"
41+
stepKey="enableBankTransferPayment"/>
4042

4143
<!--Set default flat rate shipping method settings-->
42-
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
44+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}"
45+
stepKey="enableFlatRate"/>
4346
</before>
4447
<after>
4548
<!-- Disable Bank Transfer payment -->
46-
<magentoCLI command="config:set {{DisablePaymentBankTransferConfigData.path}} {{DisablePaymentBankTransferConfigData.value}}" stepKey="disableBankTransferPayment"/>
47-
49+
<magentoCLI
50+
command="config:set {{DisablePaymentBankTransferConfigData.path}} {{DisablePaymentBankTransferConfigData.value}}"
51+
stepKey="disableBankTransferPayment"/>
52+
53+
<!--Disable flat rate shipping method-->
54+
<magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}"
55+
stepKey="disableFlatRate"/>
56+
4857
<!-- Delete sales rule -->
4958
<deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/>
5059

@@ -72,17 +81,20 @@
7281
<actionGroup ref="AdminApplyCouponToOrderActionGroup" stepKey="applyCoupon">
7382
<argument name="couponCode" value="$$createCouponForCartPriceRule.code$$"/>
7483
</actionGroup>
75-
84+
7685
<!-- Remove coupon from the order -->
7786
<actionGroup ref="AdminRemoveCouponFromOrderActionGroup" stepKey="removeCoupon"/>
7887

7988
<!--Select FlatRate shipping method-->
8089
<actionGroup ref="AdminSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/>
8190

8291
<!-- Select bank Transfer payment method -->
83-
<waitForElementVisible selector="{{AdminOrderFormPaymentSection.paymentBlock}}" stepKey="waitForPaymentOptions"/>
84-
<conditionalClick selector="{{AdminOrderFormPaymentSection.bankTransferOption}}" dependentSelector="{{AdminOrderFormPaymentSection.bankTransferOption}}" visible="true" stepKey="checkBankTransferOption"/>
85-
92+
<waitForElementVisible selector="{{AdminOrderFormPaymentSection.paymentBlock}}"
93+
stepKey="waitForPaymentOptions"/>
94+
<conditionalClick selector="{{AdminOrderFormPaymentSection.bankTransferOption}}"
95+
dependentSelector="{{AdminOrderFormPaymentSection.bankTransferOption}}" visible="true"
96+
stepKey="checkBankTransferOption"/>
97+
8698
<!-- Submit order -->
8799
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/>
88100

@@ -97,4 +109,4 @@
97109
</actionGroup>
98110
<click selector="{{AdminDataGridTableSection.firstRow}}" stepKey="clickCreatedOrderInGrid"/>
99111
</test>
100-
</tests>
112+
</tests>

0 commit comments

Comments
 (0)