Skip to content

Commit 738b835

Browse files
committed
MQE-1584: Stabilize 2.2 XSD schema fix branches
1 parent 0ebe7ab commit 738b835

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<element name="requiredSkuIndicator" type="text" selector=" return window.getComputedStyle(document.querySelector('._required[data-index=sku]&gt;.admin__field-label span'), ':after').getPropertyValue('content');"/>
4343
<element name="customAttributeDropdownField" type="select" selector="select[name='product[{{attributeCode}}]']" parameterized="true"/>
4444
<element name="customAttributeInputField" type="select" selector="input[name='product[{{attributeCode}}]']" parameterized="true"/>
45+
<element name="customAttributeSelectOptions" type="select" selector="select[name='product[{{attributeCode}}]'] option" parameterized="true"/>
4546
</section>
4647
<section name="ProductInWebsitesSection">
4748
<element name="sectionHeader" type="button" selector="div[data-index='websites']" timeout="30"/>

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

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,27 @@
5353
<!--Go to Product edit page-->
5454
<amOnPage url="{{AdminProductEditPage.url($$createSimpleProduct.id$$)}}" stepKey="goToProductEditPage"/>
5555
<waitForPageLoad stepKey="waitForPageLoad"/>
56-
<!--Click on attribute dropdown-->
57-
<click selector="{{AdminProductFormSection.customAttributeDropdownField($$createDropdownProductAttribute.attribute[attribute_code]$$)}}" stepKey="clickOnAttributeDropdown"/>
56+
57+
<!-- Grab attribute dropdown options -->
58+
<grabMultiple selector="{{AdminProductFormSection.customAttributeSelectOptions($$createDropdownProductAttribute.attribute[attribute_code]$$)}}" stepKey="clickOnAttributeDropdown" />
59+
5860
<!--Check attribute dropdown options-->
59-
<see selector="{{AdminProductFormSection.customAttributeDropdownField($$createDropdownProductAttribute.attribute[attribute_code]$$)}}" userInput="admin_option_1" stepKey="seeFirstAdminOption"/>
60-
<see selector="{{AdminProductFormSection.customAttributeDropdownField($$createDropdownProductAttribute.attribute[attribute_code]$$)}}" userInput="admin_option_2" stepKey="seeSecondAdminOption"/>
61-
<dontSee selector="{{AdminProductFormSection.customAttributeDropdownField($$createDropdownProductAttribute.attribute[attribute_code]$$)}}" userInput="option1" stepKey="dontSeeFirstStoreOption"/>
62-
<dontSee selector="{{AdminProductFormSection.customAttributeDropdownField($$createDropdownProductAttribute.attribute[attribute_code]$$)}}" userInput="option2" stepKey="dontSeeSecondStoreOption"/>
61+
<assertContains stepKey="seeFirstAdminOption">
62+
<actualResult type="variable">clickOnAttributeDropdown</actualResult>
63+
<expectedResult type="string">admin_option_1</expectedResult>
64+
</assertContains>
65+
<assertContains stepKey="seeSecondAdminOption">
66+
<actualResult type="variable">clickOnAttributeDropdown</actualResult>
67+
<expectedResult type="string">admin_option_2</expectedResult>
68+
</assertContains>
69+
70+
<assertNotContains stepKey="dontSeeFirstStoreOption">
71+
<actualResult type="variable">clickOnAttributeDropdown</actualResult>
72+
<expectedResult type="string">option1</expectedResult>
73+
</assertNotContains>
74+
<assertNotContains stepKey="dontSeeSecondStoreOption">
75+
<actualResult type="variable">clickOnAttributeDropdown</actualResult>
76+
<expectedResult type="string">option2</expectedResult>
77+
</assertNotContains>
6378
</test>
6479
</tests>

0 commit comments

Comments
 (0)