Skip to content

Commit a493eff

Browse files
Manjusha.SManjusha.S
authored andcommitted
Merge branch 'AC-4284' into functional-testing-automation
2 parents c196b7a + db2c7b2 commit a493eff

File tree

3 files changed

+153
-0
lines changed

3 files changed

+153
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminChangeCategoryAndURLNameActionGroup">
11+
<annotations>
12+
<description>Admin Change/Update category and URL Name in Category page.</description>
13+
</annotations>
14+
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="openSeoSection"/>
15+
<uncheckOption selector="{{AdminCategorySEOSection.UrlKeyDefaultValueCheckbox}}" stepKey="uncheckUseDefaultUrlKey"/>
16+
<fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="{{_defaultCategory.name_lwr}}-hattest" stepKey="enterURLKey"/>
17+
<waitForPageLoad stepKey="waitForPageToLoad3"/>
18+
<uncheckOption selector="{{AdminCategoryBasicFieldSection.categoryNameUseDefault}}" stepKey="UncheckUseDefaultName"/>
19+
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{_defaultCategory.name_lwr}}-hattest" stepKey="updateCategoryName"/>
20+
<waitForPageLoad stepKey="waitForPageToLoad4"/>
21+
<uncheckOption selector="{{AdminCategorySEOSection.UrlKeyRedirectCheckbox}}" stepKey="uncheckRedirect"/>
22+
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategoryWithProducts"/>
23+
<waitForPageLoad stepKey="waitForCategorySaved"/>
24+
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage1"/>
25+
</actionGroup>
26+
</actionGroups>
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="DeleteCustomStoreViewWithoutBackupActionGroup">
12+
<annotations>
13+
<description>Goes to the Admin Stores grid page. Deleted the provided Store whitout Backup. Validates that the Success Messages (Delete) are present and correct.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="storeViewName" type="string"/>
17+
</arguments>
18+
19+
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
20+
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="resetSearchFilter"/>
21+
<fillField userInput="{{storeViewName}}" selector="{{AdminStoresGridSection.storeFilterTextField}}" stepKey="fillSearchStoreViewField"/>
22+
<click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearchButton"/>
23+
<click selector="{{AdminStoresGridSection.storeNameInFirstRow}}" stepKey="clickEditExistingStoreViewRow"/>
24+
<waitForPageLoad stepKey="waitForStoreToLoad"/>
25+
<click selector="{{AdminNewStoreViewActionsSection.delete}}" stepKey="clickDeleteStoreViewButtonOnEditStorePage"/>
26+
<click selector="{{AdminNewStoreViewActionsSection.delete}}" stepKey="clickDeleteStoreViewButtonOnDeleteStorePage"/>
27+
<waitForElementVisible selector="{{AdminConfirmationModalSection.title}}" stepKey="waitingForWarningModal"/>
28+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmStoreViewDelete"/>
29+
<waitForPageLoad stepKey="waitForSuccessMessage"/>
30+
<see selector="{{AdminStoresGridSection.successMessage}}" userInput="You deleted the store view." stepKey="seeAssertSuccessDeleteStoreViewMessage"/>
31+
</actionGroup>
32+
</actionGroups>

0 commit comments

Comments
 (0)