Skip to content

Commit f1e99e2

Browse files
Davit_Zakharyanstkorf
authored andcommitted
MAGETWO-99509: Download Option not working in Exports
- Added automated test script.
1 parent ac9df79 commit f1e99e2

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

app/code/Magento/ImportExport/Test/Mftf/Section/AdminExportMainSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="AdminExportMainSection">
1111
<element name="entityType" type="select" selector="#entity"/>
12+
<element name="exportFileFormat" type="select" selector="#file_format"/>
1213
<element name="entityAttributes" type="select" selector="#export_filter_form"/>
1314
</section>
1415
</sections>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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="AdminCheckThatCSVCanBeExportedTest">
12+
<annotations>
13+
<title value="Check that CSV can be exported"/>
14+
<description value="Check that CSV can be exported"/>
15+
<features value="ImportExport"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MAGETWO-99457"/>
18+
<useCaseId value="MAGETWO-98703"/>
19+
<group value="importexport"/>
20+
</annotations>
21+
<before>
22+
<!-- Create category and simple product, then log in -->
23+
<comment userInput="Create category and simple product, then log in" stepKey="createDataAndLogIn"/>
24+
<createData entity="ApiCategory" stepKey="createCategory"/>
25+
<createData entity="ApiSimpleProduct" stepKey="createProduct">
26+
<requiredEntity createDataKey="createCategory"/>
27+
</createData>
28+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
29+
</before>
30+
<after>
31+
<!-- Delete exported file, created data and log out -->
32+
<comment userInput="Delete exported file, created data and log out" stepKey="deleteCreatedData"/>
33+
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
34+
<argument name="rowIndex" value="0"/>
35+
</actionGroup>
36+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
37+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
38+
<actionGroup ref="logout" stepKey="logout"/>
39+
</after>
40+
<!-- Go to System -> Data Transfer -> Export page -->
41+
<comment userInput="Go to System -> Data Transfer -> Export page" stepKey="goToAdminExportIndexPage"/>
42+
<amOnPage url="{{AdminExportIndexPage.url}}" stepKey="navigateToAdminExportIndexPage"/>
43+
<waitForPageLoad stepKey="waitPageToLoad"/>
44+
<!-- Export all products -->
45+
<comment userInput="Export all products" stepKey="exportAllProds"/>
46+
<actionGroup ref="exportAllProducts" stepKey="exportAllProducts"/>
47+
<!-- Run cron -->
48+
<comment userInput="Run cron" stepKey="cronRun"/>
49+
<magentoCLI command="cron:run" stepKey="runCron"/>
50+
<!-- Download CSV file -->
51+
<comment userInput="Download CSV file" stepKey="downloadCSVFile"/>
52+
<actionGroup ref="downloadFileByRowIndex" stepKey="downloadCreatedProducts">
53+
<argument name="rowIndex" value="0"/>
54+
</actionGroup>
55+
</test>
56+
</tests>

0 commit comments

Comments
 (0)