|
13 | 13 | <features value="Catalog"/> |
14 | 14 | <stories value="Product Price Display"/> |
15 | 15 | <title value="Validate price changes for configurable product with dropdown and text swatch attributes on storefront"/> |
16 | | - <description value="Create dropdown and text swatch attributes, create two configurable products with different attribute combinations, and validate price changes on storefront product page"/> |
| 16 | + <description value="Verify configurable product price updates correctly when selecting different attribute options including products displayed in widgets"/> |
17 | 17 | <testCaseId value="AC-8423"/> |
18 | 18 | <severity value="MAJOR"/> |
19 | 19 | <group value="Catalog"/> |
|
27 | 27 | <createData entity="productDropDownAttribute" stepKey="createDropdownAttribute"> |
28 | 28 | <field key="attribute_code">my_size</field> |
29 | 29 | <field key="default_frontend_label">my size</field> |
30 | | - <field key="frontend_input">select</field> |
31 | | - <field key="scope">global</field> |
32 | | - <field key="is_searchable">true</field> |
33 | | - <field key="is_visible_in_advanced_search">true</field> |
34 | | - <field key="is_visible_on_front">true</field> |
35 | | - <field key="is_filterable">true</field> |
36 | | - <field key="is_filterable_in_search">true</field> |
37 | | - <field key="used_in_product_listing">true</field> |
38 | | - <field key="is_used_for_promo_rules">true</field> |
39 | | - <field key="is_comparable">true</field> |
40 | | - <field key="used_for_sort_by">true</field> |
41 | 30 | </createData> |
42 | 31 | <createData entity="productAttributeOption" stepKey="createAttributeOptionSmall"> |
43 | 32 | <requiredEntity createDataKey="createDropdownAttribute"/> |
44 | 33 | <field key="label">Small</field> |
45 | | - <field key="sort_order">0</field> |
46 | 34 | </createData> |
47 | 35 | <createData entity="productAttributeOption" stepKey="createAttributeOptionMedium"> |
48 | 36 | <requiredEntity createDataKey="createDropdownAttribute"/> |
49 | 37 | <field key="label">Medium</field> |
50 | | - <field key="sort_order">1</field> |
51 | 38 | </createData> |
52 | 39 | <createData entity="productAttributeOption" stepKey="createAttributeOptionLarge"> |
53 | 40 | <requiredEntity createDataKey="createDropdownAttribute"/> |
54 | 41 | <field key="label">Large</field> |
55 | | - <field key="sort_order">2</field> |
56 | 42 | </createData> |
57 | 43 | <!-- Step-3: Create a text swatch product attribute --> |
58 | 44 | <createData entity="productDropDownAttribute" stepKey="createTextSwatchAttribute"> |
59 | 45 | <field key="attribute_code">color_swatch</field> |
60 | 46 | <field key="default_frontend_label">color1</field> |
61 | 47 | <field key="frontend_input">swatch_text</field> |
62 | | - <field key="scope">global</field> |
63 | | - <field key="is_searchable">true</field> |
64 | | - <field key="is_visible_in_advanced_search">true</field> |
65 | | - <field key="is_visible_on_front">true</field> |
66 | | - <field key="is_filterable">true</field> |
67 | | - <field key="is_filterable_in_search">true</field> |
68 | | - <field key="used_in_product_listing">true</field> |
69 | | - <field key="is_used_for_promo_rules">true</field> |
70 | | - <field key="is_comparable">true</field> |
71 | | - <field key="used_for_sort_by">true</field> |
72 | 48 | </createData> |
73 | 49 | <createData entity="productAttributeOption" stepKey="createAttributeOptionBlack"> |
74 | 50 | <requiredEntity createDataKey="createTextSwatchAttribute"/> |
75 | 51 | <field key="label">Black</field> |
76 | | - <field key="sort_order">0</field> |
77 | 52 | </createData> |
78 | 53 | <createData entity="productAttributeOption" stepKey="createAttributeOptionWhite"> |
79 | 54 | <requiredEntity createDataKey="createTextSwatchAttribute"/> |
80 | 55 | <field key="label">White</field> |
81 | | - <field key="sort_order">1</field> |
82 | 56 | </createData> |
83 | 57 | <createData entity="productAttributeOption" stepKey="createAttributeOptionBlue"> |
84 | 58 | <requiredEntity createDataKey="createTextSwatchAttribute"/> |
85 | 59 | <field key="label">Blue</field> |
86 | | - <field key="sort_order">2</field> |
87 | 60 | </createData> |
88 | 61 | <!-- Create configurable products --> |
89 | 62 | <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct1"> |
|
180 | 153 | <argument name="productPrice" value="270"/> |
181 | 154 | </actionGroup> |
182 | 155 | <actionGroup ref="SaveConfigurableProductAddToCurrentAttributeSetActionGroup" stepKey="saveConfigProduct2"/> |
183 | | - <!-- Step-6: Create Catalog Products List widget --> |
| 156 | + <!-- Step-6: Create Catalog Products List widget to display Conf 2 on configurable product pages --> |
184 | 157 | <actionGroup ref="AdminConfigureWidgetWithSpecificProductsActionGroup" stepKey="configureWidget"> |
185 | 158 | <argument name="productId" value="$createConfigProduct1.id$"/> |
186 | 159 | </actionGroup> |
|
206 | 179 | <selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="Small" stepKey="selectSmallOptionAgain"/> |
207 | 180 | <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="waitForPriceAfterSmallSelectionAgain"/> |
208 | 181 | <waitForText selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$110.00" stepKey="verifySmallPriceAgain"/> |
| 182 | + <!-- Verify Conf 2 is displayed in widget on Conf 1 product page and validate price changes --> |
| 183 | + <scrollTo selector="{{StorefrontCategoryProductSection.widgetProduct('Conf 2')}}" stepKey="scrollToWidgetProduct"/> |
| 184 | + <waitForElementVisible selector="{{StorefrontCategoryProductSection.widgetProduct('Conf 2')}}" stepKey="verifyConf2DisplayedInWidget"/> |
| 185 | + <!-- Click on Conf 2 from widget to navigate to its product page --> |
| 186 | + <click selector="{{StorefrontCategoryProductSection.widgetProduct('Conf 2')}}" stepKey="clickConf2FromWidget"/> |
| 187 | + <waitForPageLoad stepKey="waitForConf2PageLoad"/> |
| 188 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="waitForConf2ProductName"/> |
| 189 | + <waitForText selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Conf 2" stepKey="verifyConf2ProductName"/> |
| 190 | + <!-- Verify price changes for Conf 2 with multiple attribute combinations --> |
| 191 | + <!-- Select Black color swatch --> |
| 192 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel('Black')}}" stepKey="waitForBlackSwatch"/> |
| 193 | + <click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel('Black')}}" stepKey="selectBlackSwatch"/> |
| 194 | + <waitForPageLoad stepKey="waitAfterBlackSelection"/> |
| 195 | + <!-- Select Small size with Black color and verify price --> |
| 196 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.attributeSelectByAttributeID('my size')}}" stepKey="waitForSizeDropdownForBlack"/> |
| 197 | + <selectOption selector="{{StorefrontProductInfoMainSection.attributeSelectByAttributeID('my size')}}" userInput="Small" stepKey="selectSmallForBlack"/> |
| 198 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="waitForPriceBlackSmall"/> |
| 199 | + <waitForText selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$210.00" stepKey="verifyBlackSmallPrice"/> |
| 200 | + <!-- Select Large size with Black color and verify price --> |
| 201 | + <selectOption selector="{{StorefrontProductInfoMainSection.attributeSelectByAttributeID('my size')}}" userInput="Large" stepKey="selectLargeForBlack"/> |
| 202 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="waitForPriceBlackLarge"/> |
| 203 | + <waitForText selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$230.00" stepKey="verifyBlackLargePrice"/> |
| 204 | + <!-- Select White color swatch --> |
| 205 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel('White')}}" stepKey="waitForWhiteSwatch"/> |
| 206 | + <click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel('White')}}" stepKey="selectWhiteSwatch"/> |
| 207 | + <waitForPageLoad stepKey="waitAfterWhiteSelection"/> |
| 208 | + <!-- Select Small size with White color and verify price --> |
| 209 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.attributeSelectByAttributeID('my size')}}" stepKey="waitForSizeDropdownForWhite"/> |
| 210 | + <selectOption selector="{{StorefrontProductInfoMainSection.attributeSelectByAttributeID('my size')}}" userInput="Small" stepKey="selectSmallForWhite"/> |
| 211 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="waitForPriceWhiteSmall"/> |
| 212 | + <waitForText selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$250.00" stepKey="verifyWhiteSmallPrice"/> |
| 213 | + <!-- Select Large size with White color and verify price --> |
| 214 | + <selectOption selector="{{StorefrontProductInfoMainSection.attributeSelectByAttributeID('my size')}}" userInput="Large" stepKey="selectLargeForWhite"/> |
| 215 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="waitForPriceWhiteLarge"/> |
| 216 | + <waitForText selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$270.00" stepKey="verifyWhiteLargePrice"/> |
209 | 217 | </test> |
210 | 218 | </tests> |
0 commit comments