/
AdminUpdateCategoryNameWithStoreViewTest.xml
82 lines (74 loc) · 4.95 KB
/
AdminUpdateCategoryNameWithStoreViewTest.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?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="AdminUpdateCategoryNameWithStoreViewTest">
<annotations>
<stories value="Update categories"/>
<title value="Update category, with custom store view"/>
<description value="Login as admin and update category name with custom Store View"/>
<testCaseId value="MC-6061"/>
<severity value="CRITICAL"/>
<group value="Catalog"/>
<group value="mtf_migrated"/>
</annotations>
<before>
<actionGroup ref="LoginAsAdmin" stepKey="loginToAdminPanel"/>
<createData entity="NewRootCategory" stepKey="rootCategory"/>
<createData entity="SimpleRootSubCategory" stepKey="category">
<requiredEntity createDataKey="rootCategory"/>
</createData>
</before>
<after>
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteCustomStore">
<argument name="storeGroupName" value="customStore.name"/>
</actionGroup>
<deleteData createDataKey="rootCategory" stepKey="deleteRootCategory"/>
<actionGroup ref="logout" stepKey="logout"/>
</after>
<!--Open store page -->
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
<waitForPageLoad stepKey="waitForSystemStorePage"/>
<!--Create Custom Store -->
<click selector="{{AdminStoresMainActionsSection.createStoreButton}}" stepKey="selectCreateStore"/>
<fillField userInput="{{customStore.name}}" selector="{{AdminNewStoreGroupSection.storeGrpNameTextField}}" stepKey="fillStoreName"/>
<fillField userInput="{{customStore.code}}" selector="{{AdminNewStoreGroupSection.storeGrpCodeTextField}}" stepKey="fillStoreCode"/>
<selectOption userInput="{{NewRootCategory.name}}" selector="{{AdminNewStoreGroupSection.storeRootCategoryDropdown}}" stepKey="selectStoreStatus"/>
<click selector="{{AdminStoresMainActionsSection.saveButton}}" stepKey="clickSaveStoreButton"/>
<!--Create Store View-->
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView">
<argument name="StoreGroup" value="customStore"/>
<argument name="customStore" value="customStore"/>
</actionGroup>
<!--Verify created SubCAtegory is present on Store Front -->
<amOnPage url="/{{NewRootCategory.name}}/{{SimpleRootSubCategory.name}}.html" stepKey="seeTheCategoryInStoreFront"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
<click selector="{{StorefrontFooterSection.switchStoreButton}}" stepKey="ClickSwitchStoreButtonOnDefaultStore"/>
<click selector="{{StorefrontFooterSection.storeLink(customStore.name)}}" stepKey="SelectSecondStoreToSwitchOn"/>
<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleRootSubCategory.name)}}" stepKey="seeCatergoryInStoreFront"/>
<!--Open Category Page-->
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/>
<waitForPageLoad stepKey="waitForPageToLoaded"/>
<!--Update Category-->
<click selector="{{AdminCategorySidebarTreeSection.expandAll}}" stepKey="expandToSeeAllCategories"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTreeUnderRoot(SimpleRootSubCategory.name)}}" stepKey="clickOnSubcategoryIsUndeRootCategory"/>
<waitForPageLoad stepKey="waitForPageToLoad1"/>
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{_defaultCategory.name}}" stepKey="updateCategoryName"/>
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveUpdatedCategory"/>
<waitForPageLoad stepKey="waitForCateforyToSave"/>
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
<!--Verify the Category is not present in Store Front-->
<amOnPage url="/{{NewRootCategory.name}}/{{SimpleRootSubCategory.name}}.html" stepKey="seeTheCategoryInStoreFront1"/>
<waitForPageLoad stepKey="waitForPageToLoaded2"/>
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleRootSubCategory.name)}}" stepKey="dontSeeCatergoryInStoreFront"/>
<!--Verify the Updated Category is present in Store Front-->
<amOnPage url="/{{NewRootCategory.name}}/{{_defaultCategory.name}}.html" stepKey="seeTheUpdatedCategoryInStoreFront"/>
<waitForPageLoad stepKey="waitForPageToLoaded3"/>
<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(_defaultCategory.name)}}" stepKey="seeUpdatedCatergoryInStoreFront"/>
</test>
</tests>