Skip to content

Commit e638ba0

Browse files
committed
MC-15101: Child Configurable product does not save disabled status via API
1 parent 3009388 commit e638ba0

File tree

2 files changed

+108
-2
lines changed

2 files changed

+108
-2
lines changed

app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,14 +603,14 @@
603603
<test name="QuickSearchConfigurableChildren">
604604
<annotations>
605605
<stories value="Search Product on Storefront"/>
606-
<title value="User should be able to use Quick Search to a configurable product's child products"/>
606+
<title value="Deprecated. User should be able to use Quick Search to a configurable product's child products"/>
607607
<description value="Use Quick Search to find a configurable product with enabled/disable children"/>
608608
<severity value="MAJOR"/>
609609
<testCaseId value="MC-14798"/>
610610
<group value="CatalogSearch"/>
611611
<group value="mtf_migrated"/>
612612
<skip>
613-
<issueId value="MC-15101"/>
613+
<issueId value="DEPRECATED">Use StorefrontQuickSearchConfigurableChildrenTest instead.</issueId>
614614
</skip>
615615
</annotations>
616616
<before>
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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="StorefrontQuickSearchConfigurableChildrenTest">
12+
<annotations>
13+
<stories value="Search Product on Storefront"/>
14+
<title value="User should be able to use Quick Search to a configurable product's child products"/>
15+
<description value="Use Quick Search to find a configurable product with enabled/disable children"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MC-14798"/>
18+
<group value="CatalogSearch"/>
19+
<group value="mtf_migrated"/>
20+
</annotations>
21+
<before>
22+
<!-- Create the category -->
23+
<createData entity="ApiCategory" stepKey="createCategory"/>
24+
<!-- Create blank AttributeSet-->
25+
<createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/>
26+
<!-- Create an attribute with two options to be used in the first child product -->
27+
<createData entity="hiddenDropdownAttributeWithOptions" stepKey="createProductAttribute"/>
28+
<createData entity="productAttributeOption1" stepKey="createProductAttributeOption">
29+
<requiredEntity createDataKey="createProductAttribute"/>
30+
</createData>
31+
32+
<!-- Assign attribute to set -->
33+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
34+
<actionGroup ref="goToAttributeGridPage" stepKey="goToAttributeSetPage"/>
35+
<actionGroup ref="goToAttributeSetByName" stepKey="openAttributeSetByName">
36+
<argument name="name" value="$createAttributeSet.attribute_set_name$"/>
37+
</actionGroup>
38+
<actionGroup ref="AssignAttributeToGroup" stepKey="assignAttributeToGroup">
39+
<argument name="group" value="Product Details"/>
40+
<argument name="attribute" value="$createProductAttribute.attribute_code$"/>
41+
</actionGroup>
42+
<actionGroup ref="SaveAttributeSet" stepKey="savePage"/>
43+
44+
<!-- Get the first option of the attribute we created -->
45+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getAttributeOption">
46+
<requiredEntity createDataKey="createProductAttribute"/>
47+
</getData>
48+
49+
<!-- Create a simple product -->
50+
<createData entity="ApiSimpleOneHidden" storeCode="all" stepKey="createSimpleProduct">
51+
<field key="attribute_set_id">$createAttributeSet.attribute_set_id$</field>
52+
<requiredEntity createDataKey="createProductAttribute"/>
53+
<requiredEntity createDataKey="getAttributeOption"/>
54+
</createData>
55+
<updateData entity="ApiSimpleProductUpdateDescription" createDataKey="createSimpleProduct" stepKey="updateSimpleProduct"/>
56+
57+
<!-- Create the configurable product -->
58+
<createData entity="ApiConfigurableProduct" stepKey="createConfigurableProduct">
59+
<field key="attribute_set_id">$createAttributeSet.attribute_set_id$</field>
60+
<requiredEntity createDataKey="createCategory"/>
61+
</createData>
62+
<!-- Create the configurable product option -->
63+
<createData entity="ConfigurableProductOneOption" stepKey="createConfigProductOption">
64+
<requiredEntity createDataKey="createConfigurableProduct"/>
65+
<requiredEntity createDataKey="createProductAttribute"/>
66+
<requiredEntity createDataKey="getAttributeOption"/>
67+
</createData>
68+
<!-- Add the first simple product to the configurable product -->
69+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild">
70+
<requiredEntity createDataKey="createConfigurableProduct"/>
71+
<requiredEntity createDataKey="createSimpleProduct"/>
72+
</createData>
73+
</before>
74+
<after>
75+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
76+
<deleteData createDataKey="createConfigurableProduct" stepKey="deleteConfigurableProduct"/>
77+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
78+
<deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>
79+
<deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/>
80+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
81+
</after>
82+
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToHomePage"/>
83+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefront">
84+
<argument name="phrase" value="$createConfigurableProduct.name$"/>
85+
</actionGroup>
86+
<actionGroup ref="StorefrontQuickSearchCheckProductNameInGrid" stepKey="seeProductInGrid">
87+
<argument name="productName" value="$createConfigurableProduct.name$"/>
88+
<argument name="index" value="1"/>
89+
</actionGroup>
90+
91+
<!-- Disable Child Product -->
92+
<actionGroup ref="goToProductPageViaID" stepKey="openSimpleProduct">
93+
<argument name="productId" value="$createSimpleProduct.id$"/>
94+
</actionGroup>
95+
<actionGroup ref="toggleProductEnabled" stepKey="disableProduct"/>
96+
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
97+
98+
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToHomePageAgain"/>
99+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefrontAgain">
100+
<argument name="phrase" value="$createConfigurableProduct.name$"/>
101+
</actionGroup>
102+
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="dontSeeProductAnymore">
103+
<argument name="productName" value="$createConfigurableProduct.name$"/>
104+
</actionGroup>
105+
</test>
106+
</tests>

0 commit comments

Comments
 (0)