|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <!-- |
3 | 3 | /** |
4 | | - * Copyright 2024 Adobe |
| 4 | + * Copyright 2025 Adobe |
5 | 5 | * All Rights Reserved. |
6 | 6 | */ |
7 | 7 | --> |
8 | | - |
9 | 8 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
10 | 9 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
11 | | - <test name="ConfigurableProductUniqueImageDisplayTest"> |
| 10 | + <test name="StorefrontConfigurableProductUniqueImageDisplayTest"> |
12 | 11 | <annotations> |
13 | 12 | <features value="Backend"/> |
14 | 13 | <stories value="Display unique images for a configurable product on storefront"/> |
15 | 14 | <title value="Unique images should be displayed on storefront correctly for Configurable product"/> |
16 | 15 | <description value="Admin should be able to add images for configurable products and unique images should display on storefront correctly based configurable attribute options"/> |
17 | 16 | <severity value="MAJOR"/> |
18 | | - <testCaseId value="MC-27546"/> |
| 17 | + <testCaseId value="AC-4825"/> |
19 | 18 | <group value="catalog"/> |
20 | 19 | </annotations> |
21 | 20 | <before> |
|
26 | 25 | <actionGroup ref="AdminNavigateToProductAttributeEditPageActionGroup" stepKey="navigateToColorProductAttribute1"> |
27 | 26 | <argument name="ProductAttributeLabel" value="Color"/> |
28 | 27 | </actionGroup> |
29 | | - |
30 | | - <!-- Use action group to add options for color attribute--> |
31 | | - <actionGroup ref="AdminAddOptionsToColorAttributeActionGroup" stepKey="addOptionsForColorAttribute"/> |
| 28 | + <!-- Use the action group to add the 'black' option to the Color attribute --> |
| 29 | + <actionGroup ref="AdminAddOptionsToDropdownAttributeActionGroup" stepKey="addOptionBlackForColorAttribute"> |
| 30 | + <argument name="optionIndex" value="0"/> |
| 31 | + <argument name="optionValue" value="{{ConfigurableProduct1.color_option1}}"/> |
| 32 | + </actionGroup> |
| 33 | + <!-- Use the action group to add the 'red' option to the Color attribute --> |
| 34 | + <actionGroup ref="AdminAddOptionsToDropdownAttributeActionGroup" stepKey="addOptionRedForColorAttribute"> |
| 35 | + <argument name="optionIndex" value="1"/> |
| 36 | + <argument name="optionValue" value="{{ConfigurableProduct1.color_option2}}"/> |
| 37 | + </actionGroup> |
| 38 | + <!-- Save attribute --> |
| 39 | + <actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveColorAttribute"/> |
32 | 40 |
|
33 | 41 | <!-- Create new attribute 'Size'--> |
34 | 42 | <actionGroup ref="CreateCustomAttributeActionGroup" stepKey="createCustomProductAttributeSize"> |
|
45 | 53 | <!--Crete new category--> |
46 | 54 | <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="goToCategoryPage"/> |
47 | 55 | <actionGroup ref="CreateCategoryActionGroup" stepKey="createNewSubcategory"> |
48 | | - <argument name="categoryEntity" value="CategoryNew1"/> |
| 56 | + <argument name="categoryEntity" value="CategoryB"/> |
49 | 57 | </actionGroup> |
50 | 58 | </before> |
51 | 59 | <after> |
52 | 60 | <!--Delete category--> |
53 | 61 | <actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteSubcategory"> |
54 | | - <argument name="categoryEntity" value="CategoryNew1"/> |
| 62 | + <argument name="categoryEntity" value="CategoryB"/> |
55 | 63 | </actionGroup> |
56 | 64 |
|
57 | 65 | <!-- Delete product --> |
|
90 | 98 | <fillField selector="{{AdminProductFormSection.productName}}" userInput="{{ConfigurableProduct1.name}}" stepKey="fillProductName"/> |
91 | 99 | <fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{ConfigurableProduct1.sku}}" stepKey="fillProductSku"/> |
92 | 100 | <fillField selector="{{AdminProductFormSection.productPrice}}" userInput="{{ConfigurableProduct1.price}}" stepKey="fillProductPrice"/> |
93 | | - <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[{{CategoryNew1.name}}]" stepKey="selectCategory"/> |
| 101 | + <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[{{CategoryB.name}}]" stepKey="selectCategory"/> |
94 | 102 | <!-- Setup configurations--> |
95 | 103 | <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickCreateConfigurations"/> |
96 | 104 | <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.createNewAttribute}}" time="30" stepKey="waitForConfigurationModalOpen" after="clickCreateConfigurations"/> |
|
138 | 146 |
|
139 | 147 | <!-- Verify on storefront that category and product is visible --> |
140 | 148 | <actionGroup ref="StorefrontNavigateToCategoryUrlActionGroup" stepKey="goToCategoryStorefrontPage"> |
141 | | - <argument name="categoryUrl" value="{{CategoryNew1.urlKey}}"/> |
| 149 | + <argument name="categoryUrl" value="{{CategoryB.urlKey}}"/> |
142 | 150 | </actionGroup> |
143 | | - <waitForText userInput="{{CategoryNew1.name}}" selector="{{StorefrontCategoryMainSection.CategoryTitle}}" stepKey="assertCategoryNameOnStorefront"/> |
| 151 | + <waitForText userInput="{{CategoryB.name}}" selector="{{StorefrontCategoryMainSection.CategoryTitle}}" stepKey="assertCategoryNameOnStorefront"/> |
144 | 152 | <waitForText userInput="{{ConfigurableProduct1.name}}" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="assertProductVisibleInStorefront"/> |
145 | 153 |
|
146 | 154 | <!-- Navigate to Product Page --> |
|
0 commit comments