Skip to content

Commit f66b409

Browse files
committed
Merge branch 'ACQE-7162-3' into functional-tests-mainline-deployment-ver4
2 parents dc52162 + 419353f commit f66b409

File tree

7 files changed

+213
-11
lines changed

7 files changed

+213
-11
lines changed

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

Lines changed: 9 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,9 +25,13 @@
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)"/>
34+
<element name="expandedTab" type="button" selector="//a[@id='payment_us_banktransfer-head']"/>
35+
<element name="paymentInformation" type="button" selector="//*[contains(text(), 'Shipping Method')]"/>
3236
</section>
3337
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminNavigateToConfigurationPaymentMethodSectionActionGroup">
11+
<annotations>
12+
<description>Navigates to the specified section in admin on the Stores > Settings > Configuration > Sales > Payment Methods page.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="section" defaultValue="" type="string"/>
16+
</arguments>
17+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url(section)}}" stepKey="navigateToPaymentConfigurationPage"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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="AdminPaymentBankTransferHavingMultipleStoresTest">
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+
<magentoCLI command="config:set {{EnablePaymentBankTransferConfigData.path}} {{EnablePaymentBankTransferConfigData.value}}" stepKey="enableBankTransferPayment"/>
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+
</before>
39+
<after>
40+
<magentoCLI command="config:set {{DisablePaymentBankTransferConfigData.path}} {{DisablePaymentBankTransferConfigData.value}}" stepKey="disableBankTransferPayment"/>
41+
<deleteData stepKey="deleteProduct" createDataKey="createProduct"/>
42+
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteCustomStore">
43+
<argument name="storeGroupName" value="customStoreGroup.name"/>
44+
</actionGroup>
45+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
46+
<argument name="indices" value=""/>
47+
</actionGroup>
48+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
49+
</after>
50+
<actionGroup ref="AdminNavigateToConfigurationPaymentMethodSectionActionGroup" stepKey="navigateToPaymentConfigurationPage"/>
51+
<actionGroup ref="AdminSwitchSecondStoreViewActionGroup" stepKey="AdminSwitchSecondStoreView">
52+
<argument name="secondStoreView" value="customStoreEN"/>
53+
</actionGroup>
54+
<conditionalClick selector="{{CatalogSection.expandedTab}}" dependentSelector="{{CatalogSection.productsPerPageOnGridBankTransferPaymentDefaultValueUseConfigCheckbox}}" visible="false" stepKey="expandOtherPaypalConfigButton"/>
55+
<uncheckOption selector="{{CatalogSection.productsPerPageOnGridBankTransferPaymentDefaultValueUseConfigCheckbox}}" stepKey="uncheckUseSystemValue"/>
56+
<waitForElementVisible selector="{{CatalogSection.productsPerPageOnGridAllowedBankTransferPaymentValues}}" stepKey="waitForContentHeading"/>
57+
<fillField selector="{{CatalogSection.productsPerPageOnGridAllowedBankTransferPaymentValues}}" userInput="Bank Transfer Payment(Second)" stepKey="fillProductQuantity"/>
58+
<actionGroup ref="AdminSavePaymentConfigActionGroup" stepKey="clickSaveConfigBtn"/>
59+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
60+
<argument name="tags" value="config full_page"/>
61+
</actionGroup>
62+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage">
63+
<argument name="product" value="$createProduct$"/>
64+
</actionGroup>
65+
<actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="cartAddSimpleProductToCart">
66+
<argument name="productName" value="$createProduct.name$"/>
67+
<argument name="productQty" value="1"/>
68+
</actionGroup>
69+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="navigateToCheckoutPage"/>
70+
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping"/>
71+
<waitForElementClickable selector="{{StorefrontCheckoutPaymentMethodsSection.bankTransfer}}" stepKey="waitForBankTransferMethod" />
72+
<click selector="{{StorefrontCheckoutPaymentMethodsSection.bankTransfer}}" stepKey="selectBankTransferMethod"/>
73+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="checkoutPlaceOrder"/>
74+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumberWithoutLink}}" stepKey="grabOrderNumber"/>
75+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="goToOrders"/>
76+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder">
77+
<argument name="orderId" value="{$grabOrderNumber}"/>
78+
</actionGroup>
79+
<actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceButton"/>
80+
<actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/>
81+
<scrollTo selector="{{CatalogSection.paymentInformation}}" stepKey="scrollToPaymentAndShippingInformation"/>
82+
<waitForText selector="{{AdminOrderPaymentInformationSection.paymentMethod}}" userInput="Bank Transfer Payment(Second)" stepKey="seePaymentMethodNameU"/>
83+
<waitForElementClickable selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="waitForShipActionClickable" />
84+
<click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction"/>
85+
<waitForElementClickable selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="waitForSubmitShipmentButtonClickable" />
86+
<click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="clickSubmitShipment"/>
87+
<scrollTo selector="{{CatalogSection.paymentInformation}}" stepKey="scrollToPaymentAndShippingInformationUnderShipmentPage"/>
88+
<waitForText selector="{{AdminOrderPaymentInformationSection.paymentMethod}}" userInput="Bank Transfer Payment(Second)" stepKey="seePaymentMethodNameUnderShipmentPage"/>
89+
<actionGroup ref="AdminStartToCreateCreditMemoFromOrderPageActionGroup" stepKey="startCreatingCreditMemo"/>
90+
<actionGroup ref="SubmitCreditMemoActionGroup" stepKey="submitCreditMemo"/>
91+
<scrollTo selector="{{CatalogSection.paymentInformation}}" stepKey="scrollToPaymentAndShippingInformationUnderCreditMemoPage"/>
92+
<waitForText selector="{{AdminOrderPaymentInformationSection.paymentMethod}}" userInput="Bank Transfer Payment(Second)" stepKey="seePaymentMethodNameUnderCreditMemoPage"/>
93+
</test>
94+
</tests>
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="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+
<waitForElementClickable selector="{{AdminStoreGroupActionsSection.saveButton}}" stepKey="waitForSaveStoreButtonClickable" />
19+
<click selector="{{AdminStoreGroupActionsSection.saveButton}}" stepKey="clickSaveStoreGroup"/>
20+
<waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForModal"/>
21+
<waitForText selector="{{AdminConfirmationModalSection.title}}" userInput="Warning message" stepKey="seeWarningAboutTakingALongTimeToComplete"/>
22+
<waitForElementClickable selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForOkButtonClickable" />
23+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmModal"/>
24+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="seeForSuccessMessage"/>
25+
<waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the website." stepKey="seeSuccessMessage"/>
26+
</actionGroup>
27+
</actionGroups>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
<waitForElementClickable selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="waitForClearFiltersClickable" />
20+
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="resetSearchFilter"/>
21+
<waitForPageLoad stepKey="waitForResetResult"/>
22+
<waitForElementVisible selector="{{AdminStoresGridSection.storeGrpFilterTextField}}" stepKey="waitForContentHeading"/>
23+
<fillField userInput="{{storeGroupName}}" selector="{{AdminStoresGridSection.storeGrpFilterTextField}}" stepKey="fillStoreGroupFilter"/>
24+
<waitForElementClickable selector="{{AdminStoresGridSection.searchButton}}" stepKey="waitForSearchButtonClickable" />
25+
<click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearchButton"/>
26+
<waitForPageLoad stepKey="waitForSearchResult"/>
27+
<waitForElementClickable selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="waitForStoreGroupNameClickable"/>
28+
<click selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="clicksStoreGroupName"/>
29+
<waitForPageLoad stepKey="waitForStorePageToLoad"/>
30+
</actionGroup>
31+
</actionGroups>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
<waitForElementClickable selector="{{AdminMainActionsSection.storeViewDropdown}}" stepKey="waitForStoreViewAreVisible"/>
19+
<click selector="{{AdminMainActionsSection.storeViewDropdown}}" stepKey="clickWebsiteSwitchDropdown"/>
20+
<waitForElementClickable selector="{{AdminMainActionsSection.websiteByName('Main Website')}}" stepKey="waitForWebsiteAreVisible"/>
21+
<click selector="{{AdminMainActionsSection.storeViewByName(secondStoreView.name)}}" stepKey="clicksecondStoreViewByName"/>
22+
<waitForElementClickable selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitingForInformationModal"/>
23+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmStoreSwitch"/>
24+
<waitForText userInput="{{secondStoreView.name}}" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seesecondStoreViewName"/>
25+
</actionGroup>
26+
</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)