Skip to content

Commit 271c82d

Browse files
committed
ACQE-7162:Checking Bank Transfer Payment store label is being displayed on order/invoice/shipping/creditmemo details
New Testcase Added
1 parent b2b7b32 commit 271c82d

File tree

6 files changed

+172
-11
lines changed

6 files changed

+172
-11
lines changed

app/code/Magento/Config/Test/Mftf/Section/CatalogSection/CatalogSection.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
7-
-->
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="CatalogSection">
@@ -25,8 +25,10 @@
2525
<element name="GenerateUrlRewrites" type="select" selector="#catalog_seo_generate_category_product_rewrites"/>
2626
<element name="successMessage" type="text" selector="#messages"/>
2727
<element name="productsPerPageOnGridAllowedValues" type="input" selector="//input[@id='catalog_frontend_grid_per_page_values']"/>
28+
<element name="productsPerPageOnGridAllowedBankTransferPaymentValues" type="input" selector="//input[@id='payment_us_banktransfer_title']"/>
2829
<element name="productsPerPageOnGridDefaultValue" type="input" selector="//input[@id='catalog_frontend_grid_per_page']"/>
2930
<element name="productsPerPageOnGridDefaultValueUseConfigCheckbox" type="checkbox" selector="//input[@id='catalog_frontend_grid_per_page_inherit']"/>
31+
<element name="productsPerPageOnGridBankTransferPaymentDefaultValueUseConfigCheckbox" type="checkbox" selector="//input[@id='payment_us_banktransfer_title_inherit']"/>
3032
<element name="dateAndTimeCustomOptions" type="select" selector="#catalog_custom_options-head"/>
3133
<element name="CheckIfTabExpandForDateAndTimeCustomOptions" type="button" selector="#catalog_custom_options-head:not(.open)"/>
3234
</section>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 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="AdminPaymentBankTransferWithMultipleStoresTest">
11+
<annotations>
12+
<features value="Payments"/>
13+
<stories value="Bank Transfer Payment in Admin"/>
14+
<title value="Checking Bank Transfer Payment store label is being displayed on order/invoice/shipping/creditmemo details"/>
15+
<description value="Checking Bank Transfer Payment store label is being displayed on order/invoice/shipping/creditmemo details"/>
16+
<severity value="AVERAGE"/>
17+
<testCaseId value="AC-5671"/>
18+
<group value="Payments"/>
19+
</annotations>
20+
<before>
21+
22+
<createData entity="defaultSimpleProduct" stepKey="createProduct"/>
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24+
<actionGroup ref="CreateCustomStoreActionGroup" stepKey="createCustomStore">
25+
<argument name="website" value="Main Website"/>
26+
<argument name="store" value="{{customStoreGroup.name}}"/>
27+
<argument name="rootCategory" value="Default Category"/>
28+
</actionGroup>
29+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView">
30+
<argument name="StoreGroup" value="customStoreGroup"/>
31+
<argument name="customStore" value="customStoreEN"/>
32+
</actionGroup>
33+
<actionGroup ref="AdminChangeWebsiteDefaultStoreActionGroup" stepKey="changeDefaultStoreToCustomStore">
34+
<argument name="website" value="Main Website"/>
35+
<argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
36+
<argument name="defaultStoreName" value="{{customStoreGroup.name}}"/>
37+
</actionGroup>
38+
<magentoCLI command="config:set {{enabledBankTransferPaymentOrder.label}} {{enabledBankTransferPaymentOrder.value}}" stepKey="enableBankTransfer"/>
39+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
40+
<waitForPageLoad stepKey="waitForSecondStorePageLoad"/>
41+
</before>
42+
<after>
43+
<magentoCLI command="config:set {{DisablePaymentBankTransferConfigData.path}} {{DisablePaymentBankTransferConfigData.value}}" stepKey="disableBankTransferPayment"/>
44+
<deleteData stepKey="deleteProduct" createDataKey="createProduct"/>
45+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
46+
</after>
47+
<actionGroup ref="AdminSwitchSecondStoreViewActionGroup" stepKey="AdminSwitchSecondStoreView">
48+
<argument name="secondStoreView" value="customStoreEN"/>
49+
</actionGroup>
50+
<uncheckOption selector="{{CatalogSection.productsPerPageOnGridBankTransferPaymentDefaultValueUseConfigCheckbox}}" stepKey="uncheckUseSystemValue"/>
51+
<fillField selector="{{CatalogSection.productsPerPageOnGridAllowedBankTransferPaymentValues}}" userInput="Bank Transfer Payment(Second)" stepKey="fillProductQuantity"/>
52+
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForSaveConfigbtn" />
53+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
54+
<waitForPageLoad stepKey="waitForPageLoad"/>
55+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage">
56+
<argument name="product" value="$createProduct$"/>
57+
</actionGroup>
58+
<actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="cartAddSimpleProductToCart">
59+
<argument name="productName" value="$createProduct.name$"/>
60+
<argument name="productQty" value="1"/>
61+
</actionGroup>
62+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="navigateToCheckoutPage"/>
63+
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping"/>
64+
<click selector="{{StorefrontCheckoutPaymentMethodsSection.bankTransfer}}" stepKey="selectBankTransferMethod"/>
65+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="checkoutPlaceOrder"/>
66+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumberWithoutLink}}" stepKey="grabOrderNumber"/>
67+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="goToOrders"/>
68+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder">
69+
<argument name="orderId" value="{$grabOrderNumber}"/>
70+
</actionGroup>
71+
<actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceButton"/>
72+
<actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/>
73+
<waitForText selector="{{AdminOrderPaymentInformationSection.paymentMethod}}" userInput="Bank Transfer Payment(Second)" stepKey="seePaymentMethodName"/>
74+
<click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction"/>
75+
<click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="clickSubmitShipment"/>
76+
<waitForText selector="{{AdminOrderPaymentInformationSection.paymentMethod}}" userInput="Bank Transfer Payment(Second)" stepKey="seePaymentMethodName2"/>
77+
<actionGroup ref="AdminStartToCreateCreditMemoFromOrderPageActionGroup" stepKey="startCreatingCreditMemo"/>
78+
<actionGroup ref="SubmitCreditMemoActionGroup" stepKey="submitCreditMemo"/>
79+
<waitForText selector="{{AdminOrderPaymentInformationSection.paymentMethod}}" userInput="Bank Transfer Payment(Second)" stepKey="seePaymentMethodName3"/>
80+
</test>
81+
</tests>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="AdminChangeWebsiteDefaultStoreActionGroup" extends="AdminEditWebsiteStoreGroupActionGroup">
11+
<annotations>
12+
<description>Change the default store for provided store group.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="defaultStoreName" type="string"/>
16+
</arguments>
17+
<selectOption selector="{{AdminEditStoreGroupSection.defaultStore}}" userInput="{{defaultStoreName}}" stepKey="changeDefaultStoreView" after="waitForStorePageToLoad"/>
18+
<click selector="{{AdminStoreGroupActionsSection.saveButton}}" stepKey="clickSaveStoreGroup"/>
19+
<waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForModal"/>
20+
<see selector="{{AdminConfirmationModalSection.title}}" userInput="Warning message" stepKey="seeWarningAboutTakingALongTimeToComplete"/>
21+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmModal"/>
22+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="seeForSuccessMessage"/>
23+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the website." stepKey="seeSuccessMessage"/>
24+
</actionGroup>
25+
</actionGroups>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="AdminEditWebsiteStoreGroupActionGroup">
11+
<annotations>
12+
<description>Edit store group.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="storeGroupName" type="string"/>
16+
</arguments>
17+
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
18+
<waitForPageLoad stepKey="waitForAdminSystemStorePageLoad"/>
19+
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="resetSearchFilter"/>
20+
<waitForPageLoad stepKey="waitForResetResult"/>
21+
<fillField userInput="{{storeGroupName}}" selector="{{AdminStoresGridSection.storeGrpFilterTextField}}" stepKey="fillStoreGroupFilter"/>
22+
<click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearchButton"/>
23+
<waitForPageLoad stepKey="waitForSearchResult"/>
24+
<click selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="clicksStoreGroupName"/>
25+
<waitForPageLoad stepKey="waitForStorePageToLoad"/>
26+
</actionGroup>
27+
</actionGroups>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="AdminSwitchSecondStoreViewActionGroup">
11+
<annotations>
12+
<description>Selects the provided Website from the 'Second Store View' dropdown menu on the Admin Grid pages.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="secondStoreView"/>
16+
</arguments>
17+
<scrollToTopOfPage stepKey="scrollToTop"/>
18+
<click selector="{{AdminMainActionsSection.storeViewDropdown}}" stepKey="clickWebsiteSwitchDropdown"/>
19+
<waitForElementVisible selector="{{AdminMainActionsSection.websiteByName('Main Website')}}" stepKey="waitForWebsiteAreVisible"/>
20+
<click selector="{{AdminMainActionsSection.storeViewByName(secondStoreView.name)}}" stepKey="clicksecondStoreViewByName"/>
21+
<waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitingForInformationModal"/>
22+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmStoreSwitch"/>
23+
<see userInput="{{secondStoreView.name}}" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seesecondStoreViewName"/>
24+
</actionGroup>
25+
</actionGroups>
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
7-
-->
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
99
<section name="AdminEditStoreGroupSection">
1010
<element name="defaultStoreView" type="select" selector="#group_default_store_id"/>
11+
<element name="defaultStore" type="select" selector="#website_default_group_id"/>
1112
</section>
1213
</sections>

0 commit comments

Comments
 (0)