Skip to content

Commit ae911c1

Browse files
committed
Merge branch 'MAGETWO-91580-Empty-product-attributes-of-dropdown' of https://github.com/magento-honey-badgers/magento2ce into MAGETWO-91580-Empty-product-attributes-of-dropdown
2 parents 527fbbb + 6c799ec commit ae911c1

File tree

3 files changed

+63
-1
lines changed

3 files changed

+63
-1
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeData.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<requiredEntity type="FrontendLabel">ProductAttributeFrontendLabel</requiredEntity>
3333
</entity>
3434
<entity name="productAttributeWithTwoOptions" type="ProductAttribute">
35-
<data key="attribute_code" unique="suffix">attribute</data>
35+
<data key="attribute_code" unique="suffix">testattribute</data>
3636
<data key="frontend_input">select</data>
3737
<data key="scope">global</data>
3838
<data key="is_required">false</data>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductData.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
<data key="visibility">4</data>
5252
<data key="status">1</data>
5353
<data key="quantity">1000</data>
54+
<data key="urlKey" unique="suffix">simpleproduct</data>
5455
<data key="weight">1</data>
5556
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
5657
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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

Comments
 (0)