Skip to content

Commit f2691bf

Browse files
Merge pull request #8783 from magento-gl/ACQE-6192_mainline_PR_deployment
[Bengals Team] Test Fixes and Automation Tasks
2 parents 57a3231 + ff8667b commit f2691bf

17 files changed

+288
-4
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategorySidebarMobileMenuTest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
<createData entity="NewSubCategoryWithParent" stepKey="createSubCategory">
2727
<requiredEntity createDataKey="createParentCategory"/>
2828
</createData>
29+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexToReflectNewCategory">
30+
<argument name="indices" value=""/>
31+
</actionGroup>
32+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCacheToReflectNewCategory">
33+
<argument name="tags" value="config full_page"/>
34+
</actionGroup>
2935
</before>
3036
<after>
3137
<!-- Reset the window size to its original state -->

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
<argument name="country" value="Afghanistan"/>
7575
<argument name="placeNumber" value="2"/>
7676
</actionGroup>
77-
7877
<after>
7978
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
8079

app/code/Magento/Directory/Test/Mftf/Test/CustomCurrencySymbolWithSpaceTest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@
7272
<actionGroup ref="AdminReloadDashboardDataActionGroup" stepKey="reloadDashboardData" />
7373
<!--Verify there is a space between custom currency symbol respective amounts on admin dashboard-->
7474
<grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Revenue')}}" stepKey="grabStartQuantity"/>
75-
<assertEquals stepKey="assertInputIsDisabled">
75+
<assertRegExp stepKey="assertInputIsDisabled">
7676
<actualResult type="const">$grabStartQuantity</actualResult>
77-
<expectedResult type="string">IDRx 0.00</expectedResult>
78-
</assertEquals>
77+
<expectedResult type="string">/IDRx \d+\.\d+/</expectedResult>
78+
</assertRegExp>
7979

8080
<!--Verify Category in store front page-->
8181
<amOnPage url="{{StorefrontCategoryPage.url($createDefaultCategory.custom_attributes[url_key]$)}}" stepKey="openStorefrontCategoryPage"/>

