Skip to content

Commit

Permalink
Merge pull request magento#141 from magento-pangolin/MC-6421
Browse files Browse the repository at this point in the history
MC-6421
  • Loading branch information
kabothu authored Jun 7, 2019
2 parents a364235 + 66bdf57 commit 7b4dfcf
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminGlobalSearchSection">
<element name="globalSearch" type="button" selector=".search-global-label"/>
<element name="globalSearchActive" type="block" selector=".search-global-field._active"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?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="AdminGlobalSearchOnProductPageTest">
<annotations>
<features value="Search"/>
<stories value="Backend global search"/>
<title value="Admin global search on product page test"/>
<description value="Admin search displays settings and content items"/>
<severity value="CRITICAL"/>
<testCaseId value="MC-6421"/>
<group value="Search"/>
</annotations>
<before>
<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>
<after>
<!-- Delete product -->
<actionGroup ref="deleteProductBySku" stepKey="deleteProduct">
<argument name="sku" value="{{SimpleProduct.sku}}"/>
</actionGroup>

<!-- Delete category -->
<actionGroup ref="DeleteCategory" stepKey="deleteCreatedNewRootCategory">
<argument name="categoryEntity" value="_defaultCategory"/>
</actionGroup>

<!-- Logout -->
<actionGroup ref="logout" stepKey="logout"/>
</after>

<!-- Create Simple Product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="adminProductIndexPageAdd"/>
<waitForPageLoad stepKey="waitForProductIndexPageLoad"/>
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage">
<argument name="product" value="SimpleProduct"/>
</actionGroup>
<actionGroup ref="fillMainProductForm" stepKey="fillProductForm">
<argument name="product" value="SimpleProduct"/>
</actionGroup>

<!-- Create new category for product -->
<actionGroup ref="FillNewProductCategory" stepKey="FillNewProductCategory">
<argument name="categoryName" value="{{_defaultCategory.name}}"/>
</actionGroup>

<!-- Save product form -->
<actionGroup ref="saveProductForm" stepKey="saveProductForm"/>

<!-- Click on the magnifying glass to start searching -->
<click selector="{{AdminGlobalSearchSection.globalSearch}}" stepKey="clickSearchBtn"/>
<waitForElementVisible selector="{{AdminGlobalSearchSection.globalSearchActive}}" stepKey="waitForSearchInputVisible"/>

<!-- The search input is expanded and active -->
<seeElement selector="{{AdminGlobalSearchSection.globalSearchActive}}" stepKey="seeActiveSearch"/>
</test>
</tests>

0 comments on commit 7b4dfcf

Please sign in to comment.