Skip to content

Commit

Permalink
Merge branch '2.4-develop' into Tier4-Kings-PR-03-21-2024
Browse files Browse the repository at this point in the history
  • Loading branch information
lakshmana49 committed Mar 26, 2024
2 parents 4677514 + f2691bf commit 975f233
Show file tree
Hide file tree
Showing 17 changed files with 288 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
<createData entity="NewSubCategoryWithParent" stepKey="createSubCategory">
<requiredEntity createDataKey="createParentCategory"/>
</createData>
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexToReflectNewCategory">
<argument name="indices" value=""/>
</actionGroup>
<actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCacheToReflectNewCategory">
<argument name="tags" value="config full_page"/>
</actionGroup>
</before>
<after>
<!-- Reset the window size to its original state -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
<argument name="country" value="Afghanistan"/>
<argument name="placeNumber" value="2"/>
</actionGroup>

<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
<actionGroup ref="AdminReloadDashboardDataActionGroup" stepKey="reloadDashboardData" />
<!--Verify there is a space between custom currency symbol respective amounts on admin dashboard-->
<grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Revenue')}}" stepKey="grabStartQuantity"/>
<assertEquals stepKey="assertInputIsDisabled">
<assertRegExp stepKey="assertInputIsDisabled">
<actualResult type="const">$grabStartQuantity</actualResult>
<expectedResult type="string">IDRx 0.00</expectedResult>
</assertEquals>
<expectedResult type="string">/IDRx \d+\.\d+/</expectedResult>
</assertRegExp>

