Skip to content

Commit 3e2117a

Browse files
glo74170Manjusha.S
authored andcommitted
MC-27471 : Create Subcategory with empty required fields - NEG
1 parent 046f788 commit 3e2117a

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryBasicFieldSection/AdminCategoryBasicFieldSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
<element name="panelFieldControl" type="input" selector="//aside//div[@data-index=&quot;{{arg1}}&quot;]/descendant::*[@name=&quot;{{arg2}}&quot;]" parameterized="true"/>
2424
<element name="productsInCategory" type="input" selector="div[data-index='assign_products']" timeout="30"/>
2525
<element name="scheduleDesignUpdateTab" type="block" selector="div[data-index='schedule_design_update']" timeout="15"/>
26+
<element name="categoryNameRequiredField" type="text" selector="//label[@class='admin__field-error' and contains(text(),'This is a required field.')]" timeout="15"/>
2627
</section>
2728
</sections>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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="AdminCreateSubcategoryWithEmptyRequiredFieldsTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Create Subcategory with empty required fields - NEG"/>
15+
<title value="Create Subcategory with empty required fields - NEG"/>
16+
<description value="Admin Create Subcategory with empty required fields - NEG"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-27471"/>
19+
<group value="Catalog"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
</before>
24+
25+
<!-- Goto Categories Select Default Category > Click 'Add Subcategory'-->
26+
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="amOnAdminCategoryPage"/>
27+
<scrollToTopOfPage stepKey="scrollToTopOfPage1"/>
28+
<waitForPageLoad stepKey="waitForPageLoad1"/>
29+
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/>
30+
<checkOption selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="enableNewCategory"/>
31+
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="openSEO"/>
32+
<fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="{{NewCategory.name_lwr}}" stepKey="enterURLKey"/>
33+
34+
<!-- Click on Save -->
35+
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveFirstSubCategory"/>
36+
37+
<!-- Validate "This is a required field" for empty required field-->
38+
<waitForElementVisible selector="{{AdminCategoryBasicFieldSection.categoryNameRequiredField}}" stepKey="seeRequiredField"/>
39+
<seeElement selector="{{AdminCategoryBasicFieldSection.categoryNameRequiredField}}" stepKey="seeRequiredField1"/>
40+
41+
<after>
42+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
43+
</after>
44+
45+
</test>
46+
</tests>

0 commit comments

Comments
 (0)