Skip to content

Commit ce544f3

Browse files
committed
Merge branch 'ACQE-6444' into ACQE-6879-functional-mainline-deployment
2 parents 642e439 + fd342b3 commit ce544f3

File tree

2 files changed

+129
-0
lines changed

2 files changed

+129
-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,115 @@
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 is displayed with Price with tax calculation when Paypal Pay Later option is selected in paypal payment in pay later message "/>
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="loginAsAdmin"/>
24+
<createData entity="SimpleProduct" stepKey="createProduct">
25+
<field key="price">100.00</field>
26+
</createData>
27+
<actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="configPayPalExpress">
28+
<argument name="credentials" value="SamplePaypalExpressConfig2"/>
29+
</actionGroup>
30+
<actionGroup ref="AdminPayPalExpressCheckoutPayLaterEnableActionGroup" stepKey="activatePayLater">
31+
<argument name="countryCode" value="us"/>
32+
</actionGroup>
33+
<!-- Create Tax Rule w/ NY & CA Tax Rates -->
34+
<actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRatesPage"/>
35+
<actionGroup ref="AdminDeleteMultipleTaxRatesActionGroup" stepKey="deleteAllNonDefaultTaxRates"/>
36+
<actionGroup ref="AdminGoToNewTaxRulePageActionGroup" stepKey="goToCreateTaxRulePage"/>
37+
<fillField selector="{{AdminTaxRulesSection.ruleName}}" userInput="{{SimpleTaxRule.code}}" stepKey="fillRuleName"/>
38+
<actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addNYTaxRate">
39+
<argument name="taxCode" value="SimpleTaxNY"/>
40+
</actionGroup>
41+
<actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addCATaxRate">
42+
<argument name="taxCode" value="SimpleTaxCA"/>
43+
</actionGroup>
44+
<actionGroup ref="AdminSaveTaxRuleActionGroup" stepKey="saveTaxRule"/>
45+
</before>
46+
<after>
47+
<!-- Delete Product -->
48+
<deleteData stepKey="deleteProduct" createDataKey="createProduct"/>
49+
<!-- Disable Paypal -->
50+
<actionGroup ref="AdminPayPalExpressCheckoutDisableActionGroup" stepKey="configPaypalExpressCheckoutDisable"/>
51+
<!-- Revert to default tax setting-->
52+
<magentoCLI command="config:set tax/calculation/price_includes_tax 0" stepKey="disableCatalogIncludingTax"/>
53+
<actionGroup ref="AdminTaxRuleGridOpenPageActionGroup" stepKey="goToTaxRulesPage"/>
54+
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule">
55+
<argument name="name" value="{{SimpleTaxRule.code}}"/>
56+
<argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/>
57+
</actionGroup>
58+
<actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRatesPage"/>
59+
<actionGroup ref="AdminDeleteMultipleTaxRatesActionGroup" stepKey="deleteAllNonDefaultTaxRates"/>
60+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
61+
</after>
62+
<!-- Go to StoreFront -->
63+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
64+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
65+
<argument name="indices" value=""/>
66+
</actionGroup>
67+
<waitForPageLoad stepKey="waitForProductToLoad"/>
68+
<!-- Add simple product to cart -->
69+
<actionGroup ref="StorefrontAddSimpleProductWithQtyActionGroup" stepKey="addSimpleProductToCart">
70+
<argument name="product" value="$$createProduct$$"/>
71+
<argument name="quantity" value="1"/>
72+
</actionGroup>
73+
<!-- Open mini cart from product page -->
74+
<actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openMiniShoppingCart"/>
75+
<!--Click Paypal button-->
76+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"/>
77+
<!--Login to Paypal in-context-->
78+
<actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="loginToPayPal"/>
79+
<!--Scroll down to paypal pay later option and verify message-->
80+
<waitForText userInput="4 payments of $25.00 due every 2 weeks, starting today." selector="{{StorefrontPayPalPayLaterSection.payPalPayLaterMessage}}" stepKey="verifyPayPalPayLaterMessage1"/>
81+
<closeTab stepKey="closeCurrentTab"/>
82+
<actionGroup ref="AdminOpenConfigurationStoresPageActionGroup" stepKey="openAdminPage"/>
83+
<!-- Set up catalog to store product price including tax -->
84+
<magentoCLI command="config:set tax/calculation/price_includes_tax 1" stepKey="enableCatalogIncludingTax"/>
85+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexAgain">
86+
<argument name="indices" value=""/>
87+
</actionGroup>
88+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="cleanCache">
89+
<argument name="tags" value=""/>
90+
</actionGroup>
91+
<!-- Go to StoreFront -->
92+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFrontAgain"/>
93+
<!-- Empty the cart -->
94+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openShoppingCartPage"/>
95+
<actionGroup ref="DeleteProductFromShoppingCartActionGroup" stepKey="deleteFirstProductFromCart">
96+
<argument name="productName" value="$$createProduct.name$"/>
97+
</actionGroup>
98+
<!-- Add simple product to cart -->
99+
<actionGroup ref="StorefrontAddSimpleProductWithQtyActionGroup" stepKey="addSimpleProductToCartAgain">
100+
<argument name="product" value="$$createProduct$$"/>
101+
<argument name="quantity" value="1"/>
102+
</actionGroup>
103+
<!-- Open mini cart from product page and verify price -->
104+
<actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openMiniShoppingCartAgain"/>
105+
<actionGroup ref="AssertStorefrontMiniCartSubtotalActionGroup" stepKey="assertSubtotal">
106+
<argument name="subtotal" value="$92.38"/>
107+
</actionGroup>
108+
<!--Click Paypal button-->
109+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtnAgain"/>
110+
<!--Scroll down to paypal pay later option and verify message-->
111+
<switchToNextTab stepKey="switchToInContentTab"/>
112+
<waitForText userInput="4 payments of $23.10 due every 2 weeks, starting today." selector="{{StorefrontPayPalPayLaterSection.payPalPayLaterMessage}}" stepKey="verifyPayPalPayLaterMessageAfterTax"/>
113+
</test>
114+
</tests>
115+

0 commit comments

Comments
 (0)