forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
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 magento#141 from magento-pangolin/MC-6421
MC-6421
- Loading branch information
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
app/code/Magento/Search/Test/Mftf/Section/AdminGlobalSearchSection.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,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> |
65 changes: 65 additions & 0 deletions
65
app/code/Magento/Search/Test/Mftf/Test/AdminGlobalSearchOnProductPageTest.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,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> |