Skip to content

Commit f6938af

Browse files
Merge branch '2.4-develop' into Fixed-27141
2 parents 2d34f05 + 6b6f428 commit f6938af

File tree

325 files changed

+9964
-1312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

325 files changed

+9964
-1312
lines changed
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 © 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="AdminFillSearchTermActionGroup">
12+
<annotations>
13+
<description>Fills the search terms form with sample data.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="searchQuery" type="string"/>
17+
<argument name="store" type="string"/>
18+
<argument name="redirectUrl" type="string"/>
19+
<argument name="suggestedTerms" type="string"/>
20+
</arguments>
21+
<!-- Fill form fields -->
22+
<fillField selector="{{AdminSearchTermsPageFormFieldsSection.query_text}}" userInput="{{searchQuery}}" stepKey="fillFieldSearchQuery"/>
23+
<selectOption selector="{{AdminSearchTermsPageFormFieldsSection.store_id}}" userInput="{{store}}" stepKey="selectStoreView"/>
24+
<fillField selector="{{AdminSearchTermsPageFormFieldsSection.redirect}}" userInput="{{redirectUrl}}" stepKey="fillFieldRedirectUrl"/>
25+
<selectOption selector="{{AdminSearchTermsPageFormFieldsSection.display_in_terms}}" userInput="{{suggestedTerms}}" stepKey="selectSuggestedTerms" />
26+
</actionGroup>
27+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AdminOpenNewSearchTermsPageActionGroup">
12+
<annotations>
13+
<description>Navigate to search terms form page.</description>
14+
</annotations>
15+
<amOnPage url="{{AdminSearchTermsFormPage.url}}" stepKey="amOnSearchTermsForm"/>
16+
<waitForPageLoad stepKey="waitForPageLoad1"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AdminSaveSearchTermActionGroup">
12+
<annotations>
13+
<description>Save a new search term from Magento admin.</description>
14+
</annotations>
15+
<!-- Click save action and verify success message -->
16+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveSearchButton"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="SearchTerms">
12+
<data key="searchQuery" unique="suffix">books</data>
13+
<data key="store">Default Store View</data>
14+
<data key="redirectUrl">http://sample.com</data>
15+
<data key="suggestedTerms">1</data>
16+
</entity>
17+
</entities>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="AdminSearchTermsFormPage" url="search/term/new/" area="admin" module="Magento_AdvancedSearch">
12+
<section name="AdminSearchTermsPageFormFieldsSection"/>
13+
</page>
14+
</pages>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminSearchTermsPageFormFieldsSection">
12+
<element name="query_text" type="input" selector="#query_text"/>
13+
<element name="store_id" type="select" selector="#store_id"/>
14+
<element name="redirect" type="input" selector="#redirect"/>
15+
<element name="display_in_terms" type="select" selector="#display_in_terms"/>
16+
</section>
17+
</sections>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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="AdminAddSearchTermTest">
12+
<annotations>
13+
<features value="AdvancedSearch"/>
14+
<stories value="Add a new search term"/>
15+
<title value="Admin should be able to create a new search term"/>
16+
<description value="Admin should be able to create a new search term using search terms grid"/>
17+
<severity value="CRITICAL"/>
18+
<group value="AdvancedSearch"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
</before>
23+
<after>
24+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
25+
</after>
26+
<actionGroup ref="AdminOpenNewSearchTermsPageActionGroup" stepKey="navigateToSearchTermPage"/>
27+
<actionGroup ref="AdminFillSearchTermActionGroup" stepKey="fillNewSearchTermData">
28+
<argument name="searchQuery" value="{{SearchTerms.searchQuery}}"/>
29+
<argument name="store" value="{{SearchTerms.store}}"/>
30+
<argument name="redirectUrl" value="{{SearchTerms.redirectUrl}}"/>
31+
<argument name="suggestedTerms" value="{{SearchTerms.suggestedTerms}}"/>
32+
</actionGroup>
33+
<actionGroup ref="AdminSaveSearchTermActionGroup" stepKey="saveSearchTerm"/>
34+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSaveSearchTermSuccessMessage">
35+
<argument name="message" value="You saved the search term."/>
36+
<argument name="messageType" value="success"/>
37+
</actionGroup>
38+
</test>
39+
</tests>

