|
| 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="ShopByButtonInMobile"> |
| 12 | + <annotations> |
| 13 | + <features value="Layered Navigation"/> |
| 14 | + <stories value="Shop By button is not working in a mobile theme"/> |
| 15 | + <title value="Layered Navigation"/> |
| 16 | + <description value="Storefront Shop By collapsible button works in a mobile theme"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MAGETWO-94873"/> |
| 19 | + <group value="LayeredNavigation"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <createData entity="productDropDownAttribute" stepKey="attribute"/> |
| 23 | + <createData entity="productAttributeOption1" stepKey="option1"> |
| 24 | + <requiredEntity createDataKey="attribute"/> |
| 25 | + </createData> |
| 26 | + <createData entity="AddToDefaultSet" stepKey="attributeSet"> |
| 27 | + <requiredEntity createDataKey="attribute"/> |
| 28 | + </createData> |
| 29 | + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> |
| 30 | + <createData entity="SimpleProduct2" stepKey="simpleProduct2"/> |
| 31 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 32 | + </before> |
| 33 | + <after> |
| 34 | + <deleteData createDataKey="attribute" stepKey="deleteAttribute"/> |
| 35 | + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> |
| 36 | + <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> |
| 37 | + <actionGroup ref="logout" stepKey="logoutOfAdmin"/> |
| 38 | + <resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/> |
| 39 | + </after> |
| 40 | + <!-- Go to default attribute set edit page and add the product attribute to the set --> |
| 41 | + <comment userInput="Go to default attribute set edit page and add the product attribute to the set" stepKey="commentAttributeSetEdit" /> |
| 42 | + <amOnPage url="{{AdminProductAttributeSetEditPage.url}}/{{AddToDefaultSet.attributeSetId}}/" stepKey="onAttributeSetEdit"/> |
| 43 | + <dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute($$attribute.attribute[attribute_code]$$)}}" selector2="{{AdminProductAttributeSetSection.attribute('Product Details')}}" stepKey="assignTestAttributes"/> |
| 44 | + <click selector="{{AdminProductAttributeSetSection.saveBtn}}" stepKey="clickAttributeSetSave"/> |
| 45 | + <!-- Go to simple product edit page and set the product attribute to a value --> |
| 46 | + <comment userInput="Go to simple product edit page and set the product attribute to a value" stepKey="commentProductAttributeEdit" /> |
| 47 | + <amOnPage url="{{AdminProductEditPage.url($$simpleProduct1.id$$)}}" stepKey="goToEditPage"/> |
| 48 | + <selectOption selector="{{AdminProductFormSection.customSelectField($$attribute.attribute[attribute_code]$$)}}" userInput="option1" stepKey="selectAttribute"/> |
| 49 | + <actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/> |
| 50 | + <!-- Check storefront mobile view for shop by button is functioning as expected --> |
| 51 | + <comment userInput="Check storefront mobile view for shop by button is functioning as expected" stepKey="commentCheckShopByButton" /> |
| 52 | + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToHomePage"/> |
| 53 | + <waitForPageLoad stepKey="waitForHomePageToLoad"/> |
| 54 | + <fillField userInput="Test Simple Product" selector="{{StorefrontQuickSearchSection.searchPhrase}}" stepKey="fillSearchBar"/> |
| 55 | + <click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/> |
| 56 | + <resizeWindow width="600" height="800" stepKey="resizeWindow"/> |
| 57 | + <waitForPageLoad stepKey="waitForHomePageToLoad2"/> |
| 58 | + <seeElement selector="{{StorefrontCategorySidebarMobileSection.shopByButton}}" stepKey="seeShopByButton"/> |
| 59 | + <click selector="{{StorefrontCategorySidebarMobileSection.shopByButton}}" stepKey="clickShopByButton"/> |
| 60 | + <seeElement selector="{{StorefrontCategorySidebarSection.filterOptionsTitle('$$attribute.attribute[default_label]$$')}}" stepKey="seeShopByOption"/> |
| 61 | + </test> |
| 62 | +</tests> |
0 commit comments