Skip to content

Commit da1bb21

Browse files
Merge pull request #9271 from magento-gl/ACQE-7021-functional-tests-mainline-deployment
[Bengals] Mainline Functional Tests Deployment
2 parents a4cf5e6 + 313c1af commit da1bb21

10 files changed

+258
-28
lines changed

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartMessageSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
<element name="emptyCartMessage" type="text" selector=".cart-empty>p"/>
1515
<element name="errorMessageText" type="text" selector="//div[contains(@class, 'message-error')]/div[text()='{{var}}']" parameterized="true"/>
1616
<element name="backorderErrorMessage" type="text" selector=".//*[@class='cart item']//div[@class='cart item message notice']"/>
17+
<element name="invalidAddressError" type="text" selector="//div[contains(text(),'{{errorMessageText}}')]" parameterized="true"/>
1718
</section>
1819
</sections>

app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131

3232
<!-- Create customer -->
3333
<createData entity="Simple_US_Customer_With_Different_Billing_Shipping_Addresses" stepKey="createCustomer"/>
34+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexConfig">
35+
<argument name="indices" value=""/>
36+
</actionGroup>
37+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCacheConfig">
38+
<argument name="tags" value="config full_page"/>
39+
</actionGroup>
3440
</before>
3541
<after>
3642
<!-- Admin log out -->

app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,32 @@
3434
<data key="default_billing">true</data>
3535
<data key="region_qty">66</data>
3636
</entity>
37+
<entity name="CustomerInvalidAddress" type="address">
38+
<data key="id">0</data>
39+
<data key="customer_id">12</data>
40+
<requiredEntity type="region">CustomerRegionOne</requiredEntity>
41+
<data key="region_id">0</data>
42+
<data key="country_id">US</data>
43+
<array key="street">
44+
<item>7700 W Parmer Ln</item>
45+
<item>Bld D</item>
46+
</array>
47+
<data key="company">Magento</data>
48+
<data key="telephone">Invalid Telephone</data>
49+
<data key="fax">1234568910</data>
50+
<data key="postcode">Invalid PostCode</data>
51+
<data key="city">InvalidCity</data>
52+
<data key="state">Texas</data>
53+
<data key="firstname">John</data>
54+
<data key="lastname">Doe</data>
55+
<data key="middlename">string</data>
56+
<data key="prefix">Mr</data>
57+
<data key="suffix">Sr</data>
58+
<data key="vat_id">vatData</data>
59+
<data key="default_shipping">true</data>
60+
<data key="default_billing">true</data>
61+
<data key="region_qty">66</data>
62+
</entity>
3763
<entity name="US_Address_TX" type="address">
3864
<data key="firstname">John</data>
3965
<data key="lastname">Doe</data>

