Skip to content

Commit 52106d7

Browse files
committed
ACQE-8826: Verify that dropdown attribute with label 'select' displays correctly.
- In the test file, added options for the dropdown attribute and verified the options.
1 parent 3501c43 commit 52106d7

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,17 @@
2020
</annotations>
2121
<before>
2222
<!-- Pre-condition 1: Create dropdown attribute with label 'select' -->
23-
<createData entity="productDropDownAttribute" stepKey="createDropdownAttr">
23+
<createData entity="dropdownProductAttribute" stepKey="createDropdownAttr">
2424
<field key="default_frontend_label">'select'</field>
2525
</createData>
26-
<!-- Pre-condition 2: Assign created attribute to Default attribute set -->
26+
<!-- Create dropdown options -->
27+
<createData entity="productAttributeOption1" stepKey="createProductAttributeOption1">
28+
<requiredEntity createDataKey="createDropdownAttr"/>
29+
</createData>
30+
<createData entity="productAttributeOption2" stepKey="createProductAttributeOption2">
31+
<requiredEntity createDataKey="createDropdownAttr"/>
32+
</createData>
33+
<!-- Pre-condition 2: Assign created attribute to default attribute set -->
2734
<createData entity="AddToDefaultSet" stepKey="assignToDefaultSet">
2835
<requiredEntity createDataKey="createDropdownAttr"/>
2936
</createData>
@@ -37,11 +44,16 @@
3744
</after>
3845
<!-- Step 1: Open products grid page -->
3946
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="openProductIndexPage"/>
40-
<!-- Step 2: Start to create simple product and verify attribute presence -->
47+
<!-- Step 2: Start to create simple product and verify 'select' attribute presence -->
4148
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateSimpleProduct">
4249
<argument name="product" value="SimpleProduct"/>
4350
</actionGroup>
4451
<waitForElementVisible selector="{{AdminProductFormSection.productName}}" stepKey="assertProductFormShown"/>
4552
<waitForElementVisible selector="{{AdminProductFormSection.newAddedAttribute($$createDropdownAttr.attribute_code$$)}}" stepKey="seeSelectAttribute"/>
53+
<!-- Verify dropdown options are present on the product form -->
54+
<waitForElementClickable selector="{{AdminProductFormSection.customSelectAttribute($$createDropdownAttr.attribute_code$$)}}" stepKey="waitSelectClickable"/>
55+
<click selector="{{AdminProductFormSection.customSelectAttribute($$createDropdownAttr.attribute_code$$)}}" stepKey="openSelectDropdown"/>
56+
<waitForElementVisible selector="{{AdminProductFormSection.newAddedAttributeValue($$createProductAttributeOption1.option[store_labels][0][label]$$)}}" stepKey="seeFirstOption"/>
57+
<waitForElementVisible selector="{{AdminProductFormSection.newAddedAttributeValue($$createProductAttributeOption2.option[store_labels][0][label]$$)}}" stepKey="seeSecondOption"/>
4658
</test>
4759
</tests>

0 commit comments

Comments
 (0)