Skip to content

Commit 92d6936

Browse files
committed
ACQE-5768: Apply gift cards or promo codes widget is shown on Order review page for Payflow Pro (Includes Express Checkout)
1 parent be7b88d commit 92d6936

5 files changed

+151
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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="ApplyGiftsCardsAndCouponCodesInWidgetIsShownOnOrderReviewPageForPayflowProTest">
12+
<annotations>
13+
<features value="Payments"/>
14+
<stories value="Payflow Pro"/>
15+
<title value="Apply gift cards and promo codes widget are shown on Order review page for Payflow Pro"/>
16+
<description value="As a guest, apply coupon and gift card while placing an order through paypal payflow pro"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-5199"/>
19+
</annotations>
20+
<before>
21+
<!--Create simple product-->
22+
<createData entity="SimpleProduct" stepKey="createSimpleProduct1"/>
23+
<!--Create cart price rule and coupon-->
24+
<createData entity="ActiveSalesRuleForNotLoggedIn" stepKey="createCartPriceRule"/>
25+
<createData entity="SimpleSalesRuleCoupon" stepKey="createCouponForCartPriceRule">
26+
<requiredEntity createDataKey="createCartPriceRule"/>
27+
</createData>
28+
<!--Create a customer-->
29+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
30+
<!--Login to admin site-->
31+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
32+
</before>
33+
<after>
34+
<!--Delete created product-->
35+
<deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct"/>
36+
<!--Delete created cart price rule-->
37+
<deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/>
38+
<!--Delete created customer-->
39+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
40+
<!--Logout from admin site-->
41+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
42+
</after>
43+
<!--Go to storefront-->
44+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
45+
<!--Open product1 and add it to cart-->
46+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="gotToProductPage">
47+
<argument name="product" value="$$createSimpleProduct1$$"/>
48+
</actionGroup>
49+
<actionGroup ref="StorefrontAddToTheCartActionGroup" stepKey="addProductToCart">
50+
<argument name="product" value="$$createSimpleProduct1$$"/>
51+
</actionGroup>
52+
<!--Go to checkout page-->
53+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckoutCartPage"/>
54+
<!--Fill Shipping Address-->
55+
<actionGroup ref="GuestCheckoutFillNewShippingAddressActionGroup" stepKey="fillShippingAddress">
56+
<argument name="customer" value="$$createCustomer$$" />
57+
<argument name="address" value="US_Address_TX"/>
58+
</actionGroup>
59+
<!-- Select shipping -->
60+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectShippingMethodAsFlatrate">
61+
<argument name="shippingMethodName" value="Flat Rate"/>
62+
</actionGroup>
63+
<!-- Go to Order review -->
64+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/>
65+
<waitForPageLoad stepKey="waitForLoadingMask"/>
66+
<waitForPageLoad stepKey="waitForPaymentPageLoad"/>
67+
<!-- Apply Discount Coupon to the Order -->
68+
<actionGroup ref="StorefrontApplyDiscountCodeActionGroup" stepKey="applyDiscountCoupon">
69+
<argument name="discountCode" value="$createCouponForCartPriceRule.code$"/>
70+
</actionGroup>
71+
<!--Place an order-->
72+
<actionGroup ref="ClickPlaceOrderActionGroup" after="fillCardData" stepKey="clickOnPlaceOrder"/>
73+
</test>
74+
</tests>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminConfigurePayPalPayflowProActionGroup" extends="AdminPayPalPayflowProWithValutActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal Payflow pro credentials and other details. Clicks on Save.</description>
14+
</annotations>
15+
<remove keyForRemoval="enableSolutionValut"/>
16+
</actionGroup>
17+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal Payflow pro credentials and other details. Clicks on Save.</description>
1414
</annotations>
1515
<arguments>
16-
<argument name="credentials" defaultValue="_CREDS"/>
16+
<argument name="credentials" defaultValue="SamplePaypalPaymentsProConfig"/>
1717
<argument name="countryCode" type="string" defaultValue="us"/>
1818
</arguments>
1919
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
9+
<suite name="ConfigurePaypalPayflowPro">
10+
<before>
11+
<!-- Login -->
12+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
13+
<!--Config PayPal Payflow Pro-->
14+
<actionGroup ref="AdminConfigurePayPalPayflowProActionGroup" stepKey="configPaypalPayflowPro">
15+
<argument name="credentials" value="SamplePaypalPaymentsProConfig"/>
16+
</actionGroup>
17+
</before>
18+
<after>
19+
<!-- Cleanup Paypal configurations -->
20+
<createData entity="RollbackPaypalPayflowPro" stepKey="rollbackPaypalPayflowProConfig"/>
21+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
22+
<argument name="tags" value="config full_page"/>
23+
</actionGroup>
24+
</after>
25+
<include>
26+
<group name="paypalPayflowPro"/>
27+
</include>
28+
</suite>
29+
</suites>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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="ApplyGiftsCardsAndCouponCodesInWidgetIsShownOnOrderReviewPageForPayflowProTest">
12+
<annotations>
13+
<features value="Payments"/>
14+
<stories value="Payflow Pro"/>
15+
<title value="Apply gift cards or promo codes widget is shown on Order review page for Payflow Pro"/>
16+
<description value="As a guest, apply coupon and gift card while placing an order through paypal payflow pro"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-5199"/>
19+
<group value="paypalPayflowPro"/>
20+
<group value="3rd_party_integration"/>
21+
</annotations>
22+
<!-- Checkout select Credit Card (Payflow Pro) and place order-->
23+
<conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectPaymentMethod"/>
24+
<waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/>
25+
<!--Fill Card Data -->
26+
<actionGroup ref="StorefrontPaypalFillCardDataActionGroup" after="selectPaymentMethod" stepKey="fillCardData">
27+
<argument name="cardData" value="VisaDefaultCard"/>
28+
</actionGroup>
29+
</test>
30+
</tests>

0 commit comments

Comments
 (0)