Skip to content

Commit 9ded95f

Browse files
ACQE-6444:Product Price with tax calculation displays on Paypal Pay Later message in Product page
1 parent 6a18520 commit 9ded95f

File tree

2 files changed

+102
-0
lines changed

2 files changed

+102
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="StorefrontPayPalPayLaterSection">
12+
<element name="payPalPayLaterMessage" type="text" selector="//p[contains(@class,'PayLater')]/span[1]" />
13+
</section>
14+
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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="StorefrontProductPriceWithTaxDisplayedInPayPalPayLaterMessageTest">
12+
<annotations>
13+
<features value="Paypal"/>
14+
<stories value="Payment methods"/>
15+
<title value="Product Price with tax calculation displays on Paypal Pay Later message in Product page"/>
16+
<description value="Product Price with tax calculation displays on Paypal Pay Later message in Product page"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="AC-5616"/>
19+
<group value="3rd_party_integration" />
20+
<!-- <group value="pr_exclude" />-->
21+
</annotations>
22+
<before>
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
24+
<createData entity="_defaultCategory" stepKey="createCategory"/>
25+
<createData entity="SimpleProduct" stepKey="createProduct">
26+
<field key="price">100.00</field>
27+
</createData>
28+
<actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="configPayPalExpress">
29+
<argument name="credentials" value="SamplePaypalExpressConfig2"/>
30+
</actionGroup>
31+
<!-- <actionGroup ref="AdminEnablePayPalExpressCheckoutPayLaterActionGroup" stepKey="enablePayPalPayLater"/>-->
32+
<actionGroup ref="AdminPayPalExpressCheckoutPayLaterEnableActionGroup" stepKey="activePayLater">
33+
<argument name="countryCode" value="us"/>
34+
</actionGroup>
35+
</before>
36+
<after>
37+
<!-- Delete Product -->
38+
<deleteData stepKey="deleteCategory" createDataKey="createCategory"/>
39+
<deleteData stepKey="deleteProduct" createDataKey="createProduct"/>
40+
<!-- Disable Paypal -->
41+
<actionGroup ref="AdminPayPalExpressCheckoutDisableActionGroup" stepKey="configPaypalExpressCheckoutDisable"/>
42+
<!-- Revert to default tax setting-->
43+
<magentoCLI command="config:set tax/calculation/price_includes_tax 0" stepKey="disableCatalogIncludingTax"/>
44+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
45+
</after>
46+
<!-- Go to StoreFront -->
47+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
48+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
49+
<argument name="indices" value=""/>
50+
</actionGroup>
51+
<waitForPageLoad stepKey="waitForProductToLoad"/>
52+
<!-- Add simple product to cart -->
53+
<actionGroup ref="StorefrontAddSimpleProductWithQtyActionGroup" stepKey="addSimpleProductToCart">
54+
<argument name="product" value="$$createProduct$$"/>
55+
<argument name="quantity" value="1"/>
56+
</actionGroup>
57+
<!-- Open mini cart from product page -->
58+
<actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openMiniShoppingCart"/>
59+
<!--Click Paypal button-->
60+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"/>
61+
<!--Login to Paypal in-context-->
62+
<actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="loginToPayPal"/>
63+
<!--Scroll down to paypal pay later option and verify message-->
64+
<waitForText userInput="4 payments of $25.00 due every 2 weeks, starting today." selector="{{StorefrontPayPalPayLaterSection.payPalPayLaterMessage}}" stepKey="verifyPayPalPayLaterMessage1"/>
65+
<closeTab stepKey="closeCurrentTab"/>
66+
<!-- Set up catalog to store product price including tax -->
67+
<magentoCLI command="config:set tax/calculation/price_includes_tax 1" stepKey="enableCatalogIncludingTax"/>
68+
<!-- Go to StoreFront -->
69+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFrontAgain"/>
70+
<!-- Empty the cart -->
71+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openShoppingCartPage"/>
72+
<actionGroup ref="DeleteProductFromShoppingCartActionGroup" stepKey="deleteFirstProductFromCart">
73+
<argument name="productName" value="$$createProduct.name$"/>
74+
</actionGroup>
75+
<!-- Add simple product to cart -->
76+
<actionGroup ref="StorefrontAddSimpleProductWithQtyActionGroup" stepKey="addSimpleProductToCartAgain">
77+
<argument name="product" value="$$createProduct$$"/>
78+
<argument name="quantity" value="1"/>
79+
</actionGroup>
80+
<!-- Open mini cart from product page -->
81+
<actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openMiniShoppingCartAgain"/>
82+
<!--Click Paypal button-->
83+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtnAgain"/>
84+
<!--Scroll down to paypal pay later option and verify message-->
85+
<switchToNextTab stepKey="switchToInContentTab"/>
86+
<waitForText userInput="4 payments of $23.10 due every 2 weeks, starting today." selector="{{StorefrontPayPalPayLaterSection.payPalPayLaterMessage}}" stepKey="verifyPayPalPayLaterMessageAfterTax"/>
87+
</test>
88+
</tests>

0 commit comments

Comments
 (0)