-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from magento-pangolin/MC-4439
- Loading branch information
Showing
5 changed files
with
109 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="StorefrontUpdateSearchTermEntityTest"> | ||
<annotations> | ||
<stories value="Storefront Search"/> | ||
<title value="Update Storefront Search Results"/> | ||
<description value="You should see the updated Search Term on the Storefront via the Admin."/> | ||
<testCaseId value="MC-13987"/> | ||
<severity value="CRITICAL"/> | ||
<group value="search"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
|
||
<before> | ||
<createData entity="_defaultCategory" stepKey="createCategory1"/> | ||
<createData entity="SimpleProduct" stepKey="createProduct1"> | ||
<requiredEntity createDataKey="createCategory1"/> | ||
</createData> | ||
|
||
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage1"/> | ||
<waitForPageLoad stepKey="waitForPageLoad1"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="logout" stepKey="logoutOfAdmin1"/> | ||
|
||
<deleteData createDataKey="createProduct1" stepKey="deleteSimpleProduct1"/> | ||
<deleteData createDataKey="createCategory1" stepKey="deleteCategory1"/> | ||
</after> | ||
|
||
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductName1"> | ||
<argument name="phrase" value="$$createProduct1.name$$"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> | ||
|
||
<amOnPage url="{{AdminCatalogSearchTermIndexPage.url}}" stepKey="openAdminCatalogSearchTermIndexPage1"/> | ||
<waitForPageLoad stepKey="waitForPageLoad1"/> | ||
|
||
<actionGroup ref="searchTermFilterBySearchQuery" stepKey="filterByFirstSearchQuery1"> | ||
<argument name="searchQuery" value="$$createProduct1.name$$"/> | ||
</actionGroup> | ||
|
||
<click selector="{{AdminGridRow.editByValue($$createProduct1.name$$)}}" stepKey="clickOnSearchResult1"/> | ||
<waitForPageLoad stepKey="waitForPageLoad2"/> | ||
|
||
<actionGroup ref="AdminFillAllSearchTermFieldsActionGroup" stepKey="searchForSearchTerm1"> | ||
<argument name="searchTerm" value="UpdatedSearchTermData1"/> | ||
</actionGroup> | ||
|
||
<amOnPage url="{{AdminCatalogSearchTermIndexPage.url}}" stepKey="openAdminCatalogSearchTermIndexPage2"/> | ||
<waitForPageLoad stepKey="waitForPageLoad3"/> | ||
|
||
<actionGroup ref="searchTermFilterBySearchQuery" stepKey="filterByFirstSearchQuery2"> | ||
<argument name="searchQuery" value="{{UpdatedSearchTermData1.query_text}}"/> | ||
</actionGroup> | ||
|
||
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage2"/> | ||
<waitForPageLoad stepKey="waitForPageLoad4"/> | ||
|
||
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductName2"> | ||
<argument name="phrase" value="{{UpdatedSearchTermData1.query_text}}"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
24 changes: 24 additions & 0 deletions
24
app/code/Magento/Search/Test/Mftf/ActionGroup/AdminEditSearchTermActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminFillAllSearchTermFieldsActionGroup"> | ||
<arguments> | ||
<argument name="searchTerm" type="entity"/> | ||
</arguments> | ||
|
||
<fillField selector="{{AdminCatalogSearchTermNewSection.searchQuery}}" userInput="{{searchTerm.query_text}}" stepKey="fillSearchQuery1"/> | ||
<selectOption selector="{{AdminCatalogSearchTermNewSection.store}}" userInput="{{searchTerm.store_id}}" stepKey="selectStore1"/> | ||
<fillField selector="{{AdminCatalogSearchTermNewSection.numberOfResults}}" userInput="{{searchTerm.number_of_results}}" stepKey="fillNumberOfResults1"/> | ||
<fillField selector="{{AdminCatalogSearchTermNewSection.numberOfUses}}" userInput="{{searchTerm.number_of_uses}}" stepKey="fillNumberOfUses1"/> | ||
<selectOption selector="{{AdminCatalogSearchTermNewSection.displayInSuggestedTerm}}" userInput="{{searchTerm.display_in_suggested_term}}" stepKey="selectDisplayInSuggestedTerms1"/> | ||
|
||
<click selector="{{AdminConfigSection.saveButton}}" stepKey="clickOnSaveButton1"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters