Skip to content

Commit 3550ec2

Browse files
committed
Renamed test
1 parent 9f8051a commit 3550ec2

File tree

1 file changed

+130
-0
lines changed

1 file changed

+130
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminUrlRewritesMultipleStoreviewsProductImportTest">
11+
<annotations>
12+
<features value="Url Rewrite"/>
13+
<stories value="Url Rewrites for Multiple Storeviews"/>
14+
<title value="Url Rewrites Correctly Generated for Multiple Storeviews During Product Import"/>
15+
<description value="Check Url Rewrites Correctly Generated for Multiple Storeviews During Product Import."/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-12656"/>
18+
<group value="urlRewrite"/>
19+
</annotations>
20+
<before>
21+
<createData entity="ApiCategory" stepKey="createCategory">
22+
<field key="name">category-admin</field>
23+
</createData>
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25+
<!-- Create Store View EN -->
26+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreViewEn">
27+
<argument name="customStore" value="customStoreENNotUnique"/>
28+
</actionGroup>
29+
<!-- Create Store View NL -->
30+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreViewNl">
31+
<argument name="customStore" value="customStoreNLNotUnique"/>
32+
</actionGroup>
33+
</before>
34+
<after>
35+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
36+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn">
37+
<argument name="customStore" value="customStoreENNotUnique"/>
38+
</actionGroup>
39+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewNl">
40+
<argument name="customStore" value="customStoreNLNotUnique"/>
41+
</actionGroup>
42+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearStoreFilters"/>
43+
<actionGroup ref="DeleteProductByNameActionGroup" stepKey="deleteImportedProduct">
44+
<argument name="sku" value="productformagetwo68980"/>
45+
<argument name="name" value="productformagetwo68980"/>
46+
</actionGroup>
47+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersIfSet"/>
48+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
49+
</after>
50+
<actionGroup ref="SwitchCategoryStoreViewActionGroup" stepKey="switchToStoreViewEn">
51+
<argument name="Store" value="customStoreENNotUnique.name"/>
52+
<argument name="CatName" value="$$createCategory.name$$"/>
53+
</actionGroup>
54+
<uncheckOption selector="{{AdminCategoryBasicFieldSection.categoryNameUseDefault}}" stepKey="uncheckUseDefaultValueENStoreView"/>
55+
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="category-english" stepKey="changeNameField"/>
56+
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="clickOnSectionHeader"/>
57+
<actionGroup ref="ChangeSeoUrlKeyForSubCategoryActionGroup" stepKey="changeSeoUrlKeyENStoreView">
58+
<argument name="value" value="category-english"/>
59+
</actionGroup>
60+
<actionGroup ref="SwitchCategoryStoreViewActionGroup" stepKey="switchToStoreViewNl">
61+
<argument name="Store" value="customStoreNLNotUnique.name"/>
62+
<argument name="CatName" value="$$createCategory.name$$"/>
63+
</actionGroup>
64+
<uncheckOption selector="{{AdminCategoryBasicFieldSection.categoryNameUseDefault}}" stepKey="uncheckUseDefaultValue1"/>
65+
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="category-dutch" stepKey="changeNameFieldNLStoreView"/>
66+
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="clickOnSectionHeader2"/>
67+
<actionGroup ref="ChangeSeoUrlKeyForSubCategoryActionGroup" stepKey="changeSeoUrlKeyNLStoreView">
68+
<argument name="value" value="category-dutch"/>
69+
</actionGroup>
70+
<amOnPage url="{{AdminImportIndexPage.url}}" stepKey="navigateToSystemImport"/>
71+
<selectOption selector="{{AdminImportMainSection.entityType}}" userInput="Products" stepKey="selectProductsOption"/>
72+
<waitForElementVisible selector="{{AdminImportMainSection.importBehavior}}" stepKey="waitForImportBehaviorElementVisible"/>
73+
<selectOption selector="{{AdminImportMainSection.importBehavior}}" userInput="Add/Update" stepKey="selectAddUpdateOption"/>
74+
<attachFile selector="{{AdminImportMainSection.selectFileToImport}}" userInput="import_updated.csv" stepKey="attachFileForImport"/>
75+
<click selector="{{AdminImportHeaderSection.checkDataButton}}" stepKey="clickCheckDataButton"/>
76+
<see selector="{{AdminImportValidationMessagesSection.notice}}" userInput="Checked rows: 3, checked entities: 1, invalid rows: 0, total errors: 0" stepKey="assertNotice"/>
77+
<see selector="{{AdminImportValidationMessagesSection.success}}" userInput="File is valid! To start import process press &quot;Import&quot; button" stepKey="assertSuccessMessage"/>
78+
<click selector="{{AdminImportMainSection.importButton}}" stepKey="clickImportButton"/>
79+
<see selector="{{AdminImportValidationMessagesSection.success}}" userInput="Import successfully done" stepKey="assertSuccessMessage1"/>
80+
<see selector="{{AdminImportValidationMessagesSection.notice}}" userInput="Created: 1, Updated: 0, Deleted: 0" stepKey="assertNotice1"/>
81+
<actionGroup ref="SearchForProductOnBackendByNameActionGroup" stepKey="searchForProductOnBackend">
82+
<argument name="productName" value="productformagetwo68980"/>
83+
</actionGroup>
84+
<click selector="{{AdminProductGridSection.productRowBySku('productformagetwo68980')}}" stepKey="clickOnProductRow"/>
85+
<grabFromCurrentUrl regex="~/id/(\d+)/~" stepKey="grabProductIdFromUrl"/>
86+
<amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="goToUrlRewritesIndexPage"/>
87+
88+
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters"/>
89+
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="category-english.html" stepKey="inputCategoryUrlForENStoreView"/>
90+
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters"/>
91+
<waitForPageLoad stepKey="waitForPageToLoad"/>
92+
<seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-english.html')}}" stepKey="seeUrlInRequestPathColumn"/>
93+
<seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/category/view/id/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn"/>
94+
95+
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters1"/>
96+
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="category-dutch.html" stepKey="inputCategoryUrlForNLStoreView"/>
97+
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters1"/>
98+
<waitForPageLoad stepKey="waitForPageToLoad1"/>
99+
<seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-dutch.html')}}" stepKey="seeUrlInRequestPathColumn1"/>
100+
<seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/category/view/id/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn1"/>
101+
102+
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters2"/>
103+
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="productformagetwo68980-english.html" stepKey="inputProductUrlForENStoreView"/>
104+
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters2"/>
105+
<waitForPageLoad stepKey="waitForPageToLoad2"/>
106+
<seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'productformagetwo68980-english.html')}}" stepKey="seeUrlInRequestPathColumn2"/>
107+
<seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', 'catalog/product/view/id/$grabProductIdFromUrl')}}" stepKey="seeUrlInTargetPathColumn2"/>
108+
109+
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters3"/>
110+
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="productformagetwo68980-dutch.html" stepKey="inputProductUrlForENStoreView1"/>
111+
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters3"/>
112+
<waitForPageLoad stepKey="waitForPageToLoad3"/>
113+
<seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'productformagetwo68980-dutch.html')}}" stepKey="seeUrlInRequestPathColumn3"/>
114+
<seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', 'catalog/product/view/id/$grabProductIdFromUrl')}}" stepKey="seeUrlInTargetPathColumn3"/>
115+
116+
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters4"/>
117+
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="category-english/productformagetwo68980-english.html" stepKey="inputProductUrlForENStoreView2"/>
118+
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters4"/>
119+
<waitForPageLoad stepKey="waitForPageToLoad4"/>
120+
<seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-english/productformagetwo68980-english.html')}}" stepKey="seeUrlInRequestPathColumn4"/>
121+
<seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/product/view/id/$grabProductIdFromUrl/category/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn4"/>
122+
123+
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters5"/>
124+
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="category-dutch/productformagetwo68980-dutch.html" stepKey="inputProductUrlForENStoreView3"/>
125+
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters5"/>
126+
<waitForPageLoad stepKey="waitForPageToLoad5"/>
127+
<seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-dutch/productformagetwo68980-dutch.html')}}" stepKey="seeUrlInRequestPathColumn5"/>
128+
<seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/product/view/id/$grabProductIdFromUrl/category/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn5"/>
129+
</test>
130+
</tests>

0 commit comments

Comments
 (0)