|
| 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