app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyThatCustomersMatchesToASectionWithConditionsOrderAddressTest.xml

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="StorefrontAssertInvalidAddressErrorActionGroup">
12+
<annotations>
13+
<description>Storefront assert invalid address error through PayPal checkout on Checkout, Cart and Mini Cart page</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="invalidAddressError" type="string"/>
17+
</arguments>
18+
<waitForElement selector="{{invalidAddressError}}" stepKey="assertErrorMessage"/>
19+
</actionGroup>
20+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/CheckoutPaymentSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
<element name="expirationYear" type="input" selector="//input[@id='expdate_year']" timeout="10"/>
2727
<element name="cvv" type="input" selector="//input[@id='cvv2_number']" timeout="10"/>
2828
<element name="payNowBtn" type="button" selector="//input[@id='btn_pay_cc']" timeout="10"/>
29+
<element name="invalidAddressError" type="text" selector="div.message.message-error.error" timeout="5"/>
2930
</section>
3031
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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="AdminCreatePartialCaptureForOrderPaidWithPayPalPayflowProTest" extends="StorefrontRegisteredCustomerCheckoutWithPayPalPayflowProCreditCardWithPaymentActionSaleAndVirtualQuoteAndVerifyTheOrderInBackendTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Paypal payflow Pro"/>
14+
<title value="Create partial capture for order paid with PayPal Payflow Pro"/>
15+
<description value="Admin creates partial capture for order paid with PayPal Payflow Pro and assert the transaction in transaction tab"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-5191"/>
18+
<group value="paypalPayflowPro"/>
19+
<group value="3rd_party_integration"/>
20+
<group value="pr_exclude"/>
21+
</annotations>
22+
<before>
23+
<remove keyForRemoval="createVirtualProduct"/>
24+
<remove keyForRemoval="setPaymentActionSale"/>
25+
<remove keyForRemoval="setPaymentActionSale"/>
26+
<!-- Create product -->
27+
<createData entity="SimpleProduct" stepKey="createSimpleProduct" before="loginAsAdmin"/>
28+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex" after="loginAsAdmin">
29+
<argument name="indices" value=""/>
30+
</actionGroup>
31+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache" after="reindex">
32+
<argument name="tags" value="config full_page"/>
33+
</actionGroup>
34+
</before>
35+
<after>
36+
<remove keyForRemoval="deleteVirtualProduct"/>
37+
<remove keyForRemoval="setPaymentActionAuthorization"/>
38+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
39+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
40+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
41+
</after>
42+
<remove keyForRemoval="goToProductOnStorefront"/>
43+
<remove keyForRemoval="addToCartFromStorefrontProductPage"/>
44+
<remove keyForRemoval="assertGrandTotal"/>
45+
<remove keyForRemoval="seeOrderHistoryNotes"/>
46+
<remove keyForRemoval="openTransactionTabOrdersPage"/>
47+
<remove keyForRemoval="getVoidTransaction"/>
48+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToProductOnStorefront">
49+
<argument name="product" value="$$createSimpleProduct$$"/>
50+
</actionGroup>
51+
<fillField userInput="2" selector="{{StorefrontProductPageSection.qtyInput}}" stepKey="fillProductQty" after="goToProductOnStorefront"/>
52+
<!-- Add product to cart -->
53+
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addProductToCartFromStorefrontProductPage" after="fillProductQty">
54+
<argument name="productName" value="$createSimpleProduct.name$"/>
55+
</actionGroup>
56+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage" after="clickProceedToCheckout"/>
57+
<!--Click on invoice button and update qty and then submit invoice-->
58+
<actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceButton" after="openOrder"/>
59+
<actionGroup ref="AdminFillQtyToInvoiceOnCreateInvoicePageActionGroup" stepKey="fillInvoiceQuantity" after="clickInvoiceButton">
60+
<argument name="qty" value="1"/>
61+
</actionGroup>
62+
<actionGroup ref="AdminClickUpdateQtysButtonOnCreateInvoicePageActionGroup" stepKey="clickUpdateQtyAfterUpdatingInvoiceBtn" after="fillInvoiceQuantity"/>
63+
<waitForPageLoad stepKey="waitPageToBeLoaded" after="clickUpdateQtyAfterUpdatingInvoiceBtn"/>
64+
<seeOptionIsSelected userInput="Capture Online" selector="{{AdminInvoiceTotalSection.amount}}" stepKey="seeOptionType" after="waitPageToBeLoaded"/>
65+
<actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice" after="seeOptionType"/>
66+
<waitForPageLoad time="60" stepKey="waitForPageLoadSubmitInvoice" after="clickSubmitInvoice"/>
67+
<!--Check order status and grab transaction id-->
68+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="checkOrderStatus" before="waitForTransactionIDFieldToBeAppeared">
69+
<argument name="status" value="Processing"/>
70+
</actionGroup>
71+
<waitForText selector="{{AdminOrderCommentsTabSection.orderCommentsWithType('Captured')}}" userInput="Captured amount of $133.00 online. Transaction ID: &quot;{$grabTransactionID}&quot;" stepKey="seeOrderHistoryNotesAlongWithAmount" after="clickOnCommentsHistory"/>
72+
<!-- Assert Authorization Transaction-->
73+
<actionGroup ref="AdminAssertTransactionTypeInTransactionTabActionGroup" stepKey="assertAuthorizationTransactionType" after="clickOnBackButton">
74+
<argument name="transactionType" value="authorization"/>
75+
</actionGroup>
76+
<waitForText selector="{{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput="No" stepKey="seeIfClosedHeaderIsSetAsNoForAuthorization" after="assertAuthorizationTransactionType"/>
77+
<waitForElementClickable selector="{{AdminProductFormActionSection.backButton}}" stepKey="waitForBackButtonToBeClickedFromAuthorization" after="seeIfClosedHeaderIsSetAsNoForAuthorization"/>
78+
<click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackButtonFromAuthorization" after="waitForBackButtonToBeClickedFromAuthorization"/>
79+
<!-- Assert Capture Transaction-->
80+
<actionGroup ref="AdminAssertTransactionTypeInTransactionTabActionGroup" after="clickBackButtonFromAuthorization" stepKey="assertCaptureTransactionType">
81+
<argument name="transactionType" value="capture"/>
82+
</actionGroup>
83+
<waitForText selector="{{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput="No" stepKey="seeIfClosedHeaderIsSetAsNoForCapture" after="assertCaptureTransactionType"/>
84+
<waitForElementClickable selector="{{AdminProductFormActionSection.backButton}}" stepKey="waitForBackButtonToBeClickedFromCapture" after="seeIfClosedHeaderIsSetAsNoForCapture"/>
85+
<click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackButtonFromCapture" after="waitForBackButtonToBeClickedFromCapture"/>
86+
</test>
87+
</tests>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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="StorefrontNotifyInvalidAddressToCustomerForPayPalCheckoutTest">
12+
<annotations>
13+
<features value="PayPal"/>
14+
<stories value="Notify invalid address for PayPal checkout"/>
15+
<title value="Customer is notified if address is invalid for PayPal through Checkout flow"/>
16+
<description value="Verify that customer is notified with error message about wrong address for PayPal on all Magento Storefront pages"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-3995"/>
19+
<group value="paypalExpress"/>
20+
<group value="pr_exclude"/>
21+
</annotations>
22+
<before>
23+
<!--Login as Admin-->
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25+
<!--Create product-->
26+
<createData entity="SimpleProduct" stepKey="createProduct"/>
27+
</before>
28+
<after>
29+
<!--Delete product-->
30+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
31+
<!--Logout as Admin-->
32+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/>
33+
</after>
34+
<!--Navigate to storefront home page-->
35+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontHomePage"/>
36+
<!--Open product page-->
37+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openCreatedProductPage">
38+
<argument name="product" value="$$createProduct$$"/>
39+
</actionGroup>
40+
<!--Add product to cart-->
41+
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
42+
<argument name="product" value="$$createProduct$$"/>
43+
<argument name="productCount" value="1"/>
44+
</actionGroup>
45+
<!--Navigate to shopping cart-->
46+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openShoppingCartPage"/>
47+
<!--Navigate to Shipping details page-->
48+
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="goToShippingPage"/>
49+
<!--Enter static shipping details with invalid data-->
50+
<fillField selector="{{CheckoutShippingSection.emailAddress}}" userInput="johndoe@example.com" stepKey="setInvalidCustomerEmail"/>
51+
<fillField selector="{{CheckoutShippingSection.firstName}}" userInput="johndoe@example.com" stepKey="SetInvalidCustomerFirstName"/>
52+
<fillField selector="{{CheckoutShippingSection.lastName}}" userInput="johndoe@example.com" stepKey="SetInvalidCustomerLastName"/>
53+
<fillField selector="{{CheckoutShippingSection.street}}" userInput="johndoe@example.com" stepKey="SetInvalidStreetAddress"/>
54+
<waitForElementVisible selector="{{CheckoutShippingSection.country}}" stepKey="waitToSelectCountry"/>
55+
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="United States" stepKey="selectCountryInStorefrontAddressBook"/>
56+
<actionGroup ref="GuestCheckoutFillNewShippingAddressActionGroup" stepKey="guestCheckoutFillingShippingSection">
57+
<argument name="customer" value="CustomerEntityOne" />
58+
<argument name="address" value="CustomerInvalidAddress" />
59+
</actionGroup>
60+
<!--Select Flat Rate shipping method-->
61+
<waitForElementClickable selector="{{CheckoutShippingMethodsSection.shippingMethodFlatRate}}" stepKey="waitForFlatRateShippingMethod"/>
62+
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/>
63+
<!--Navigate to Review and Payments page-->
64+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToPaymentPage"/>
65+
<!-- click on PayPal payment radio button -->
66+
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPayPalExpressButton"/>
67+
<click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="clickPayPalExpressButton"/>
68+
<!--Switch to paypal group and click on paypal button-->
69+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalButtonFromCheckoutPage"/>
70+
<!--Assert invalid address error from checkout page-->
71+
<actionGroup ref="StorefrontAssertInvalidAddressErrorActionGroup" stepKey="assertInvalidAddressErrorFromCheckoutPage">
72+
<argument name="invalidAddressError" value="{{CheckoutPaymentSection.invalidAddressError}}"/>
73+
</actionGroup>
74+
<!--Navigate to shopping cart-->
75+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openShoppingCartPageForAssertion"/>
76+
<!-- Click on Paypal paypal button on cart page-->
77+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtnFromCartPage">
78+
<argument name="elementNumber" value="1"/>
79+
</actionGroup>
80+
<!--Assert invalid address error from cart page-->
81+
<actionGroup ref="StorefrontAssertInvalidAddressErrorActionGroup" stepKey="assertErrorMessageFromCartPage">
82+
<argument name="invalidAddressError" value="{{CheckoutCartMessageSection.invalidAddressError('PayPal gateway has rejected request. A match of the Shipping Address City, State, and Postal Code failed (#10736: Shipping Address Invalid City State Postal Code)')}}"/>
83+
</actionGroup>
84+
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
85+
<actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="openShoppingCart"/>
86+
<!--Click Paypal button-->
87+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn">
88+
<argument name="elementNumber" value="1"/>
89+
</actionGroup>
90+
<!--Assert invalid address error from mini cart page-->
91+
<actionGroup ref="StorefrontAssertInvalidAddressErrorActionGroup" stepKey="assertErrorMessageFromMiniCartPage">
92+
<argument name="invalidAddressError" value="{{CheckoutCartMessageSection.invalidAddressError('PayPal gateway has rejected request. A match of the Shipping Address City, State, and Postal Code failed (#10736: Shipping Address Invalid City State Postal Code)')}}"/>
93+
</actionGroup>
94+
</test>
95+
</tests>

app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPartialCaptureInvoiceForPaypalExpressPayflowEditionTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<severity value="MAJOR"/>
1717
<testCaseId value="AC-4846"/>
1818
<group value="3rd_party_integration"/>
19+
<group value="pr_exclude"/>
1920
</annotations>
2021
<before>
2122
<!-- Simple product is created -->
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="AdminSwitchStoreViewScopeActionGroup" extends="AdminSwitchStoreViewActionGroup">
12+
<annotations>
13+
<description>Selects the provided "Store View" dropdown menu on the Admin Grid pages other than "Default Store View" as well.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="storeView" defaultValue="customStore.name"/>
17+
</arguments>
18+
<remove keyForRemoval="waitForStoreViewsAreVisible"/>
19+
<waitForElementVisible selector="{{AdminMainActionsSection.storeViewByName(storeView)}}" after="clickStoreViewSwitchDropdown" stepKey="waitForStoreViewsVisible"/>
20+
</actionGroup>
21+
</actionGroups>

0 commit comments

Comments
 (0)