Skip to content

Commit fe26799

Browse files
committed
Merge remote-tracking branch 'origin/MC-31467' into 2.3-develop-pr112
2 parents 0528f37 + 0a7316c commit fe26799

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed
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="AdminSetUseInSearchValueForProductAttributeActionGroup">
11+
<annotations>
12+
<description>Set 'Use In Search' value for product attribute</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="useInSearchValue" type="string" defaultValue="Yes"/>
16+
</arguments>
17+
18+
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
19+
<click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="clickStorefrontPropertiesTab"/>
20+
<waitForElementVisible selector="{{AdvancedAttributePropertiesSection.UseInSearch}}" stepKey="waitForUseInSearchElementVisible"/>
21+
<selectOption selector="{{AdvancedAttributePropertiesSection.UseInSearch}}" userInput="{{useInSearchValue}}" stepKey="setUseInSearchValue"/>
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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="StorefrontUsingElasticSearchWithWeightAttributeTest">
12+
<annotations>
13+
<features value="CatalogSearch"/>
14+
<stories value="Storefront Search"/>
15+
<title value="Using ElasticSearch with weight attribute"/>
16+
<description value="Use ElasticSearch for products with weight attributes"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-31368"/>
19+
<group value="SearchEngineElasticsearch"/>
20+
</annotations>
21+
<before>
22+
<!--Create Simple Product with weight-->
23+
<createData entity="defaultSimpleProduct" stepKey="simpleProduct"/>
24+
<!-- Login as admin -->
25+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
26+
</before>
27+
<after>
28+
<!-- Delete create product -->
29+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
30+
<!-- Change attribute property: Use in Search >No -->
31+
<actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openWeightProductAttributeInAdmin">
32+
<argument name="productAttributeCode" value="weight"/>
33+
</actionGroup>
34+
<actionGroup ref="AdminSetUseInSearchValueForProductAttributeActionGroup" stepKey="makeAttributeUnsearchableInAQuickSearch">
35+
<argument name="useInSearchValue" value="No"/>
36+
</actionGroup>
37+
<actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveAttributeChanges"/>
38+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/>
39+
<!-- Logout from admin -->
40+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
41+
</after>
42+
<!-- Step 2 -->
43+
<actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openWeightProductAttribute">
44+
<argument name="productAttributeCode" value="weight"/>
45+
</actionGroup>
46+
<!-- Change attribute property: Use in Search >Yes -->
47+
<actionGroup ref="AdminSetUseInSearchValueForProductAttributeActionGroup" stepKey="makeAttributeSearchableInAQuickSearch"/>
48+
<actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveAttribute"/>
49+
<!-- Step 3 -->
50+
<actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/>
51+
<!-- Step 4 -->
52+
<magentoCLI command="cache:clean" arguments="full_page" stepKey="clearFPC"/>
53+
<!-- Step 5 -->
54+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefront"/>
55+
<!-- Step 6 -->
56+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByAnyValue">
57+
<argument name="phrase" value="exampleTestValue2020"/>
58+
</actionGroup>
59+
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductMessage"/>
60+
</test>
61+
</tests>

0 commit comments

Comments
 (0)