|
| 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="AdminRequiredFieldsHaveRequiredFieldIndicatorTest"> |
| 12 | + <annotations> |
| 13 | + <title value="Required fields should have the required asterisk indicator "/> |
| 14 | + <description value="Verify that Required fields should have the required indicator icon next to the field name"/> |
| 15 | + <severity value="MAJOR"/> |
| 16 | + <testCaseId value="MAGETWO-93979"/> |
| 17 | + <group value="Catalog"/> |
| 18 | + </annotations> |
| 19 | + <after> |
| 20 | + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> |
| 21 | + </after> |
| 22 | + |
| 23 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> |
| 24 | + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage"/> |
| 25 | + <waitForElementVisible selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="waitForAddSubCategoryVisible"/> |
| 26 | + <click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/> |
| 27 | + |
| 28 | + <!-- Verify that the Category Name field has the required field name indicator --> |
| 29 | + <!--<executeJS function="window.getComputedStyle(document.querySelector('{{AdminCategoryBasicFieldSection.RequiredFieldIndicator('name')}}'), ':after').getPropertyValue('color');" stepKey="getRequiredFieldIndicator"/>--> |
| 30 | + <executeJS function="{{AdminCategoryBasicFieldSection.RequiredFieldIndicator}}" stepKey="getRequiredFieldIndicator"/> |
| 31 | + <assertEquals expected='"*"' expectedType="string" actualType="variable" actual="getRequiredFieldIndicator" message="pass" stepKey="assertRequiredFieldIndicator1"/> |
| 32 | + |
| 33 | + <executeJS function="{{AdminCategoryBasicFieldSection.RequiredFieldIndicatorColor}}" stepKey="getRequiredFieldIndicatorColor"/> |
| 34 | + <assertEquals expected="rgb(226, 38, 38)" expectedType="string" actualType="variable" actual="getRequiredFieldIndicatorColor" message="pass" stepKey="assertRequiredFieldIndicator2"/> |
| 35 | + |
| 36 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndexPage"/> |
| 37 | + <click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="addProductDropdown"/> |
| 38 | + <click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="addSimpleProduct"/> |
| 39 | + <!-- Verify that the Product Name and Sku fields have the required field name indicator --> |
| 40 | + <executeJS function="{{AdminProductFormSection.RequiredNameIndicator}}" stepKey="productNameRequiredFieldIndicator"/> |
| 41 | + <assertEquals expected='"*"' expectedType="string" actualType="variable" actual="productNameRequiredFieldIndicator" message="pass" stepKey="assertRequiredFieldIndicator3"/> |
| 42 | + |
| 43 | + <executeJS function="{{AdminProductFormSection.RequiredSkuIndicator}}" stepKey="productSkuRequiredFieldIndicator"/> |
| 44 | + <assertEquals expected='"*"' expectedType="string" actualType="variable" actual="productSkuRequiredFieldIndicator" message="pass" stepKey="assertRequiredFieldIndicator4"/> |
| 45 | + |
| 46 | + |
| 47 | + </test> |
| 48 | +</tests> |
0 commit comments