|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +/** |
| 4 | + * Copyright 2025 Adobe |
| 5 | + * All Rights Reserved. |
| 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="AdminVerifyDropdownAttributeLabelSelectDisplaysCorrectlyTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Create product Attribute"/> |
| 15 | + <title value="Dropdown attribute with label 'select' displays correctly"/> |
| 16 | + <description value="This test case verify that dropdown attribute with label 'select' displays correctly"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="AC-4540"/> |
| 19 | + <group value="catalog"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Pre-condition 1: Create dropdown attribute with label 'select' --> |
| 23 | + <createData entity="dropdownProductAttribute" stepKey="createDropdownAttr"> |
| 24 | + <field key="default_frontend_label">'select'</field> |
| 25 | + </createData> |
| 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 --> |
| 34 | + <createData entity="AddToDefaultSet" stepKey="assignToDefaultSet"> |
| 35 | + <requiredEntity createDataKey="createDropdownAttr"/> |
| 36 | + </createData> |
| 37 | + <!-- Login to admin --> |
| 38 | + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> |
| 39 | + </before> |
| 40 | + <after> |
| 41 | + <!-- Delete dropdown attribute and logout from admin --> |
| 42 | + <deleteData createDataKey="createDropdownAttr" stepKey="deleteDropdownAttr"/> |
| 43 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 44 | + </after> |
| 45 | + <!-- Step 1: Open products grid page --> |
| 46 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="openProductIndexPage"/> |
| 47 | + <!-- Step 2: Start to create simple product and verify 'select' attribute presence --> |
| 48 | + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateSimpleProduct"> |
| 49 | + <argument name="product" value="SimpleProduct"/> |
| 50 | + </actionGroup> |
| 51 | + <waitForElementVisible selector="{{AdminProductFormSection.productName}}" stepKey="assertProductFormShown"/> |
| 52 | + <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"/> |
| 58 | + </test> |
| 59 | +</tests> |
0 commit comments