app/code/Magento/Backend/Test/Mftf/Data/GeneralLocalConfigsData.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,10 @@
2020
<data key="scope_code">base</data>
2121
<data key="value">en_US</data>
2222
</entity>
23+
<entity name="GeneralLocalCodeConfigsForMexico">
24+
<data key="path">general/locale/code</data>
25+
<data key="scope">websites</data>
26+
<data key="scope_code">base</data>
27+
<data key="value">es_MX</data>
28+
</entity>
2329
</entities>

app/code/Magento/Catalog/Helper/Output.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function productAttribute($product, $attributeHtml, $attributeName)
182182
if ($attributeHtml !== null
183183
&& $attribute->getIsHtmlAllowedOnFront()
184184
&& $attribute->getIsWysiwygEnabled()
185-
&& $this->isDirectivesExists($attributeHtml)
185+
&& $this->isDirectivesExists((string)$attributeHtml)
186186
) {
187187
$attributeHtml = $this->_getTemplateProcessor()->filter($attributeHtml);
188188
}
@@ -219,7 +219,7 @@ public function categoryAttribute($category, $attributeHtml, $attributeName)
219219
if ($attributeHtml !== null
220220
&& $attribute->getIsHtmlAllowedOnFront()
221221
&& $attribute->getIsWysiwygEnabled()
222-
&& $this->isDirectivesExists($attributeHtml)
222+
&& $this->isDirectivesExists((string)$attributeHtml)
223223

224224
) {
225225
$attributeHtml = $this->_getTemplateProcessor()->filter($attributeHtml);
@@ -238,7 +238,7 @@ public function categoryAttribute($category, $attributeHtml, $attributeName)
238238
* @param string $attributeHtml
239239
* @return bool
240240
*/
241-
public function isDirectivesExists($attributeHtml)
241+
public function isDirectivesExists(string $attributeHtml): bool
242242
{
243243
$matches = false;
244244
foreach ($this->directivePatterns as $pattern) {

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@
3939
<createData entity="CustomerAccountSharingGlobal" stepKey="setConfigCustomerAccountToGlobal"/>
4040
</before>
4141

42-
<!--Create website, Sore adn Store View-->
42+
<!--Create website, Store and Store View-->
4343
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="AdminCreateWebsite">
44-
<argument name="newWebsiteName" value="secondWebsite"/>
45-
<argument name="websiteCode" value="second_website"/>
44+
<argument name="newWebsiteName" value="{{customWebsite.name}}"/>
45+
<argument name="websiteCode" value="{{customWebsite.code}}"/>
4646
</actionGroup>
4747
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="AdminCreateStore">
48-
<argument name="website" value="secondWebsite"/>
49-
<argument name="storeGroupName" value="secondStore"/>
50-
<argument name="storeGroupCode" value="second_store"/>
48+
<argument name="website" value="{{customWebsite.name}}"/>
49+
<argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
50+
<argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
5151
</actionGroup>
5252
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="AdminCreateStoreView">
53-
<argument name="StoreGroup" value="customStoreTierPrice"/>
54-
<argument name="customStore" value="customStoreView"/>
53+
<argument name="StoreGroup" value="customStoreGroup"/>
54+
<argument name="customStore" value="customStore"/>
5555
</actionGroup>
5656
<!--Set Configuration-->
5757
<createData entity="CatalogPriceScopeWebsite" stepKey="paymentMethodsSettingConfig"/>
@@ -63,10 +63,10 @@
6363
<argument name="product" value="$$product1$$"/>
6464
</actionGroup>
6565
<actionGroup ref="ProductSetWebsiteActionGroup" stepKey="ProductSetWebsite">
66-
<argument name="website" value="secondWebsite"/>
66+
<argument name="website" value="{{customWebsite.name}}"/>
6767
</actionGroup>
6868
<actionGroup ref="ProductSetAdvancedPricingActionGroup" stepKey="ProductSetAdvancedPricing1">
69-
<argument name="website" value="secondWebsite"/>
69+
<argument name="website" value="{{customWebsite.name}}"/>
7070
</actionGroup>
7171

7272
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct2">
@@ -76,10 +76,10 @@
7676
<argument name="product" value="$$product2$$"/>
7777
</actionGroup>
7878
<actionGroup ref="ProductSetWebsiteActionGroup" stepKey="ProductSetWebsite2">
79-
<argument name="website" value="secondWebsite"/>
79+
<argument name="website" value="{{customWebsite.name}}"/>
8080
</actionGroup>
8181
<actionGroup ref="ProductSetAdvancedPricingActionGroup" stepKey="ProductSetAdvancedPricing2">
82-
<argument name="website" value="secondWebsite"/>
82+
<argument name="website" value="{{customWebsite.name}}"/>
8383
</actionGroup>
8484

8585
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct3">
@@ -89,10 +89,10 @@
8989
<argument name="product" value="$$product3$$"/>
9090
</actionGroup>
9191
<actionGroup ref="ProductSetWebsiteActionGroup" stepKey="ProductSetWebsite3">
92-
<argument name="website" value="secondWebsite"/>
92+
<argument name="website" value="{{customWebsite.name}}"/>
9393
</actionGroup>
9494
<actionGroup ref="ProductSetAdvancedPricingActionGroup" stepKey="ProductSetAdvancedPricing3">
95-
<argument name="website" value="secondWebsite"/>
95+
<argument name="website" value="{{customWebsite.name}}"/>
9696
</actionGroup>
9797

9898
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct4">
@@ -102,10 +102,10 @@
102102
<argument name="product" value="$$product4$$"/>
103103
</actionGroup>
104104
<actionGroup ref="ProductSetWebsiteActionGroup" stepKey="ProductSetWebsite4">
105-
<argument name="website" value="secondWebsite"/>
105+
<argument name="website" value="{{customWebsite.name}}"/>
106106
</actionGroup>
107107
<actionGroup ref="ProductSetAdvancedPricingActionGroup" stepKey="ProductSetAdvancedPricing4">
108-
<argument name="website" value="secondWebsite"/>
108+
<argument name="website" value="{{customWebsite.name}}"/>
109109
</actionGroup>
110110
<actionGroup ref="ClearProductsFilterActionGroup" stepKey="ClearProductsFilterActionGroup"/>
111111

@@ -120,7 +120,7 @@
120120
<click selector="{{AdminCustomerAccountInformationSection.accountInformationButton}}" stepKey="ClickOnAccountInformationSection"/>
121121
<waitForPageLoad stepKey="waitForPageOpened1"/>
122122
<selectOption selector="{{AdminCustomerAccountInformationSection.group}}" userInput="Retailer" stepKey="Group"/>
123-
<selectOption selector="{{AdminCustomerAccountInformationSection.storeView}}" userInput="secondStoreView" stepKey="clickToSelectStore"/>
123+
<selectOption selector="{{AdminCustomerAccountInformationSection.storeView}}" userInput="{{customStore.name}}" stepKey="clickToSelectStore"/>
124124
<click selector="{{AdminCustomerAccountInformationSection.saveCustomer}}" stepKey="save"/>
125125
<waitForPageLoad stepKey="waitForCustomersPage"/>
126126
<see userInput="You saved the customer." stepKey="CustomerIsSaved"/>
@@ -136,7 +136,7 @@
136136
<click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/>
137137
<waitForPageLoad stepKey="waitForPageDiscountPageIsLoaded"/>
138138
<fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="ship" stepKey="fillRuleName"/>
139-
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="secondWebsite" stepKey="selectWebsites"/>
139+
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="{{customWebsite.name}}" stepKey="selectWebsites"/>
140140
<selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" userInput="Retailer" stepKey="selectCustomerGroup"/>
141141
<selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="Specific Coupon" stepKey="selectCouponType"/>
142142
<fillField selector="{{AdminCartPriceRulesFormSection.couponCode}}" userInput="ship" stepKey="setCode"/>
@@ -152,7 +152,7 @@
152152
<!--Create new order-->
153153
<actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="CreateNewOrder">
154154
<argument name="customer" value="Simple_US_Customer"/>
155-
<argument name="storeView" value="customStoreView"/>
155+
<argument name="storeView" value="customStore"/>
156156
</actionGroup>
157157

158158
<click selector="{{OrdersGridSection.addProducts}}" stepKey="clickToAddProduct"/>
@@ -327,7 +327,7 @@
327327
<argument name="ruleName" value="ship"/>
328328
</actionGroup>
329329
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="DeleteWebsite">
330-
<argument name="websiteName" value="secondWebsite"/>
330+
<argument name="websiteName" value="{{customWebsite.name}}"/>
331331
</actionGroup>
332332
<createData entity="CustomerAccountSharingDefault" stepKey="setConfigCustomerAccountDefault"/>
333333
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>

0 commit comments

Comments
 (0)