<!--Verify Category in store front page-->
<amOnPage url="{{StorefrontCategoryPage.url($createDefaultCategory.custom_attributes[url_key]$)}}" stepKey="openStorefrontCategoryPage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
<createData entity="CustomerCart" stepKey="createCustomerCart">
<requiredEntity createDataKey="createCustomer"/>
</createData>
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="performReindex">
<argument name="indices" value=""/>
</actionGroup>
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
<argument name="tags" value=""/>
</actionGroup>
<createData entity="CustomerCartItem" stepKey="addCartItemOne">
<requiredEntity createDataKey="createCustomerCart"/>
<requiredEntity createDataKey="createSimpleProduct"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminConfigurePayPalPaymentsProActionGroup">
<annotations>
<description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal credentials and other details. Clicks on Save.</description>
</annotations>
<arguments>
<argument name="credentials" defaultValue="SamplePaypalPaymentsProConfig"/>
<argument name="countryCode" type="string" defaultValue="us"/>
</arguments>
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
<waitForPageLoad stepKey="waitForConfigPageLoad"/>
<waitForElementClickable selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="waitForConfigureButtonToBeClicked"/>
<click selector ="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="expandOtherPaypalConfigButton"/>
<scrollTo selector="{{PayPalPaymentsProConfigSection.paymentsAdvanced(countryCode)}}" stepKey="scrollToConfigure"/>
<waitForElementClickable selector="{{PayPalPaymentsProConfigSection.configureBtn(countryCode)}}" stepKey="waitForPayPalPaymentsProConfigureBtn"/>
<click selector ="{{PayPalPaymentsProConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalPaymentsProConfigureBtn"/>
<scrollTo selector="{{PayPalPaymentsProConfigSection.partner(countryCode)}}" stepKey="scrollToBottom"/>
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.partner(countryCode)}}" stepKey="waitForPartner"/>
<fillField selector ="{{PayPalPaymentsProConfigSection.partner(countryCode)}}" userInput="{{credentials.paypal_paymentspro_parner}}" stepKey="inputPartner"/>
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.user(countryCode)}}" stepKey="waitForUser"/>
<fillField selector ="{{PayPalPaymentsProConfigSection.user(countryCode)}}" userInput="{{credentials.paypal_paymentspro_user}}" stepKey="inputUser"/>
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.vendor(countryCode)}}" stepKey="waitForVendor"/>
<fillField selector ="{{PayPalPaymentsProConfigSection.vendor(countryCode)}}" userInput="{{credentials.paypal_paymentspro_vendor}}" stepKey="inputVendor"/>
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.password(countryCode)}}" stepKey="waitForPassword"/>
<fillField selector ="{{PayPalPaymentsProConfigSection.password(countryCode)}}" userInput="{{credentials.paypal_paymentspro_password}}" stepKey="inputPassword"/>
<selectOption selector="{{PayPalPaymentsProConfigSection.testMode(countryCode)}}" userInput="Yes" stepKey="enableTestMode"/>
<selectOption selector ="{{PayPalPaymentsProConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/>
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForSaveButtonBecomeClickable"/>
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
<waitForPageLoad stepKey="waitForSaving"/>
<waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeConfigSuccessMessage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<arguments>
<argument name="paymentMethod" defaultValue="{{StorefrontPaypalCheckoutSection.creditCard}}" type="string"/>
</arguments>
<waitForElementClickable selector="{{paymentMethod}}" stepKey="waitForPaypalPaymentMethod"/>
<click selector="{{paymentMethod}}" stepKey="selectPaypalPaymentMethod"/>
<waitForPageLoad stepKey="waitForPaypalFormLoad"/>
<scrollTo selector="{{paymentMethod}}" stepKey="scrollToCreditCardSection"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="PayPalPaymentsProConfigSection">
<element name="configureBtn" type="button" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk-head" parameterized="true"/>
<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"/>
<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"/>
<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"/>
<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"/>
<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"/>
<element name="enableSolution" type="select" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_enable_paypal_payflow" parameterized="true"/>
<element name="paymentsAdvanced" type="button" selector="#payment_{{countryCode}}_paypal_group_all_in_one_payflow_advanced-head" parameterized="true"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
<suite name="ConfigurePaypalPaymentsProSuite">
<before>
<!-- Login -->
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
<!--Config PayPal Payments Pro-->
<actionGroup ref="AdminConfigurePayPalPaymentsProActionGroup" stepKey="configPayPalPaymentsPro">
<argument name="credentials" value="SamplePaypalPaymentsProConfig"/>
</actionGroup>
</before>
<after>
<!-- Cleanup Paypal configurations -->
<magentoCLI command="config:set payment/paypal_payment_pro/active 0" stepKey="disablePayPalPaymentsPro"/>
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
<argument name="tags" value="config full_page"/>
</actionGroup>
</after>
<include>
<group name="paypalPaymentsPro"/>
</include>
</suite>
</suites>
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="VoidASalesOrderPlacedWithPayPalPaymentsProTest">
<annotations>
<features value="PayPal"/>
<stories value="Paypal Payments Pro"/>
<title value="Void a Sales Order placed with PayPal Payments Pro"/>
<description value="Void a Sales Order placed with PayPal Payments Pro and validate message in trasaction tab from backend "/>
<severity value="MAJOR"/>
<testCaseId value="AC-5461"/>
<group value="paypalPaymentsPro"/>
<group value="3rd_party_integration"/>
</annotations>
<before>
<createData entity="SimpleProduct" stepKey="createSimpleProduct"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<!-- Go to product 1 and add it to cart -->
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToProductOnStorefront">
<argument name="product" value="$$createSimpleProduct$$"/>
</actionGroup>
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
<argument name="productName" value="$createSimpleProduct.name$"/>
</actionGroup>
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckoutCartPage"/>
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/>
<!--Place order-->
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping">
<argument name="shippingMethod" value="Flat Rate"/>
</actionGroup>
<actionGroup ref="StorefrontCheckoutSelectPaypalPaymentMethodActionGroup" stepKey="selectPaypalPaymentMethod"/>
<waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/>
<actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal">
<argument name="cardData" value="VisaDefaultCard"/>
</actionGroup>
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/>
<waitForText selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/>
<waitForText selector="{{CheckoutSuccessMainSection.success}}" userInput="We'll email you an order confirmation with details and tracking info." stepKey="seeSuccessMessage"/>
<waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumber"/>
</before>
<after>
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/>
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clickOnRemoveButtonToUnFiltersIfPresent"/>
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<!--Open order in sales -->
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder">
<argument name="orderId" value="{$grabOrderNumber}"/>
</actionGroup>
<actionGroup ref="AdminAssertTotalsOnOrderViewPageActionGroup" stepKey="checkSubtotal">
<argument name="subtotal" value="$123.00"/>
<argument name="shippingAndHandling" value="$5.00"/>
<argument name="grandTotal" value="$128.00"/>
</actionGroup>
<!--Void created order -->
<actionGroup ref="AdminVoidPendingOrderActionGroup" stepKey="voidPendingOrder"/>
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="checkOrderStatus">
<argument name="status" value="Processing"/>
</actionGroup>
<!--Grab transaction ids -->
<waitForElementVisible selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="waitForGrabLastTransactionID"/>
<grabTextFrom selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabLastTransactionID"/>
<waitForElementVisible selector="{{AdminOrderNotesSection.voidAuthorizationNotes('$grabLastTransactionID')}}" stepKey="waitForVoidAuthorizationNotesWithID"/>
<grabTextFrom selector="{{AdminOrderNotesSection.voidAuthorizationNotes('$grabLastTransactionID')}}" stepKey="getVoidAuthorizationNotesWithID"/>
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistoryTab"/>
<waitForText selector="{{AdminOrderCommentsTabSection.authorizationNotes('Voided')}}" userInput="$getVoidAuthorizationNotesWithID" stepKey="seeOrderHistoryNotes"/>
<!-- Check the last transaction of the order and validate the details for Void and Authorization-->
<actionGroup ref="AdminViewTransactionsInOrderActionGroup" stepKey="validateVoidTransaction"/>
<waitForText selector="{{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput="Yes" stepKey="seeIfClosedHeaderIsSetAsYesForVoid"/>
<waitForElementClickable selector="{{AdminProductFormActionSection.backButton}}" stepKey="waitForBackButtonToBeClicked"/>
<click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackButton"/>
<actionGroup ref="AdminViewAuthorizationTransactionsInOrderActionGroup" stepKey="validateAuthTransaction"/>
<waitForText selector="{{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput="Yes" stepKey="seeIfClosedHeaderIsSetAsYesForAuthorization"/>
</test>
</tests>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminViewAuthorizationTransactionsInOrderActionGroup" extends="AdminViewTransactionsInOrderActionGroup">
<annotations>
<description>Click the Transactions button on the Order Details page and validate authorization transaction</description>
</annotations>
<remove keyForRemoval="selectVoidTypeTxn"/>
<remove keyForRemoval="assertEquals"/>
<waitForElementVisible selector="{{AdminTransactionsGridSection.orderTxnTableTypeFilter}}" after="orderTransactionsTableIsVisible" stepKey="waitForTransactionTypeAuthorizationToBeClicked"/>
<selectOption selector="{{AdminTransactionsGridSection.orderTxnTableTypeFilter}}" userInput="authorization" after="orderTransactionsTableIsVisible" stepKey="selectAuthorizationTypeTxn" />
<assertRegExp stepKey="assertEquals" message="pass">
<expectedResult type="string">/([0-9a-z\-])*(?&lt;!authorization)$/</expectedResult>
<actualResult type="variable">getVoidTransaction</actualResult>
</assertRegExp>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminViewTransactionsInOrderActionGroup">
<annotations>
<description>Click the Transactions button on the Order Details page</description>
</annotations>
<waitForElementClickable selector="{{AdminTransactionsGridSection.transactionsSectionBtn}}" stepKey="waitForTransactionsTabToBeClicked"/>
<click selector="{{AdminTransactionsGridSection.transactionsSectionBtn}}" stepKey="clickTransactionsTab"/>
<waitForElementVisible selector="{{AdminTransactionsGridSection.orderTxnTable}}" stepKey="orderTransactionsTableIsVisible"/>
<selectOption selector="{{AdminTransactionsGridSection.orderTxnTableTypeFilter}}" userInput="void" stepKey="selectVoidTypeTxn" />
<waitForElementClickable selector="{{AdminTransactionsGridSection.orderTxnTableSearchBtn}}" stepKey="waitToClickSearch"/>
<click selector="{{AdminTransactionsGridSection.orderTxnTableSearchBtn}}" stepKey="clickSearch"/>
<waitForPageLoad stepKey="waitForFilterToLoad"/>
<waitForElementClickable selector="{{AdminTransactionsGridSection.orderTxnTableFirstRow}}" stepKey="clickOnVoidTransaction"/>
<click selector="{{AdminTransactionsGridSection.orderTxnTableFirstRow}}" stepKey="clickVoidTxn"/>
<waitForPageLoad stepKey="waitForTxnToLoad"/>
<grabTextFrom selector="{{AdminTransactionsGridSection.transactionData('Transaction ID')}}" stepKey="getVoidTransaction"/>
<assertRegExp stepKey="assertEquals" message="pass">
<expectedResult type="string">/([0-9a-z\-])*(?&lt;!void)$/</expectedResult>
<actualResult type="variable">getVoidTransaction</actualResult>
</assertRegExp>
</actionGroup>
</actionGroups>
Loading

0 comments on commit 975f233

Please sign in to comment.