Skip to content

Commit 06e86f6

Browse files
committed
MAGETWO-93979: Required Field Indicators (Asterisks) Are Gone From Magento UI
- updated annotations
1 parent 9cd5924 commit 06e86f6

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminRequiredFieldsHaveRequiredFieldIndicatorTest.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1111
<test name="AdminRequiredFieldsHaveRequiredFieldIndicatorTest">
1212
<annotations>
13+
<stories value="Verify the presence of required field indicators across different pages in Magento Admin"/>
1314
<title value="Required fields should have the required asterisk indicator "/>
1415
<description value="Verify that Required fields should have the required indicator icon next to the field name"/>
1516
<severity value="MAJOR"/>
16-
<testCaseId value="MAGETWO-93979"/>
17+
<testCaseId value="MAGETWO-94330"/>
1718
<group value="Catalog"/>
1819
</annotations>
1920
<after>
@@ -26,7 +27,6 @@
2627
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/>
2728

2829
<!-- 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"/>-->
3030
<executeJS function="{{AdminCategoryBasicFieldSection.RequiredFieldIndicator}}" stepKey="getRequiredFieldIndicator"/>
3131
<assertEquals expected='"*"' expectedType="string" actualType="variable" actual="getRequiredFieldIndicator" message="pass" stepKey="assertRequiredFieldIndicator1"/>
3232

@@ -36,13 +36,19 @@
3636
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndexPage"/>
3737
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="addProductDropdown"/>
3838
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="addSimpleProduct"/>
39+
3940
<!-- Verify that the Product Name and Sku fields have the required field name indicator -->
4041
<executeJS function="{{AdminProductFormSection.RequiredNameIndicator}}" stepKey="productNameRequiredFieldIndicator"/>
4142
<assertEquals expected='"*"' expectedType="string" actualType="variable" actual="productNameRequiredFieldIndicator" message="pass" stepKey="assertRequiredFieldIndicator3"/>
42-
4343
<executeJS function="{{AdminProductFormSection.RequiredSkuIndicator}}" stepKey="productSkuRequiredFieldIndicator"/>
4444
<assertEquals expected='"*"' expectedType="string" actualType="variable" actual="productSkuRequiredFieldIndicator" message="pass" stepKey="assertRequiredFieldIndicator4"/>
4545

46+
<!-- Verify that the CMS page have the required field name indicator next to Page Title -->
47+
<amOnPage url="{{CmsPagesPage.url}}" stepKey="amOnPagePagesGrid"/>
48+
<waitForPageLoad stepKey="waitForPageLoad1"/>
49+
<click selector="{{CmsPagesPageActionsSection.addNewPageButton}}" stepKey="clickAddNewPage"/>
50+
<executeJS function="{{CmsNewPagePageBasicFieldsSection.RequiredFieldIndicator}}" stepKey="pageTitleRequiredFieldIndicator"/>
51+
<assertEquals expected='"*"' expectedType="string" actualType="variable" actual="pageTitleRequiredFieldIndicator" message="pass" stepKey="assertRequiredFieldIndicator5"/>
4652

4753
</test>
4854
</tests>

app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageBasicFieldsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="CmsNewPagePageBasicFieldsSection">
1212
<element name="pageTitle" type="input" selector="input[name=title]"/>
13+
<element name="RequiredFieldIndicator" type="text" selector=" return window.getComputedStyle(document.querySelector('._required[data-index=title]&gt;.admin__field-label span'), ':after').getPropertyValue('content');"/>
1314
<element name="isActive" type="button" selector="//input[@name='is_active' and @value='{{var1}}']" parameterized="true"/>
1415
<element name="duplicatedURLKey" type="input" selector="//input[contains(@data-value,'{{var1}}')]" parameterized="true"/>
1516
</section>

0 commit comments

Comments
 (0)