/
AdminURLKeyWorksWhenUpdatingProductThroughImportingCSVTest.xml
49 lines (48 loc) · 2.51 KB
/
AdminURLKeyWorksWhenUpdatingProductThroughImportingCSVTest.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?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="AdminURLKeyWorksWhenUpdatingProductThroughImportingCSVTest">
<annotations>
<features value="Import/Export"/>
<stories value="Import Products"/>
<title value="Check that new URL Key works after updating a product through importing CSV file"/>
<description value="Check that new URL Key works after updating a product through importing CSV file"/>
<severity value="MAJOR"/>
<testCaseId value="MC-6317"/>
<useCaseId value="MAGETWO-91544"/>
<group value="importExport"/>
</annotations>
<before>
<!--Create Product-->
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
<createData entity="SimpleProductBeforeUpdate" stepKey="createProduct">
<requiredEntity createDataKey="createCategory"/>
</createData>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>
<after>
<!--Delete created data-->
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
</after>
<!--Import product from CSV file-->
<actionGroup ref="AdminImportProductsActionGroup" stepKey="importProduct">
<argument name="behavior" value="Add/Update"/>
<argument name="importFile" value="simpleProductUpdate.csv"/>
<argument name="importNoticeMessage" value="Created: 0, Updated: 1, Deleted: 0"/>
</actionGroup>
<!--Assert product's updated url-->
<amOnPage url="{{StorefrontProductPage.url('simpleprod')}}" stepKey="navigateToProductPage"/>
<waitForPageLoad stepKey="waitForProductPageLoad"/>
<seeInCurrentUrl url="{{StorefrontProductPage.url('simpleprod')}}" stepKey="seeUpdatedUrl"/>
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createProduct.name$$" stepKey="assertProductName"/>
<see selector="{{StorefrontProductInfoMainSection.productSku}}" userInput="$$createProduct.sku$$" stepKey="assertProductSku"/>
</test>
</tests>