Skip to content

Commit 6b6a2f7

Browse files
author
Burlacu Vasilii
committed
refactored MFTF tests
1 parent 196e353 commit 6b6a2f7

6 files changed

+6
-7
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributePageSwitchTabActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
<argument name="tabName" type="string"/>
1717
</arguments>
1818

19-
<click selector="#product_attribute_tabs a[title='{{tabName}}']" stepKey="changeProductAttributeActiveTab"/>
19+
<click selector="{{AdminEditProductAttributesSection.tabButton(tabName)}}" stepKey="changeProductAttributeActiveTab"/>
2020
</actionGroup>
2121
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertSeeProductAttributeValidationErrorOnManageLabelsTabActionGroup.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
</annotations>
1515

1616
<arguments>
17-
<argument name="selector" type="string" defaultValue="#attribute-labels-table .mage-error"/>
1817
<argument name="message" type="string"/>
1918
</arguments>
2019

21-
<seeElement selector="{{selector}}" stepKey="seeValidationDomElement"/>
22-
<see userInput="{{message}}" selector="{{selector}}" stepKey="seeValidationMessage"/>
20+
<see userInput="{{message}}" selector="{{AdminProductAttributeManageLabelsSection.attributeStoreLabelValidationError}}" stepKey="seeValidationMessage"/>
2321
</actionGroup>
2422
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertSeeProductAttributeValidationErrorActionGroup.xml renamed to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertSeeProductAttributeValidationErrorOnPropertiesTabActionGroup.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
</annotations>
1515

1616
<arguments>
17-
<argument name="selector" type="string" defaultValue=".field-attribute_label .mage-error"/>
1817
<argument name="message" type="string"/>
1918
</arguments>
2019

21-
<seeElement selector="{{selector}}" stepKey="seeValidationDomElement"/>
22-
<see userInput="{{message}}" selector="{{selector}}" stepKey="seeValidationMessage"/>
20+
<see userInput="{{message}}" selector="{{AttributePropertiesSection.attributeLabelValidationError}}" stepKey="seeValidationMessage"/>
2321
</actionGroup>
2422
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<element name="dropdownNthOptionAdmin" type="textarea" selector="tbody[data-role='options-container'] tr:nth-child({{var}}) td:nth-child(3) input" parameterized="true"/>
3131
<element name="dropdownNthOptionDefaultStoreView" type="textarea" selector="tbody[data-role='options-container'] tr:nth-child({{var}}) td:nth-child(4) input" parameterized="true"/>
3232
<element name="dropdownNthOptionDelete" type="button" selector="tbody[data-role='options-container'] tr:nth-child({{var}}) button[title='Delete']" parameterized="true"/>
33+
<element name="attributeLabelValidationError" type="text" selector=".field-attribute_label .mage-error"/>
3334
</section>
3435
<section name="AttributeDeleteModalSection">
3536
<element name="confirm" type="button" selector=".modal-popup.confirm .action-accept"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
<element name="ProductDataMayBeLostConfirmButton" type="button" selector="//aside[contains(@class,'_show')]//button[.='Change Input Type']"/>
2323
<element name="defaultLabel" type="text" selector="//td[contains(text(), '{{attributeName}}')]/following-sibling::td[contains(@class, 'col-frontend_label')]" parameterized="true"/>
2424
<element name="formByStoreId" type="block" selector="//form[contains(@action,'store/{{store_id}}')]" parameterized="true"/>
25+
<element name="tabButton" type="text" selector="#product_attribute_tabs a[title='{{tabName}}']" parameterized="true"/>
2526
</section>
2627
</sections>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminProductAttributeManageLabelsSection">
1212
<element name="DefaultStoreLabel" type="input" selector="#attribute-labels-table [name='frontend_label[1]']"/>
13+
<element name="attributeStoreLabelValidationError" type="text" selector="#attribute-labels-table .mage-error"/>
1314
</section>
1415
</sections>

0 commit comments

Comments
 (0)