Skip to content

Commit 8023bde

Browse files
Manjusha.SManjusha.S
authored andcommitted
Merge branch 'ACQE-4370' into functional-testing-automation
2 parents 6983a6e + feaf87f commit 8023bde

File tree

2 files changed

+125
-0
lines changed

2 files changed

+125
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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="ChooseElasticSearchAsSearchEngineActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page for 'Catalog'. Sets the 'Search Engine' to 'elasticsearch7'. Clicks on the Save button. PLEASE NOTE: The value is Hardcoded.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{AdminCatalogSearchConfigurationPage.url}}" stepKey="configureSearchEngine"/>
17+
<waitForPageLoad stepKey="waitForConfigPage"/>
18+
<scrollTo selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="scrollToCatalogSearchTab"/>
19+
<conditionalClick selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" dependentSelector="{{AdminCatalogSearchConfigurationSection.checkIfCatalogSearchTabExpand}}" visible="true" stepKey="expandCatalogSearchTab"/>
20+
<waitForElementVisible selector="{{AdminCatalogSearchConfigurationSection.searchEngine}}" stepKey="waitForDropdownToBeVisible"/>
21+
<uncheckOption selector="{{AdminCatalogSearchConfigurationSection.searchEngineDefaultSystemValue}}" stepKey="uncheckUseSystemValue"/>
22+
<selectOption selector="{{AdminCatalogSearchConfigurationSection.searchEngine}}" userInput="Elasticsearch 7" stepKey="chooseES5"/>
23+
<!--<scrollTo selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="scrollToCatalogSearchTab2"/>-->
24+
<!--<click selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="collapseCatalogSearchTab"/>-->
25+
<click selector="{{ContentManagementSection.Save}}" stepKey="saveConfiguration"/>
26+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeConfigurationSuccessMessage"/>
27+
</actionGroup>
28+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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="ElasticsearchProductCanBeFoundByValueOfSearchableAttributeTest">
12+
<annotations>
13+
<stories value="Elastic Search"/>
14+
<title value="Product can be found by value of 'Searchable' attribute"/>
15+
<description value="Product can be found by value of 'Searchable' attribute"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-4086"/>
18+
</annotations>
19+
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
<actionGroup ref="ChooseElasticSearchAsSearchEngineActionGroup" stepKey="chooseElasticSearch"/>
23+
<!--Create new searchable product attribute-->
24+
<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes"/>
25+
<actionGroup ref="AdminCreateSearchableProductAttributeActionGroup" stepKey="createAttribute">
26+
<argument name="attribute" value="textProductAttribute"/>
27+
</actionGroup>
28+
<!--Assign attribute to the Default set-->
29+
<actionGroup ref="AdminOpenAttributeSetGridPageActionGroup" stepKey="openAttributeSetPage"/>
30+
<actionGroup ref="AdminOpenAttributeSetByNameActionGroup" stepKey="openDefaultAttributeSet"/>
31+
<actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignAttributeToGroup">
32+
<argument name="group" value="Product Details"/>
33+
<argument name="attribute" value="{{textProductAttribute.attribute_code}}"/>
34+
</actionGroup>
35+
<actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet"/>
36+
<!--Create product and fill new attribute field-->
37+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
38+
<waitForPageLoad stepKey="waitForProductIndexPage"/>
39+
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
40+
<argument name="product" value="SimpleProduct"/>
41+
</actionGroup>
42+
<actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillProductForm">
43+
<argument name="product" value="SimpleProduct"/>
44+
</actionGroup>
45+
<fillField selector="{{AdminProductFormSection.attributeRequiredInput(textProductAttribute.attribute_code)}}" userInput="searchable" stepKey="fillTheAttributeRequiredInputField"/>
46+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
47+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
48+
<argument name="indices" value=""/>
49+
</actionGroup>
50+
</before>
51+
<after>
52+
<actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openProductAttributeFromSearchResultInGrid">
53+
<argument name="productAttributeCode" value="{{textProductAttribute.attribute_code}}"/>
54+
</actionGroup>
55+
<actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttributeByAttributeCode">
56+
<argument name="productAttributeCode" value="{{textProductAttribute.attribute_code}}"/>
57+
</actionGroup>
58+
<actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="deleteProductAttributeSuccess"/>
59+
<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid"/>
60+
<click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="resetFiltersOnGrid"/>
61+
<actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="goToProductCatalog"/>
62+
<actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteProduct"/>
63+
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetFiltersIfExist"/>
64+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
65+
<argument name="indices" value=""/>
66+
</actionGroup>
67+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
68+
</after>
69+
70+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/>
71+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForFirstSearchTerm">
72+
<argument name="phrase" value="searchable"/>
73+
</actionGroup>
74+
<see selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductName"/>
75+
<!--<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes1"/>-->
76+
<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid"/>
77+
<fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{textProductAttribute.attribute_code}}" stepKey="fillAttrCodeField" />
78+
<click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="clickSearchBtn" />
79+
<click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="chooseFirstRow" />
80+
<click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="goToStorefrontPropertiesTab"/>
81+
<waitForElementVisible selector="{{StorefrontPropertiesSection.PageTitle}}" stepKey="waitTabLoad"/>
82+
<selectOption selector="{{AdvancedAttributePropertiesSection.UseInSearch}}" userInput="No" stepKey="setSearchable"/>
83+
<click stepKey="saveAttribute" selector="{{AttributePropertiesSection.Save}}"/>
84+
<!--<actionGroup ref="AdminCreateNonSearchableProductAttributeActionGroup" stepKey="createAttribute1">
85+
<argument name="attribute" value="textProductAttribute"/>
86+
</actionGroup>-->
87+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
88+
<argument name="indices" value=""/>
89+
</actionGroup>
90+
<!--<magentoCLI stepKey="flushCache" command="cache:flush"/>-->
91+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage1"/>
92+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForFirstSearchTerm1">
93+
<argument name="phrase" value="searchable"/>
94+
</actionGroup>
95+
<dontSee selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="dontSeeProductName1"/>
96+
</test>
97+
</tests>

0 commit comments

Comments
 (0)