Skip to content

Commit

Permalink
MAGETWO-70803: [GITHUB] Inconsistent CSV file Import error: #7495
Browse files Browse the repository at this point in the history
- Added automated test script
  • Loading branch information
Lusine-Papyan committed Jun 25, 2019
1 parent c240fda commit 9fe4384
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@
<waitForPageLoad stepKey="AdminMessagesSection"/>
<see selector="{{AdminMessagesSection.notice}}" userInput="{{importMessage}}" stepKey="seeImportMessage"/>
</actionGroup>
<actionGroup name="checkDataForImportProductActionGroup" extends="AdminImportProductsActionGroup">
<remove keyForRemoval="clickImportButton"/>
<remove keyForRemoval="AdminImportMainSectionLoad2"/>
<remove keyForRemoval="assertSuccessMessage"/>
<remove keyForRemoval="AdminMessagesSection"/>
<remove keyForRemoval="seeImportMessage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
<element name="importBehavior" type="select" selector="#basic_behavior"/>
<element name="selectFileToImport" type="input" selector="#import_file"/>
<element name="importButton" type="button" selector="#import_validation_container button" timeout="30"/>
<element name="messageSuccess" type="text" selector=".messages div.message-success"/>
<element name="messageError" type="text" selector=".messages div.message-error"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminProductImportCSVFileCorrectDifferentFilesTest">
<annotations>
<description value="Product import from CSV file correct from different files."/>
<features value="Import/Export"/>
<title value="Product import from CSV file correct from different files."/>
<severity value="MAJOR"/>
<testCaseId value="MC-17104"/>
<useCaseId value="MAGETWO-70803"/>
<group value="importExport"/>
</annotations>
<before>
<!--Login as Admin-->
<comment userInput="Login as Admin" stepKey="commentLogin"/>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>
<after>
<!--Logout from Admin-->
<comment userInput="Logout from Admin" stepKey="commentLogout"/>
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
</after>
<!--Check data products with add/update behavior-->
<comment userInput="Check data products with add/update behavior" stepKey="commentCheckData"/>
<actionGroup ref="checkDataForImportProductActionGroup" stepKey="adminImportProducts">
<argument name="behavior" value="Add/Update"/>
<argument name="importFile" value="BB-ProductsWorking.csv"/>
<argument name="importMessage" value="Checked rows: 28, checked entities: 28, invalid rows: 0, total errors: 0"/>
</actionGroup>
<see selector="{{AdminImportMainSection.messageSuccess}}" userInput='File is valid! To start import process press "Import" button' stepKey="seeSuccessMessage"/>
<actionGroup ref="checkDataForImportProductActionGroup" stepKey="adminImportProducts1">
<argument name="behavior" value="Add/Update"/>
<argument name="importFile" value="BB-Products.csv"/>
<argument name="importMessage" value="Checked rows: 117, checked entities: 115, invalid rows: 2, total errors: 2"/>
<argument name="checkMessage" value='Curly quotes used instead of straight quotes in row(s): 84, 85'/>
</actionGroup>
<see selector="{{AdminImportMainSection.messageError}}" userInput='Curly quotes used instead of straight quotes in row(s): 84, 85' stepKey="seeErrorMessage"/>
</test>
</tests>
Loading

0 comments on commit 9fe4384

Please sign in to comment.