|
| 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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> |
| 11 | + <test name="StorefrontProductWithEmptyAttributeTest"> |
| 12 | + <annotations> |
| 13 | + <title value="Product attribute is not visible on storefront if it is empty"/> |
| 14 | + <description value="Product attribute should not be visible on storefront if it is empty"/> |
| 15 | + <severity value="MAJOR"/> |
| 16 | + <testCaseId value="MAGETWO-91893"/> |
| 17 | + <group value="product"/> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + <!--<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>--> |
| 21 | + <createData entity="_defaultCategory" stepKey="createPreReqCategory"/> |
| 22 | + <!--<createData entity="productAttributeWithTwoOptions" stepKey="createProductAttribute"/>--> |
| 23 | + </before> |
| 24 | + <after> |
| 25 | + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteSimpleProduct"> |
| 26 | + <argument name="product" value="SimpleProduct"/> |
| 27 | + </actionGroup> |
| 28 | + <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> |
| 29 | + <!--<deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>--> |
| 30 | + <actionGroup ref="logout" stepKey="logoutOfAdmin"/> |
| 31 | + </after> |
| 32 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> |
| 33 | + <amOnPage url="{{ProductAttributePage.url}}" stepKey="navigateToProductAttribute"/> |
| 34 | + <waitForPageLoad stepKey="wait1"/> |
| 35 | + <!--<click selector="#add" stepKey="addNewAttribute"/>--> |
| 36 | + <fillField selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="testattribute" stepKey="fillAttributeLabel"/> |
| 37 | + <selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="Dropdown" stepKey="selectCatalogAttributeInputType"/> |
| 38 | + <click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="clickStorefrontPropertiesTab"/> |
| 39 | + <selectOption selector="#is_visible_on_front" userInput="Yes" stepKey="isVisibleOnStoreFront"/> |
| 40 | + <selectOption selector="#used_in_product_listing" userInput="Yes" stepKey="usedInProductListing"/> |
| 41 | + <click selector="{{AttributePropertiesSection.Save}}" stepKey="saveAttribute"/> |
| 42 | + <waitForPageLoad stepKey="waitForSaveAttribute"/> |
| 43 | + <amOnPage url="{{AdminProductAttributeSetGridPage.url}}" stepKey="amOnAttributeSetPage"/> |
| 44 | + <click selector="{{AdminProductAttributeSetGridSection.AttributeSetName('Default')}}" stepKey="chooseDefaultAttributeSet"/> |
| 45 | + <waitForPageLoad stepKey="waitForAttributeSetPageLoad"/> |
| 46 | + <dragAndDrop selector1="{{UnassignedAttributes.ProductAttributeName('testattribute')}}" selector2="{{Group.FolderName('Product Details')}}" stepKey="moveProductAttributeToGroup"/> |
| 47 | + <click selector="{{AttributeSetSection.Save}}" stepKey="saveAttributeSet"/> |
| 48 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear" /> |
| 49 | + <seeElement selector=".message-success" stepKey="assertSuccess"/> |
| 50 | + <actionGroup ref="FillAdminSimpleProductForm" stepKey="fillProductFieldsInAdmin"> |
| 51 | + <argument name="category" value="$$createPreReqCategory$$"/> |
| 52 | + <argument name="simpleProduct" value="SimpleProduct"/> |
| 53 | + </actionGroup> |
| 54 | + <actionGroup ref="ClearCacheActionGroup" stepKey="clearCache"/> |
| 55 | + <amOnPage url="{{StorefrontProductPage.url(SimpleProduct.urlKey)}}" stepKey="goProductPageOnStorefront"/> |
| 56 | + <waitForPageLoad stepKey="waitForProductPageToLoad"/> |
| 57 | + <!--<see selector="#product-attribute-specs-table tr th:nth-of-type(1)" stepKey="seeAttribute"/>--> |
| 58 | + <!--<scrollTo selector=".additional-attributes tbody td:nth-of-type(1)" stepKey="seeAttribute1"/>--> |
| 59 | + <dontSeeElement selector="//table[@id='product-attribute-specs-table']/tbody/tr/th[contains(text(),'testattribute')]" stepKey="seeAttribute2"/> |
| 60 | + </test> |
| 61 | + </tests> |
0 commit comments