Skip to content

Commit

Permalink
magento#30255: Fixed The coupon code has been accepted message
Browse files Browse the repository at this point in the history
Added after action for disable Flatrate in MFTF test
Added Verification for previous message removed
  • Loading branch information
shikhamis11 committed Oct 19, 2020
1 parent 1ee91ca commit 15fdf8d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<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>
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,24 @@
</createData>

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

<!--Set default flat rate shipping method settings-->
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}"
stepKey="enableFlatRate"/>
</before>
<after>
<!-- Disable Bank Transfer payment -->
<magentoCLI command="config:set {{DisablePaymentBankTransferConfigData.path}} {{DisablePaymentBankTransferConfigData.value}}" stepKey="disableBankTransferPayment"/>

<magentoCLI
command="config:set {{DisablePaymentBankTransferConfigData.path}} {{DisablePaymentBankTransferConfigData.value}}"
stepKey="disableBankTransferPayment"/>

<!--Disable flat rate shipping method-->
<magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}"
stepKey="disableFlatRate"/>

<!-- Delete sales rule -->
<deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/>

Expand Down Expand Up @@ -72,17 +81,20 @@
<actionGroup ref="AdminApplyCouponToOrderActionGroup" stepKey="applyCoupon">
<argument name="couponCode" value="$$createCouponForCartPriceRule.code$$"/>
</actionGroup>

<!-- Remove coupon from the order -->
<actionGroup ref="AdminRemoveCouponFromOrderActionGroup" stepKey="removeCoupon"/>

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

<!-- Select bank Transfer payment method -->
<waitForElementVisible selector="{{AdminOrderFormPaymentSection.paymentBlock}}" stepKey="waitForPaymentOptions"/>
<conditionalClick selector="{{AdminOrderFormPaymentSection.bankTransferOption}}" dependentSelector="{{AdminOrderFormPaymentSection.bankTransferOption}}" visible="true" stepKey="checkBankTransferOption"/>

<waitForElementVisible selector="{{AdminOrderFormPaymentSection.paymentBlock}}"
stepKey="waitForPaymentOptions"/>
<conditionalClick selector="{{AdminOrderFormPaymentSection.bankTransferOption}}"
dependentSelector="{{AdminOrderFormPaymentSection.bankTransferOption}}" visible="true"
stepKey="checkBankTransferOption"/>

<!-- Submit order -->
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/>

Expand All @@ -97,4 +109,4 @@
</actionGroup>
<click selector="{{AdminDataGridTableSection.firstRow}}" stepKey="clickCreatedOrderInGrid"/>
</test>
</tests>
</tests>

0 comments on commit 15fdf8d

Please sign in to comment.