Skip to content

Commit 35ed20a

Browse files
akaashakaash
authored andcommitted
Conflict Resolve
2 parents 6252794 + 7bb4d91 commit 35ed20a

File tree

2 files changed

+115
-0
lines changed

2 files changed

+115
-0
lines changed
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="GuestCheckoutUsingPayPalExpressCheckoutTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Paypal express checkout configuration"/>
14+
<title value="Paypal Express Checkout configuration with valid credentials"/>
15+
<description value="As a customer I want to be able to buy goods using PayPal express with Free Shipping"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-6150"/>
18+
<group value="3rd_party_integration"/>
19+
<group value="paypalExpress"/>
20+
<group value="pr_exclude"/>
21+
</annotations>
22+
<before>
23+
<!-- Simple product is created -->
24+
<createData entity="simpleProductWithoutCategory" stepKey="createProduct">
25+
<field key="price">10.00</field>
26+
</createData>
27+
<!-- US Customer is created -->
28+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
29+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
30+
<!--Add new tax rates. Go to tax rule page -->
31+
<actionGroup ref="AddNewTaxRuleActionGroup" stepKey="addFirstTaxRuleActionGroup"/>
32+
<fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="{{TaxRule.name}}"/>
33+
<!-- Adding product rate tax for NY -->
34+
<actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addProductTaxRateForCA">
35+
<argument name="taxCode" value="SimpleTaxTexas"/>
36+
</actionGroup>
37+
<!-- Save Tax Rule -->
38+
<actionGroup ref="ClickSaveButtonActionGroup" stepKey="saveAnotherTaxRule">
39+
<argument name="message" value="You saved the tax rule."/>
40+
</actionGroup>
41+
<!-- Enable free shipping method -->
42+
<magentoCLI command="config:set {{EnableFreeShippingConfigData.path}} {{EnableFreeShippingConfigData.value}}" stepKey="enableFreeShipping"/>
43+
<!-- Disable flat rate method -->
44+
<magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/>
45+
</before>
46+
<after>
47+
<!-- Roll back configuration -->
48+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
49+
<magentoCLI command="config:set {{DisableFreeShippingConfigData.path}} {{DisableFreeShippingConfigData.value}}" stepKey="disableFreeShipping"/>
50+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
51+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
52+
<!-- Go to the tax rule page and delete the row created-->
53+
<actionGroup ref="AdminTaxRuleGridOpenPageActionGroup" stepKey="goToTaxRulesPageA"/>
54+
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule">
55+
<argument name="name" value="{{TaxRule.name}}"/>
56+
<argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/>
57+
</actionGroup>
58+
<!-- Deleting Tax zones and rate for Product Tax -->
59+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToStoresTaxZonesAndRatesPage">
60+
<argument name="menuUiId" value="{{AdminMenuStores.dataUiId}}"/>
61+
<argument name="submenuUiId" value="{{AdminMenuStoresTaxZonesAndRates.dataUiId}}"/>
62+
</actionGroup>
63+
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteProductTaxRule1">
64+
<argument name="name" value="{{SimpleTaxTexas.identifier}}-{{SimpleTaxTexas.rate}}"/>
65+
<argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/>
66+
</actionGroup>
67+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
68+
</after>
69+
<!-- Navigate to StoreFront -->
70+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
71+
<!-- Add product to cart -->
72+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
73+
<argument name="product" value="$$createProduct$$"/>
74+
</actionGroup>
75+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/>
76+
<!--Fill Shipping Address-->
77+
<actionGroup ref="FillGuestCheckoutShippingAddressFormActionGroup" stepKey="fillShippingAddress"/>
78+
<selectOption selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="Texas" stepKey="fillState"/>
79+
<waitForPageLoad stepKey="waitForShippingPageToLoad"/>
80+
<!-- Select Free Shipping -->
81+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="setShippingMethodFreeShipping">
82+
<argument name="shippingMethodName" value="Free Shipping"/>
83+
</actionGroup>
84+
<!-- Click Next button -->
85+
<actionGroup ref="StorefrontGuestCheckoutProceedToPaymentStepActionGroup" stepKey="clickNext"/>
86+
<!-- Click on PayPal payment radio button -->
87+
<waitForElementClickable selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="waitForPayPalRadioButton"/>
88+
<click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="selectPaypalPayment"/>
89+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"/>
90+
<!-- Login to Paypal in-context and verify order total on paypal page-->
91+
<actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="loginToPayPal"/>
92+
<actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="confirmPaymentAndGoBackToMagento"/>
93+
<waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumberToBeGrabbed"/>
94+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
95+
<waitForText selector="{{CheckoutSuccessMainSection.success}}" userInput="We'll email you an order confirmation with details and tracking info." stepKey="seeSuccessMessage"/>
96+
<!--Assert order in orders grid -->
97+
<!-- Go to order page -->
98+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openFirstOrderPage">
99+
<argument name="orderId" value="{$grabOrderNumber}"/>
100+
</actionGroup>
101+
<!-- Check status -->
102+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeAdminOrderStatus">
103+
<argument name="status" value="Processing"/>
104+
</actionGroup>
105+
<waitForText selector="{{AdminOrderTotalSection.grandTotal}}" userInput="$10.83" stepKey="checkGrandTotal"/>
106+
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistory"/>
107+
<waitForText selector="{{AdminOrderCommentsTabSection.orderComment}}" userInput="Authorized amount of $10.83." stepKey="seeOrderHistoryNotes"/>
108+
</test>
109+
</tests>

app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,11 @@
8585
<data key="country">United States</data>
8686
<data key="zip">10001</data>
8787
<data key="rate">10</data>
88+
<entity name="SimpleTaxTexas" type="tax">
89+
<data key="identifier" unique="suffix" >Texas</data>
90+
<data key="state">Texas</data>
91+
<data key="country">United States</data>
92+
<data key="zip">*</data>
93+
<data key="rate">8.3</data>
8894
</entity>
8995
</entities>

0 commit comments

Comments
 (0)