Skip to content

Commit 10a23b1

Browse files
akaashakaash
authored andcommitted
Merge branch 'ACQE-5769' into functional-mainline-pr-ce-new
2 parents eb047d2 + aedacc9 commit 10a23b1

File tree

3 files changed

+120
-0
lines changed

3 files changed

+120
-0
lines changed
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="AdminPayPalPayflowProActionGroup" extends="AdminPayPalPayflowProWithValutActionGroup">
12+
<annotations>
13+
<description>Go to the 'Configuration' page for 'Payment Methods'. Fill 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>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
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="StoreFrontGuestCheckoutWithPayPalPayflowProCreditCardWithSeveralProductsTest">
12+
<annotations>
13+
<stories value="Payflow Pro"/>
14+
<title value="Guest Checkout with PayPal Payflow Pro credit card with several products"/>
15+
<description value="As a guest, place an order using paypal payflow pro and assert the order details in order view page in the admin site"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-5272"/>
18+
</annotations>
19+
<before>
20+
<createData entity="SimpleProduct" stepKey="createSimpleProduct1"/>
21+
<createData entity="SimpleProduct" stepKey="createSimpleProduct2"/>
22+
<createData entity="SimpleProduct" stepKey="createSimpleProduct3"/>
23+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25+
<actionGroup ref="AdminPayPalPayflowProActionGroup" stepKey="configPaypalPayflowPro">
26+
<argument name="credentials" value="SamplePaypalPaymentsProConfig"/>
27+
</actionGroup>
28+
</before>
29+
<after>
30+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/>
31+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/>
32+
<createData entity="RollbackPaypalPayflowPro" stepKey="rollbackPaypalPayflowProConfig"/>
33+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
34+
<deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct"/>
35+
<deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/>
36+
<deleteData createDataKey="createSimpleProduct3" stepKey="deleteSimpleProduct3"/>
37+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
38+
</after>
39+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
40+
<!--Open product1 in storefront and add it to cart-->
41+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="gotToProduct1Page">
42+
<argument name="product" value="$$createSimpleProduct1$$"/>
43+
</actionGroup>
44+
<actionGroup ref="StorefrontAddToTheCartActionGroup" stepKey="addProduct1ToCart">
45+
<argument name="product" value="$$createSimpleProduct1$$"/>
46+
</actionGroup>
47+
<!--Open product2 in storefront and add it to cart-->
48+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="gotToProduct2Page">
49+
<argument name="product" value="$$createSimpleProduct2$$"/>
50+
</actionGroup>
51+
<actionGroup ref="StorefrontAddToTheCartActionGroup" stepKey="addProduct2ToCart">
52+
<argument name="product" value="$$createSimpleProduct2$$"/>
53+
</actionGroup>
54+
<!--Open product3 in storefront and add it to cart-->
55+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="gotToProduct3Page">
56+
<argument name="product" value="$$createSimpleProduct3$$"/>
57+
</actionGroup>
58+
<actionGroup ref="StorefrontAddToTheCartActionGroup" stepKey="addProduct3ToCart">
59+
<argument name="product" value="$$createSimpleProduct3$$"/>
60+
</actionGroup>
61+
<!--Open cart page and proceed to checkout-->
62+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckoutCartPage"/>
63+
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/>
64+
<!--Fill Shipping Address-->
65+
<actionGroup ref="GuestCheckoutFillNewShippingAddressActionGroup" stepKey="fillShippingAddress">
66+
<argument name="customer" value="$$createCustomer$$" />
67+
<argument name="address" value="US_Address_TX"/>
68+
</actionGroup>
69+
<!-- Select shipping -->
70+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectShippingMethodAsFlatRate">
71+
<argument name="shippingMethodName" value="Flat Rate"/>
72+
</actionGroup>
73+
<!-- Go to Order review -->
74+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/>
75+
<waitForPageLoad stepKey="waitForLoadingMask"/>
76+
<!-- Checkout select Credit Card (Payflow Pro) and place order-->
77+
<conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" visible="true" stepKey="selectPaymentMethod"/>
78+
<waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/>
79+
<!--Fill Card Data -->
80+
<actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDetails">
81+
<argument name="cardData" value="VisaDefaultCard"/>
82+
</actionGroup>
83+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/>
84+
<waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumberToBeGrabbed"/>
85+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
86+
<waitForText selector="{{CheckoutSuccessMainSection.success}}" userInput="We'll email you an order confirmation with details and tracking info." stepKey="seeSuccessMessage"/>
87+
<waitForText selector="{{CheckoutSuccessMainSection.orderNumberText}}" userInput="Your order # is: " stepKey="seeOrderMessageWithOrderId"/>
88+
<actionGroup ref="AssertShoppingCartIsEmptyActionGroup" stepKey="seeEmptyShoppingCartAfterPlacingAnOrder"/>
89+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder">
90+
<argument name="orderId" value="{$grabOrderNumber}"/>
91+
</actionGroup>
92+
<waitForElementVisible selector="{{AdminOrderPaymentInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="waitForTransactionIDFieldToBeAppeared"/>
93+
<grabTextFrom selector="{{AdminOrderPaymentInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabATransactionID"/>
94+
<actionGroup ref="AdminAssertTotalsOnOrderViewPageActionGroup" stepKey="checkSubtotal">
95+
<argument name="subtotal" value="$369.00"/>
96+
<argument name="shippingAndHandling" value="$15.00"/>
97+
<argument name="grandTotal" value="384.00"/>
98+
</actionGroup>
99+
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistory"/>
100+
<waitForText selector="{{AdminOrderCommentsTabSection.orderComment}}" userInput="Authorized amount of $384.00. Transaction ID: &quot;{$grabATransactionID}&quot;" stepKey="seeOrderHistoryNotes"/>
101+
</test>
102+
</tests>

app/code/Magento/Sales/Test/Mftf/Section/AdminOrderPaymentInformationSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<element name="paymentMethod" type="text" selector=".order-payment-method .order-payment-method-title"/>
1313
<element name="paymentCurrency" type="text" selector=".order-payment-method .order-payment-currency"/>
1414
<element name="paymentAdditional" type="text" selector=".order-payment-method .order-payment-additional"/>
15+
<element name="paymentInformationField" type="text" selector="//*[contains(text(),'{{paymentInformationField}}')]/following-sibling::td" parameterized="true"/>
1516
</section>
1617
</sections>

0 commit comments

Comments
 (0)