app/code/Magento/OrderCancellationUi/Test/Mftf/Test/CustomerOrderCancellationFromRecentOrdersTest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@
3939
<createData entity="CustomerCart" stepKey="createCustomerCart">
4040
<requiredEntity createDataKey="createCustomer"/>
4141
</createData>
42+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="performReindex">
43+
<argument name="indices" value=""/>
44+
</actionGroup>
45+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
46+
<argument name="tags" value=""/>
47+
</actionGroup>
4248
<createData entity="CustomerCartItem" stepKey="addCartItemOne">
4349
<requiredEntity createDataKey="createCustomerCart"/>
4450
<requiredEntity createDataKey="createSimpleProduct"/>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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="AdminConfigurePayPalPaymentsProActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal credentials and other details. Clicks on Save.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="credentials" defaultValue="SamplePaypalPaymentsProConfig"/>
17+
<argument name="countryCode" type="string" defaultValue="us"/>
18+
</arguments>
19+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
20+
<waitForPageLoad stepKey="waitForConfigPageLoad"/>
21+
<waitForElementClickable selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="waitForConfigureButtonToBeClicked"/>
22+
<click selector ="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="expandOtherPaypalConfigButton"/>
23+
<scrollTo selector="{{PayPalPaymentsProConfigSection.paymentsAdvanced(countryCode)}}" stepKey="scrollToConfigure"/>
24+
<waitForElementClickable selector="{{PayPalPaymentsProConfigSection.configureBtn(countryCode)}}" stepKey="waitForPayPalPaymentsProConfigureBtn"/>
25+
<click selector ="{{PayPalPaymentsProConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalPaymentsProConfigureBtn"/>
26+
<scrollTo selector="{{PayPalPaymentsProConfigSection.partner(countryCode)}}" stepKey="scrollToBottom"/>
27+
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.partner(countryCode)}}" stepKey="waitForPartner"/>
28+
<fillField selector ="{{PayPalPaymentsProConfigSection.partner(countryCode)}}" userInput="{{credentials.paypal_paymentspro_parner}}" stepKey="inputPartner"/>
29+
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.user(countryCode)}}" stepKey="waitForUser"/>
30+
<fillField selector ="{{PayPalPaymentsProConfigSection.user(countryCode)}}" userInput="{{credentials.paypal_paymentspro_user}}" stepKey="inputUser"/>
31+
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.vendor(countryCode)}}" stepKey="waitForVendor"/>
32+
<fillField selector ="{{PayPalPaymentsProConfigSection.vendor(countryCode)}}" userInput="{{credentials.paypal_paymentspro_vendor}}" stepKey="inputVendor"/>
33+
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.password(countryCode)}}" stepKey="waitForPassword"/>
34+
<fillField selector ="{{PayPalPaymentsProConfigSection.password(countryCode)}}" userInput="{{credentials.paypal_paymentspro_password}}" stepKey="inputPassword"/>
35+
<selectOption selector="{{PayPalPaymentsProConfigSection.testMode(countryCode)}}" userInput="Yes" stepKey="enableTestMode"/>
36+
<selectOption selector ="{{PayPalPaymentsProConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/>
37+
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForSaveButtonBecomeClickable"/>
38+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
39+
<waitForPageLoad stepKey="waitForSaving"/>
40+
<waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeConfigSuccessMessage"/>
41+
</actionGroup>
42+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontCheckoutSelectPaypalPaymentMethodActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<arguments>
1616
<argument name="paymentMethod" defaultValue="{{StorefrontPaypalCheckoutSection.creditCard}}" type="string"/>
1717
</arguments>
18+
<waitForElementClickable selector="{{paymentMethod}}" stepKey="waitForPaypalPaymentMethod"/>
1819
<click selector="{{paymentMethod}}" stepKey="selectPaypalPaymentMethod"/>
1920
<waitForPageLoad stepKey="waitForPaypalFormLoad"/>
2021
<scrollTo selector="{{paymentMethod}}" stepKey="scrollToCreditCardSection"/>
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
<section name="PayPalPaymentsProConfigSection">
11+
<element name="configureBtn" type="button" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk-head" parameterized="true"/>
12+
<element name="partner" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_settings_partner" parameterized="true"/>
13+
<element name="user" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_settings_user" parameterized="true"/>
14+
<element name="vendor" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_settings_vendor" parameterized="true"/>
15+
<element name="password" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_settings_pwd" parameterized="true"/>
16+
<element name="testMode" type="select" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_settings_sandbox_flag" parameterized="true"/>
17+
<element name="enableSolution" type="select" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_enable_paypal_payflow" parameterized="true"/>
18+
<element name="paymentsAdvanced" type="button" selector="#payment_{{countryCode}}_paypal_group_all_in_one_payflow_advanced-head" parameterized="true"/>
19+
</section>
20+
</sections>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
9+
<suite name="ConfigurePaypalPaymentsProSuite">
10+
<before>
11+
<!-- Login -->
12+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
13+
<!--Config PayPal Payments Pro-->
14+
<actionGroup ref="AdminConfigurePayPalPaymentsProActionGroup" stepKey="configPayPalPaymentsPro">
15+
<argument name="credentials" value="SamplePaypalPaymentsProConfig"/>
16+
</actionGroup>
17+
</before>
18+
<after>
19+
<!-- Cleanup Paypal configurations -->
20+
<magentoCLI command="config:set payment/paypal_payment_pro/active 0" stepKey="disablePayPalPaymentsPro"/>
21+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
22+
<argument name="tags" value="config full_page"/>
23+
</actionGroup>
24+
</after>
25+
<include>
26+
<group name="paypalPaymentsPro"/>
27+
</include>
28+
</suite>
29+
</suites>
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
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="VoidASalesOrderPlacedWithPayPalPaymentsProTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Paypal Payments Pro"/>
14+
<title value="Void a Sales Order placed with PayPal Payments Pro"/>
15+
<description value="Void a Sales Order placed with PayPal Payments Pro and validate message in trasaction tab from backend "/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-5461"/>
18+
<group value="paypalPaymentsPro"/>
19+
<group value="3rd_party_integration"/>
20+
</annotations>
21+
<before>
22+
<createData entity="SimpleProduct" stepKey="createSimpleProduct"/>
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24+
<!-- Go to product 1 and add it to cart -->
25+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToProductOnStorefront">
26+
<argument name="product" value="$$createSimpleProduct$$"/>
27+
</actionGroup>
28+
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
29+
<argument name="productName" value="$createSimpleProduct.name$"/>
30+
</actionGroup>
31+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckoutCartPage"/>
32+
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/>
33+
<!--Place order-->
34+
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping">
35+
<argument name="shippingMethod" value="Flat Rate"/>
36+
</actionGroup>
37+
<actionGroup ref="StorefrontCheckoutSelectPaypalPaymentMethodActionGroup" stepKey="selectPaypalPaymentMethod"/>
38+
<waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/>
39+
<actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal">
40+
<argument name="cardData" value="VisaDefaultCard"/>
41+
</actionGroup>
42+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/>
43+
<waitForText selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/>
44+
<waitForText selector="{{CheckoutSuccessMainSection.success}}" userInput="We'll email you an order confirmation with details and tracking info." stepKey="seeSuccessMessage"/>
45+
<waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumber"/>
46+
</before>
47+
<after>
48+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/>
49+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clickOnRemoveButtonToUnFiltersIfPresent"/>
50+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
51+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
52+
</after>
53+
<!--Open order in sales -->
54+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
55+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder">
56+
<argument name="orderId" value="{$grabOrderNumber}"/>
57+
</actionGroup>
58+
<actionGroup ref="AdminAssertTotalsOnOrderViewPageActionGroup" stepKey="checkSubtotal">
59+
<argument name="subtotal" value="$123.00"/>
60+
<argument name="shippingAndHandling" value="$5.00"/>
61+
<argument name="grandTotal" value="$128.00"/>
62+
</actionGroup>
63+
<!--Void created order -->
64+
<actionGroup ref="AdminVoidPendingOrderActionGroup" stepKey="voidPendingOrder"/>
65+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="checkOrderStatus">
66+
<argument name="status" value="Processing"/>
67+
</actionGroup>
68+
<!--Grab transaction ids -->
69+
<waitForElementVisible selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="waitForGrabLastTransactionID"/>
70+
<grabTextFrom selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabLastTransactionID"/>
71+
<waitForElementVisible selector="{{AdminOrderNotesSection.voidAuthorizationNotes('$grabLastTransactionID')}}" stepKey="waitForVoidAuthorizationNotesWithID"/>
72+
<grabTextFrom selector="{{AdminOrderNotesSection.voidAuthorizationNotes('$grabLastTransactionID')}}" stepKey="getVoidAuthorizationNotesWithID"/>
73+
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistoryTab"/>
74+
<waitForText selector="{{AdminOrderCommentsTabSection.authorizationNotes('Voided')}}" userInput="$getVoidAuthorizationNotesWithID" stepKey="seeOrderHistoryNotes"/>
75+
<!-- Check the last transaction of the order and validate the details for Void and Authorization-->
76+
<actionGroup ref="AdminViewTransactionsInOrderActionGroup" stepKey="validateVoidTransaction"/>
77+
<waitForText selector="{{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput="Yes" stepKey="seeIfClosedHeaderIsSetAsYesForVoid"/>
78+
<waitForElementClickable selector="{{AdminProductFormActionSection.backButton}}" stepKey="waitForBackButtonToBeClicked"/>
79+
<click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackButton"/>
80+
<actionGroup ref="AdminViewAuthorizationTransactionsInOrderActionGroup" stepKey="validateAuthTransaction"/>
81+
<waitForText selector="{{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput="Yes" stepKey="seeIfClosedHeaderIsSetAsYesForAuthorization"/>
82+
</test>
83+
</tests>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminViewAuthorizationTransactionsInOrderActionGroup" extends="AdminViewTransactionsInOrderActionGroup">
11+
<annotations>
12+
<description>Click the Transactions button on the Order Details page and validate authorization transaction</description>
13+
</annotations>
14+
<remove keyForRemoval="selectVoidTypeTxn"/>
15+
<remove keyForRemoval="assertEquals"/>
16+
<waitForElementVisible selector="{{AdminTransactionsGridSection.orderTxnTableTypeFilter}}" after="orderTransactionsTableIsVisible" stepKey="waitForTransactionTypeAuthorizationToBeClicked"/>
17+
<selectOption selector="{{AdminTransactionsGridSection.orderTxnTableTypeFilter}}" userInput="authorization" after="orderTransactionsTableIsVisible" stepKey="selectAuthorizationTypeTxn" />
18+
<assertRegExp stepKey="assertEquals" message="pass">
19+
<expectedResult type="string">/([0-9a-z\-])*(?&lt;!authorization)$/</expectedResult>
20+
<actualResult type="variable">getVoidTransaction</actualResult>
21+
</assertRegExp>
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminViewTransactionsInOrderActionGroup">
11+
<annotations>
12+
<description>Click the Transactions button on the Order Details page</description>
13+
</annotations>
14+
<waitForElementClickable selector="{{AdminTransactionsGridSection.transactionsSectionBtn}}" stepKey="waitForTransactionsTabToBeClicked"/>
15+
<click selector="{{AdminTransactionsGridSection.transactionsSectionBtn}}" stepKey="clickTransactionsTab"/>
16+
<waitForElementVisible selector="{{AdminTransactionsGridSection.orderTxnTable}}" stepKey="orderTransactionsTableIsVisible"/>
17+
<selectOption selector="{{AdminTransactionsGridSection.orderTxnTableTypeFilter}}" userInput="void" stepKey="selectVoidTypeTxn" />
18+
<waitForElementClickable selector="{{AdminTransactionsGridSection.orderTxnTableSearchBtn}}" stepKey="waitToClickSearch"/>
19+
<click selector="{{AdminTransactionsGridSection.orderTxnTableSearchBtn}}" stepKey="clickSearch"/>
20+
<waitForPageLoad stepKey="waitForFilterToLoad"/>
21+
<waitForElementClickable selector="{{AdminTransactionsGridSection.orderTxnTableFirstRow}}" stepKey="clickOnVoidTransaction"/>
22+
<click selector="{{AdminTransactionsGridSection.orderTxnTableFirstRow}}" stepKey="clickVoidTxn"/>
23+
<waitForPageLoad stepKey="waitForTxnToLoad"/>
24+
<grabTextFrom selector="{{AdminTransactionsGridSection.transactionData('Transaction ID')}}" stepKey="getVoidTransaction"/>
25+
<assertRegExp stepKey="assertEquals" message="pass">
26+
<expectedResult type="string">/([0-9a-z\-])*(?&lt;!void)$/</expectedResult>
27+
<actualResult type="variable">getVoidTransaction</actualResult>
28+
</assertRegExp>
29+
</actionGroup>
30+
</actionGroups>

0 commit comments

Comments
 (0)