Skip to content

Commit 4f5b2bf

Browse files
committed
ACQE-6370: Registered Customers uses Paypal Express Checkout configuration with valid credentials
- Created new test file
1 parent 4f82be7 commit 4f5b2bf

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
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="AdminRegisteredCustomerCheckoutUsingPayPalExpressCheckoutTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Registered Customers Paypal express checkout configuration"/>
14+
<title value="Registered Customers uses Paypal Express Checkout configuration with valid credentials"/>
15+
<description value="As a registered customer I want to be able to buy goods using PayPal express with Flat rate Shipping"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-5246"/>
18+
<group value="3rd_party_integration"/>
19+
<group value="paypalExpress"/>
20+
</annotations>
21+
<before>
22+
<!-- Precondition1: create Simple product -->
23+
<createData entity="simpleProductWithoutCategory" stepKey="createProduct">
24+
<field key="price">10.00</field>
25+
</createData>
26+
<!-- Precondition2: create customer -->
27+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
28+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
29+
</before>
30+
<after>
31+
<!-- delete created data -->
32+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
33+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
34+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
35+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
36+
</after>
37+
<!-- Step1: Login to storefront as a customer -->
38+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
39+
<argument name="Customer" value="$$createCustomer$$"/>
40+
</actionGroup>
41+
<!-- Step2: Add product to cart and got to checkout page -->
42+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
43+
<argument name="product" value="$$createProduct$$"/>
44+
</actionGroup>
45+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/>
46+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/>
47+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextOnShippingStep"/>
48+
<!-- Step3&4&5: Checkout with PayPal -->
49+
<waitForElementClickable selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="waitForPayPalRadioButton"/>
50+
<click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="selectPaypalPayment"/>
51+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"/>
52+
<!-- Login to PayPal in-context and verify order total on PayPal page-->
53+
<actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="loginToPayPal"/>
54+
<actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="confirmPaymentAndGoBackToMagento"/>
55+
<waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumberToBeGrabbed"/>
56+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
57+
<waitForText selector="{{CheckoutSuccessMainSection.success}}" userInput="We'll email you an order confirmation with details and tracking info." stepKey="seeSuccessMessage"/>
58+
<!-- Step6&7: Open order and verify amounts -->
59+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openFirstOrderPage">
60+
<argument name="orderId" value="{$grabOrderNumber}"/>
61+
</actionGroup>
62+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeAdminOrderStatus">
63+
<argument name="status" value="Processing"/>
64+
</actionGroup>
65+
<waitForText selector="{{AdminOrderTotalSection.grandTotal}}" userInput="$15.00" stepKey="checkGrandTotal"/>
66+
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistory"/>
67+
<waitForText selector="{{AdminOrderCommentsTabSection.orderComment}}" userInput="Authorized amount of $15.00." stepKey="seeOrderHistoryNotes"/>
68+
<!--Open invoice tab and verify the invoice is present-->
69+
<click selector="{{AdminOrderDetailsOrderViewSection.invoices}}" stepKey="clickOrderInvoicesTab"/>
70+
<waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask"/>
71+
<waitForText selector="{{AdminOrderDetailsMainActionsSection.invoiceTabContent1}}" userInput="We couldn't find any records." stepKey="verifyThereIsNoInvoiceCreated"/>
72+
</test>
73+
</tests>
74+
75+
76+
77+

0 commit comments

Comments
 (0)