Skip to content

Commit 2e2fb2b

Browse files
merge magento/2.3-develop into magento-arcticfoxes/2.3-develop-pr
2 parents 069c55b + ee8bd11 commit 2e2fb2b

File tree

1 file changed

+117
-1
lines changed

1 file changed

+117
-1
lines changed

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType.xml

Lines changed: 117 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<group value="catalog"/>
5555
<group value="mtf_migrated"/>
5656
<skip>
57-
<issueId value="MAGETWO-62808"/>
57+
<issueId value="MSI-2110"/>
5858
</skip>
5959
</annotations>
6060
<before>
@@ -83,4 +83,120 @@
8383
<argument name="optionName" value="$createConfigProductAttributeOption1.option[store_labels][1][label]$"/>
8484
</actionGroup>
8585
</test>
86+
<test name="AdminCreateSimpleProductSwitchToConfigurableTest" extends="AdminCreateSimpleProductSwitchToVirtualTest">
87+
<annotations>
88+
<features value="Catalog"/>
89+
<stories value="Product Type Switching"/>
90+
<title value="Admin should be able to switch a new product from simple to configurable"/>
91+
<description value="After selecting a simple product when adding Admin should be switch to configurable implicitly"/>
92+
<severity value="CRITICAL"/>
93+
<useCaseId value="MAGETWO-44165"/>
94+
<testCaseId value="MAGETWO-29398"/>
95+
<group value="catalog"/>
96+
<group value="mtf_migrated"/>
97+
<skip>
98+
<issueId value="MSI-2110"/>
99+
</skip>
100+
</annotations>
101+
<before>
102+
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
103+
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1">
104+
<requiredEntity createDataKey="createConfigProductAttribute"/>
105+
</createData>
106+
</before>
107+
<after>
108+
<deleteData stepKey="deleteAttribute" createDataKey="createConfigProductAttribute"/>
109+
</after>
110+
<actionGroup ref="GoToSpecifiedCreateProductPage" stepKey="openProductFillForm">
111+
<argument name="productType" value="simple"/>
112+
</actionGroup>
113+
<!-- Create configurable product from simple product page-->
114+
<comment userInput="Create configurable product" stepKey="commentCreateProduct"/>
115+
<actionGroup ref="fillMainProductForm" stepKey="fillProductForm">
116+
<argument name="product" value="_defaultProduct"/>
117+
</actionGroup>
118+
<comment before="createConfiguration" stepKey="beforeCreateConfiguration" userInput="Adding Configuration to Product"/>
119+
<actionGroup ref="generateConfigurationsByAttributeCode" stepKey="createConfiguration" after="fillProductForm">
120+
<argument name="attributeCode" value="$$createConfigProductAttribute.attribute_code$$"/>
121+
</actionGroup>
122+
<actionGroup ref="saveConfiguredProduct" stepKey="saveProductForm"/>
123+
<see selector="{{AdminProductGridSection.productGridCell('2', 'Type')}}" userInput="Configurable Product" stepKey="seeProductTypeInGrid"/>
124+
<!-- Verify product on store front -->
125+
<comment userInput="Verify product on store front" stepKey="commentVerifyProductGrid"/>
126+
<actionGroup ref="VerifyOptionInProductStorefront" stepKey="verifyConfigurableOption" after="AssertProductInStorefrontProductPage">
127+
<argument name="attributeCode" value="$createConfigProductAttribute.default_frontend_label$"/>
128+
<argument name="optionName" value="$createConfigProductAttributeOption1.option[store_labels][1][label]$"/>
129+
</actionGroup>
130+
</test>
131+
<test name="AdminCreateDownloadableProductSwitchToConfigurableTest">
132+
<annotations>
133+
<features value="Catalog"/>
134+
<stories value="Product Type Switching"/>
135+
<title value="Admin should be able to switch a new product from downloadable to configurable"/>
136+
<description value="After selecting a downloadable product when adding Admin should be switch to configurable implicitly"/>
137+
<severity value="CRITICAL"/>
138+
<useCaseId value="MAGETWO-44165"/>
139+
<testCaseId value="MAGETWO-29398"/>
140+
<group value="catalog"/>
141+
<group value="mtf_migrated"/>
142+
<skip>
143+
<issueId value="MSI-2110"/>
144+
</skip>
145+
</annotations>
146+
<before>
147+
<createData entity="_defaultCategory" stepKey="createPreReqCategory"/>
148+
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
149+
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1">
150+
<requiredEntity createDataKey="createConfigProductAttribute"/>
151+
</createData>
152+
</before>
153+
<after>
154+
<actionGroup ref="GoToProductCatalogPage" stepKey="goToProductCatalogPage"/>
155+
<actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteConfigurableProduct">
156+
<argument name="product" value="_defaultProduct"/>
157+
</actionGroup>
158+
<actionGroup ref="resetProductGridToDefaultView" stepKey="resetSearch"/>
159+
<deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/>
160+
<deleteData stepKey="deleteAttribute" createDataKey="createConfigProductAttribute"/>
161+
<actionGroup ref="logout" stepKey="logout"/>
162+
</after>
163+
<!-- Create configurable product from downloadable product page-->
164+
<comment userInput="Create configurable product" stepKey="commentCreateProduct"/>
165+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
166+
<!-- Open Dropdown and select downloadable product option -->
167+
<comment stepKey="beforeOpenProductFillForm" userInput="Selecting Product from the Add Product Dropdown"/>
168+
<actionGroup ref="GoToSpecifiedCreateProductPage" stepKey="openProductFillForm">
169+
<argument name="productType" value="downloadable"/>
170+
</actionGroup>
171+
<scrollTo selector="{{AdminProductDownloadableSection.sectionHeader}}" stepKey="scrollToDownloadableInfo" />
172+
<uncheckOption selector="{{AdminProductDownloadableSection.isDownloadableProduct}}" stepKey="checkIsDownloadable"/>
173+
<!-- Fill form for Downloadable Product Type -->
174+
<comment stepKey="beforeFillProductForm" userInput="Filling Product Form"/>
175+
<actionGroup ref="fillMainProductForm" stepKey="fillProductForm">
176+
<argument name="product" value="_defaultProduct"/>
177+
</actionGroup>
178+
<actionGroup ref="SetProductUrlKey" stepKey="setProductUrl">
179+
<argument name="product" value="_defaultProduct"/>
180+
</actionGroup>
181+
<comment before="createConfiguration" stepKey="beforeCreateConfiguration" userInput="Adding Configuration to Product"/>
182+
<actionGroup ref="generateConfigurationsByAttributeCode" stepKey="createConfiguration">
183+
<argument name="attributeCode" value="$$createConfigProductAttribute.attribute_code$$"/>
184+
</actionGroup>
185+
<actionGroup ref="saveConfiguredProduct" stepKey="saveProductForm"/>
186+
<!-- Check that product was added with implicit type change -->
187+
<comment stepKey="beforeVerify" userInput="Verify Product Type Assigned Correctly"/>
188+
<actionGroup ref="GoToProductCatalogPage" stepKey="goToProductCatalogPage"/>
189+
<actionGroup ref="resetProductGridToDefaultView" stepKey="resetSearch"/>
190+
<actionGroup ref="filterProductGridByName" stepKey="searchForProduct">
191+
<argument name="product" value="_defaultProduct"/>
192+
</actionGroup>
193+
<see selector="{{AdminProductGridSection.productGridCell('2', 'Type')}}" userInput="Configurable Product" stepKey="seeProductTypeInGrid"/>
194+
<actionGroup ref="AssertProductInStorefrontProductPage" stepKey="assertProductInStorefrontProductPage">
195+
<argument name="product" value="_defaultProduct"/>
196+
</actionGroup>
197+
<actionGroup ref="VerifyOptionInProductStorefront" stepKey="verifyConfigurableOption">
198+
<argument name="attributeCode" value="$createConfigProductAttribute.default_frontend_label$"/>
199+
<argument name="optionName" value="$createConfigProductAttributeOption1.option[store_labels][1][label]$"/>
200+
</actionGroup>
201+
</test>
86202
</tests>

0 commit comments

Comments
 (0)