Skip to content

Commit 6336407

Browse files
committed
ACQE-6908 : Verify that Apply gift cards or promo codes widget is shown on order review page
Created new test file for payflow link related one
1 parent 313be32 commit 6336407

File tree

2 files changed

+63
-28
lines changed

2 files changed

+63
-28
lines changed

app/code/Magento/Paypal/Test/Mftf/Test/StorefrontVerifyGiftCardPromoWidgetForPayFlowLinkTest.xml renamed to app/code/Magento/Checkout/Test/Mftf/Test/StorefrontApplyGiftsCardsAndCouponCodesInWidgetIsShownOnOrderReviewPageForPayflowLinkTest.xml

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,57 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8+
89
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
910
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10-
<test name="StorefrontVerifyGiftCardPromoWidgetForPayFlowLinkTest">
11+
<test name="StorefrontApplyGiftsCardsAndCouponCodesInWidgetIsShownOnOrderReviewPageForPayflowLinkTest">
1112
<annotations>
12-
<features value="payFlow link"/>
13-
<stories value="Storefront Gift Card and Promo Codes"/>
14-
<title value="Verify that Apply gift cards or promo codes widget is shown on order review page"/>
15-
<description value="Verify that Apply gift cards or promo codes widget is shown on order review page for PayFlow Link (Includes Express Checkout)"/>
13+
<features value="Payments"/>
14+
<stories value="Payflow Link"/>
15+
<title value="Apply gift cards and promo codes widget are shown on Order review page for Payflow Link"/>
16+
<description value="As a guest, apply coupon and gift card while placing an order through paypal payflow Link"/>
1617
<severity value="MAJOR"/>
1718
<testCaseId value="AC-4378"/>
1819
</annotations>
1920
<before>
21+
<!--Create simple product-->
2022
<createData entity="simpleProductWithoutCategory" stepKey="createProduct">
2123
<field key="price">100.00</field>
2224
</createData>
23-
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
24-
<actionGroup ref="AdminEnablePayPalPayFlowLinkActionGroup" stepKey="ConfigPayPalPayFlowLink">
25-
<argument name="credentials" value="SamplePaypalPaymentsFlowLinkConfig"/>
26-
</actionGroup>
27-
<!-- Create cart price rule -->
28-
<actionGroup ref="AdminCreateCartPriceRuleWithCouponCodeActionGroup" stepKey="createCartPriceRule">
29-
<argument name="ruleName" value="CatPriceRule"/>
30-
<argument name="couponCode" value="CatPriceRule.coupon_code"/>
31-
</actionGroup>
32-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
33-
<argument name="indices" value=""/>
34-
</actionGroup>
35-
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
36-
<argument name="tags" value="config full_page"/>
37-
</actionGroup>
25+
<!--Create cart price rule and coupon-->
26+
<createData entity="ActiveSalesRuleForNotLoggedIn" stepKey="createCartPriceRule"/>
27+
<createData entity="SimpleSalesRuleCoupon" stepKey="createCouponForCartPriceRule">
28+
<requiredEntity createDataKey="createCartPriceRule"/>
29+
</createData>
30+
<!--Create a customer-->
31+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
32+
<!--Login to admin site-->
33+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
3834
</before>
3935
<after>
40-
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
41-
<actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCartPriceRule">
42-
<argument name="ruleName" value="{{CatPriceRule.name}}"/>
43-
</actionGroup>
44-
<actionGroup ref="AdminDisablePayPalPayFlowLinkActionGroup" stepKey="disablePayPalPayFlow"/>
36+
<!--Delete created product-->
37+
<deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct"/>
38+
<!--Delete created cart price rule-->
39+
<deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/>
40+
<!--Delete created customer-->
41+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
42+
<!--Logout from admin site-->
4543
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
4644
</after>
47-
<actionGroup ref="StorefrontAddSimpleProductWithQtyActionGroup" stepKey="addSimpleProductToCart" before="waitForGiftCardHeaderToBeClickable">
45+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
46+
<argument name="indices" value=""/>
47+
</actionGroup>
48+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
49+
<argument name="tags" value="config full_page"/>
50+
</actionGroup>
51+
<actionGroup ref="StorefrontAddSimpleProductWithQtyActionGroup" stepKey="addSimpleProductToCart">
4852
<argument name="product" value="$$createProduct$$"/>
4953
<argument name="quantity" value="1"/>
5054
</actionGroup>
5155
<!--Go to shopping cart-->
5256
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openShoppingCartPage"/>
5357
<waitForElementVisible selector="{{CheckoutPaymentSection.checkoutWithPaypal}}" stepKey="waitForPayPalBtn"/>
5458
<click selector="{{CheckoutPaymentSection.checkoutWithPaypal}}" stepKey="clickPayPalBtn"/>
55-
<!--Login to Paypal in-context-->
56-
<actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="LoginToPayPal"/>
5759
<waitForElementClickable selector="{{CheckoutPaymentSection.reviewOrder}}" stepKey="waitForReviewOrderButtonToBeClickable"/>
5860
<click selector="{{CheckoutPaymentSection.reviewOrder}}" stepKey="clickReviewOrderButton"/>
5961
<waitForPageLoad stepKey="waitForPageLoad"/>
@@ -66,5 +68,7 @@
6668
<click selector="{{StorefrontPayPalOrderReviewSection.applyDiscount}}" stepKey="clickApplyDiscount"/>
6769
<waitForPageLoad stepKey="waitForCouponToBeApplied"/>
6870
<waitForElement selector="{{StorefrontPayPalOrderReviewSection.grandTotal('$95.00')}}" stepKey="assertTotalAfterDiscountApplied"/>
71+
<!--Place an order-->
72+
<actionGroup ref="ClickPlaceOrderActionGroup" after="assertTotalAfterGiftCardApplied" stepKey="clickOnPlaceOrder"/>
6973
</test>
7074
</tests>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontApplyGiftsCardsAndCouponCodesInWidgetIsShownOnOrderReviewPageForPayflowLinkTest">
12+
<annotations>
13+
<features value="Payments"/>
14+
<stories value="Payflow link"/>
15+
<title value="Apply gift cards or promo codes widget is shown on Order review page for Payflow link"/>
16+
<description value="As a guest, apply coupon and gift card while placing an order through paypal payflow link"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-4378"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="AdminEnablePayPalPayFlowLinkActionGroup" stepKey="ConfigPayPalPayFlowLink" after="createGiftCardAccount">
22+
<argument name="credentials" value="SamplePaypalPaymentsFlowLinkConfig"/>
23+
</actionGroup>
24+
</before>
25+
<after>
26+
<actionGroup ref="AdminDisablePayPalPayFlowLinkActionGroup" stepKey="disablePayPalPayFlow" after="deleteGiftCardAccount"/>
27+
</after>
28+
<!--Login to Paypal in-context-->
29+
<actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="LoginToPayPal" after="clickPayPalBtn"/>
30+
</test>
31+
</tests>

0 commit comments

Comments
 (0)