|
| 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="AdminRenameCategoryOnStoreViewLevelTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Rename Category on Store View level"/> |
| 15 | + <title value="Admin Rename Category on Store View level"/> |
| 16 | + <description value="Admin Rename Category on Store View level"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="AC-4284"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!-- log in as admin --> |
| 22 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 23 | + |
| 24 | + <!--Custom Store View --> |
| 25 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView"> |
| 26 | + <argument name="customStore" value="NewStoreViewData"/> |
| 27 | + </actionGroup> |
| 28 | + |
| 29 | + <!-- create Category and SubCategory --> |
| 30 | + <createData entity="SimpleSubCategory" stepKey="simpleSubCategoryOne"/> |
| 31 | + <createData entity="SubCategoryWithParent" stepKey="simpleSubCategoryWithParent"> |
| 32 | + <requiredEntity createDataKey="simpleSubCategoryOne"/> |
| 33 | + </createData> |
| 34 | + |
| 35 | + <!-- create product and assiging Category and SubCategory --> |
| 36 | + <createData entity="SimpleProduct" stepKey="createProduct"> |
| 37 | + <requiredEntity createDataKey="simpleSubCategoryOne"/> |
| 38 | + <requiredEntity createDataKey="simpleSubCategoryWithParent"/> |
| 39 | + </createData> |
| 40 | + </before> |
| 41 | + |
| 42 | + <!-- Goto Parent catagory page and select Catagory and store scope--> |
| 43 | + <actionGroup ref="SwitchCategoryStoreViewActionGroup" stepKey="SwitchStoreView"> |
| 44 | + <argument name="Store" value="NewStoreViewData.name"/> |
| 45 | + <argument name="CatName" value="SimpleSubCategory.name"/> |
| 46 | + </actionGroup> |
| 47 | + |
| 48 | + <!--See "Use Default Value" checkboxes--> |
| 49 | + <seeElement selector="{{AdminCategoryBasicFieldSection.enableUseDefault}}" stepKey="seeUseDefaultEnable"/> |
| 50 | + <seeElement selector="{{AdminCategoryBasicFieldSection.includeInMenuUseDefault}}" stepKey="seeUseDefaultMenu"/> |
| 51 | + <seeElement selector="{{AdminCategoryBasicFieldSection.categoryNameUseDefault}}" stepKey="seeUseDefaultName"/> |
| 52 | + |
| 53 | + <!--Update Parent Category name and URL and save it --> |
| 54 | + <actionGroup ref="AdminChangeCategoryAndURLNameActionGroup" stepKey="updateCategory1Name"/> |
| 55 | + |
| 56 | + <!--Update Sub Category name and URL and save it --> |
| 57 | + <click selector="{{SubCategoryWithParent.name}}" stepKey="clickOnCreateCategory1"/> |
| 58 | + <waitForPageLoad stepKey="waitForCategory1PageLoad"/> |
| 59 | + <actionGroup ref="AdminChangeCategoryAndURLNameActionGroup" stepKey="updateCategory2Name"/> |
| 60 | + |
| 61 | + <!--Go to storefront sub catagory --> |
| 62 | + <amOnPage url="" stepKey="goToStorefront"/> |
| 63 | + <waitForPageLoad stepKey="waitForFrontendLoad"/> |
| 64 | + <seeElement selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryOne.name$)}}" stepKey="seeCategory"/> |
| 65 | + <moveMouseOver selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryOne.name$)}}" stepKey="mouseOverSubCategoryOne"/> |
| 66 | + <waitForAjaxLoad stepKey="waitForAjaxOnMouseOverSubCategoryOne"/> |
| 67 | + <seeElement selector="{{StorefrontNavigationSection.subCategory($simpleSubCategoryWithParent.name$)}}" stepKey="seeSubCategoryWithParent1"/> |
| 68 | + <click selector="{{StorefrontNavigationSection.subCategory($simpleSubCategoryWithParent.name$)}}" stepKey="clicksubCategory"/> |
| 69 | + <waitForPageLoad time="40" stepKey="waitForStorefrontPageLoad"/> |
| 70 | + |
| 71 | + <!-- change the custom store view and validate the sub catagory --> |
| 72 | + <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchStoreViewActionGroup"> |
| 73 | + <argument name="storeView" value="NewStoreViewData"/> |
| 74 | + </actionGroup> |
| 75 | + <see selector="{{StorefrontCategoryMainSection.CategoryTitle}}" userInput="{{_defaultCategory.name_lwr}}-hattest" stepKey="assertSubCategoryOnStorefront"/> |
| 76 | + <seeElement stepKey="seeSubCategory" selector="{{StorefrontCategoryMainSection.CategoryTitle($_defaultCategory.name_lwr$-hattest)}}"/> |
| 77 | + <seeInTitle userInput="{{_defaultCategory.name_lwr}}-hattest" stepKey="seeSubCategoryNameInTitle"/> |
| 78 | + |
| 79 | + <!-- change the default store view and validate the sub catagory --> |
| 80 | + <actionGroup ref="StorefrontSwitchDefaultStoreViewActionGroup" stepKey="switchToDefualtStoreView"/> |
| 81 | + <see selector="{{StorefrontCategoryMainSection.CategoryTitle}}" userInput="$$simpleSubCategoryWithParent.name$$" stepKey="assertParentCategoryOnStorefront"/> |
| 82 | + <seeElement stepKey="seeParentCategory" selector="{{StorefrontCategoryMainSection.CategoryTitle($$simpleSubCategoryOne.name$$)}}"/> |
| 83 | + <seeInTitle userInput="$$simpleSubCategoryWithParent.name$$" stepKey="seeParentCategoryNameInTitle"/> |
| 84 | + |
| 85 | + <after> |
| 86 | + <deleteData createDataKey="simpleSubCategoryWithParent" stepKey="deleteSubcategoryWithParent"/> |
| 87 | + <deleteData createDataKey="simpleSubCategoryOne" stepKey="deleteSubcategoryOne"/> |
| 88 | + <deleteData createDataKey="createProduct" stepKey="deleteProductOne"/> |
| 89 | + <actionGroup ref="DeleteCustomStoreViewWithoutBackupActionGroup" stepKey="deleteCustomStoreView"> |
| 90 | + <argument name="storeViewName" value="{{NewStoreViewData.name}}"/> |
| 91 | + </actionGroup> |
| 92 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdminUserAfterTest"/> |
| 93 | + </after> |
| 94 | + </test> |
| 95 | +</tests> |
0 commit comments