Skip to content

Commit 4a3d8a3

Browse files
committed
B2B-1650: Add MFTF test for MC-38248
- Fixing import config product to be rerunnable if import fails
1 parent 7a10f5d commit 4a3d8a3

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

app/code/Magento/ConfigurableImportExport/Test/Mftf/Test/AdminImportSimpleAndConfigurableProductsWithAssignedImagesTest.xml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
</annotations>
2424

2525
<before>
26+
<!-- Login as Admin -->
27+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
28+
2629
<!-- Create Category, Product Attribute with 3 Options, & Customer -->
2730
<createData entity="ImportCategory_Configurable" stepKey="createImportCategory"/>
2831
<createData entity="ProductAttributeWithThreeOptionsForImport" stepKey="createImportProductAttribute"/>
@@ -56,24 +59,32 @@
5659
<argument name="source">dev/tests/acceptance/tests/_data/{{ImportProductSimple3_Configurable.thumbnailImage}}</argument>
5760
<argument name="destination">var/import/images/{{ImportProduct_Configurable.name}}/{{ImportProductSimple3_Configurable.thumbnailImage}}</argument>
5861
</helper>
59-
60-
<!-- Login as Admin -->
61-
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
6262
</before>
6363

6464
<after>
6565
<!-- Delete Data -->
6666
<deleteData createDataKey="createImportCategory" stepKey="deleteImportCategory"/>
67+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="openProductIndexPage"/>
68+
<actionGroup ref="AdminGridFilterFillInputFieldActionGroup" stepKey="filterProductsGrid">
69+
<argument name="filterInputName" value="sku"/>
70+
<argument name="filterValue" value="{{ImportProduct_Configurable.name}}"/>
71+
</actionGroup>
72+
<actionGroup ref="AdminGridFilterApplyActionGroup" stepKey="applyProductsFilter"/>
73+
<actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteProducts"/>
74+
<actionGroup ref="AdminGridFilterFillInputFieldActionGroup" stepKey="filterProductsGrid2">
75+
<argument name="filterInputName" value="sku"/>
76+
<argument name="filterValue" value="import-product"/>
77+
</actionGroup>
78+
<actionGroup ref="AdminGridFilterApplyActionGroup" stepKey="applyProductsFilter2"/>
79+
<actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteProducts2"/>
80+
<actionGroup ref="AdminGridFilterResetActionGroup" stepKey="resetProductsGrid"/>
81+
<actionGroup ref="AdminDeleteProductAttributeByLabelActionGroup" stepKey="deleteAttribute">
82+
<argument name="productAttributeLabel" value="{{ProductAttributeFrontendLabelImport1.label}}" />
83+
</actionGroup>
6784
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
6885
<helper class="\Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteDirectory" stepKey="deleteProductImageDirectory">
6986
<argument name="path">var/import/images/{{ImportProduct_Configurable.name}}</argument>
7087
</helper>
71-
<deleteData url="/V1/products/{{ImportProductSimple1_Configurable.urlKey}}" stepKey="deleteImportedSimpleProduct1"/>
72-
<deleteData url="/V1/products/{{ImportProductSimple2_Configurable.urlKey}}" stepKey="deleteImportedSimpleProduct2"/>
73-
<deleteData url="/V1/products/{{ImportProductSimple3_Configurable.urlKey}}" stepKey="deleteImportedSimpleProduct3"/>
74-
<deleteData url="/V1/products/{{ImportProduct_Configurable.urlKey}}" stepKey="deleteImportedConfigurableProduct"/>
75-
<deleteData createDataKey="createImportProductAttribute" stepKey="deleteProductAttribute"/>
76-
<actionGroup ref="NavigateToAndResetProductGridToDefaultViewActionGroup" stepKey="navigateToAndResetProductGridToDefaultView"/>
7788
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
7889
</after>
7990

0 commit comments

Comments
 (0)