|
13 | 13 | <features value="Swatches"/> |
14 | 14 | <stories value="Configurable product with multiple swatch attributes"/> |
15 | 15 | <title value="Configurable product image display with multiple swatches on catalog, product page, and layered navigation"/> |
16 | | - <description value="Create configurable product with 3 swatch attributes (1 visual A/B/C, 2 text 1/2/3 and X/Y/Z) and verify image display on catalog page, product page with gallery, and layered navigation filtering"/> |
| 16 | + <description value="Verify configurable product image display with multiple swatch attributes on catalog, product, and layered navigation pages"/> |
17 | 17 | <severity value="MAJOR"/> |
18 | 18 | <testCaseId value="AC-5545"/> |
19 | 19 | <group value="swatches"/> |
|
32 | 32 | <createData entity="VisualSwatchOptionC" stepKey="swatchAttributeThirdOption"> |
33 | 33 | <requiredEntity createDataKey="createVisualSwatchAttribute"/> |
34 | 34 | </createData> |
35 | | - <!-- Create Text Swatch Attribute 1 with 3 options --> |
| 35 | + <!-- Create text swatch attribute 1 with 3 options --> |
36 | 36 | <createData entity="TextSwatchProductAttributeForm" stepKey="createTextSwatchAttribute1"/> |
37 | 37 | <createData entity="TextSwatchOption1" stepKey="textSwatchAttribute1FirstOption"> |
38 | 38 | <requiredEntity createDataKey="createTextSwatchAttribute1"/> |
|
43 | 43 | <createData entity="TextSwatchOption3" stepKey="textSwatchAttribute1ThirdOption"> |
44 | 44 | <requiredEntity createDataKey="createTextSwatchAttribute1"/> |
45 | 45 | </createData> |
46 | | - <!-- Create Text Swatch Attribute 2 with 3 options --> |
| 46 | + <!-- Create text swatch attribute 2 with 3 options --> |
47 | 47 | <createData entity="TextSwatchProductAttributeForm" stepKey="createTextSwatchAttribute2"/> |
48 | 48 | <createData entity="TextSwatchOptionX" stepKey="textSwatchAttribute2FirstOption"> |
49 | 49 | <requiredEntity createDataKey="createTextSwatchAttribute2"/> |
|
54 | 54 | <createData entity="TextSwatchOptionZ" stepKey="textSwatchAttribute2ThirdOption"> |
55 | 55 | <requiredEntity createDataKey="createTextSwatchAttribute2"/> |
56 | 56 | </createData> |
57 | | - <!-- Step 2: Create Configurable Product --> |
| 57 | + <!-- Step 2: Create configurable product --> |
58 | 58 | <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> |
59 | 59 | <requiredEntity createDataKey="createCategory"/> |
60 | 60 | </createData> |
|
68 | 68 | <argument name="image" value="MagentoLogo"/> |
69 | 69 | </actionGroup> |
70 | 70 | <!-- Generate configurations for the 3 attributes --> |
| 71 | + <waitForElementClickable selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="waitForCreateConfigurationsClickable"/> |
71 | 72 | <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickCreateConfigurations"/> |
72 | 73 | <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.filters}}" stepKey="waitForConfigurationModal"/> |
73 | 74 | <!-- Select all 3 attributes --> |
| 75 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.attributeCheckbox($$createVisualSwatchAttribute.attribute_code$$)}}" stepKey="waitForVisualSwatchAttrClickable"/> |
74 | 76 | <click selector="{{AdminCreateProductConfigurationsPanel.attributeCheckbox($$createVisualSwatchAttribute.attribute_code$$)}}" stepKey="selectVisualSwatchAttr"/> |
| 77 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.attributeCheckbox($$createTextSwatchAttribute1.attribute_code$$)}}" stepKey="waitForTextSwatchAttr1Clickable"/> |
75 | 78 | <click selector="{{AdminCreateProductConfigurationsPanel.attributeCheckbox($$createTextSwatchAttribute1.attribute_code$$)}}" stepKey="selectTextSwatchAttr1"/> |
| 79 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.attributeCheckbox($$createTextSwatchAttribute2.attribute_code$$)}}" stepKey="waitForTextSwatchAttr2Clickable"/> |
76 | 80 | <click selector="{{AdminCreateProductConfigurationsPanel.attributeCheckbox($$createTextSwatchAttribute2.attribute_code$$)}}" stepKey="selectTextSwatchAttr2"/> |
| 81 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="waitForNextToSelectOptionsClickable"/> |
77 | 82 | <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNextToSelectOptions"/> |
78 | 83 | <waitForPageLoad stepKey="waitForOptionsPage"/> |
79 | 84 | <!-- Select all options for all attributes --> |
| 85 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.selectAllByAttribute($$createVisualSwatchAttribute.frontend_label[0]$$)}}" stepKey="waitForSelectAllVisualClickable"/> |
80 | 86 | <click selector="{{AdminCreateProductConfigurationsPanel.selectAllByAttribute($$createVisualSwatchAttribute.frontend_label[0]$$)}}" stepKey="selectAllVisualOptions"/> |
| 87 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.selectAllByAttribute($$createTextSwatchAttribute1.frontend_label[0]$$)}}" stepKey="waitForSelectAllText1Clickable"/> |
81 | 88 | <click selector="{{AdminCreateProductConfigurationsPanel.selectAllByAttribute($$createTextSwatchAttribute1.frontend_label[0]$$)}}" stepKey="selectAllText1Options"/> |
| 89 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.selectAllByAttribute($$createTextSwatchAttribute2.frontend_label[0]$$)}}" stepKey="waitForSelectAllText2Clickable"/> |
82 | 90 | <click selector="{{AdminCreateProductConfigurationsPanel.selectAllByAttribute($$createTextSwatchAttribute2.frontend_label[0]$$)}}" stepKey="selectAllText2Options"/> |
| 91 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="waitForNextToImagesClickable"/> |
83 | 92 | <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNextToImages"/> |
84 | 93 | <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.applyUniqueImagesToEachSkus}}" stepKey="waitForImagesSection"/> |
85 | 94 | <!-- Add images to simple products --> |
| 95 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.applyUniqueImagesToEachSkus}}" stepKey="waitForApplyUniqueImagesClickable"/> |
86 | 96 | <click selector="{{AdminCreateProductConfigurationsPanel.applyUniqueImagesToEachSkus}}" stepKey="clickApplyUniqueImages"/> |
87 | 97 | <selectOption selector="{{AdminCreateProductConfigurationsPanel.selectImagesButton}}" userInput="$$createVisualSwatchAttribute.frontend_label[0]$$" stepKey="selectAttributeForImages"/> |
88 | 98 | <waitForPageLoad stepKey="waitForImageUploadSectionsToLoad"/> |
89 | 99 | <!-- Upload image for option A --> |
90 | 100 | <attachFile selector="{{AdminCreateProductConfigurationsPanel.uploadImagesButton(VisualSwatchOptionA.label)}}" userInput="{{TestImageAdobe.file}}" stepKey="uploadImageForA"/> |
91 | | - <waitForElementNotVisible selector="{{AdminCreateProductConfigurationsPanel.uploadProgressBar}}" stepKey="waitForImageUploadA"/> |
92 | 101 | <!-- Upload image for option B --> |
93 | 102 | <attachFile selector="{{AdminCreateProductConfigurationsPanel.uploadImagesButton(VisualSwatchOptionB.label)}}" userInput="{{AdobeSmallImage.file}}" stepKey="uploadImageForB"/> |
94 | | - <waitForElementNotVisible selector="{{AdminCreateProductConfigurationsPanel.uploadProgressBar}}" stepKey="waitForImageUploadB"/> |
95 | 103 | <!-- Upload image for option C --> |
96 | 104 | <attachFile selector="{{AdminCreateProductConfigurationsPanel.uploadImagesButton(VisualSwatchOptionC.label)}}" userInput="{{AdobeThumbImage.file}}" stepKey="uploadImageForC"/> |
97 | | - <waitForElementNotVisible selector="{{AdminCreateProductConfigurationsPanel.uploadProgressBar}}" stepKey="waitForImageUploadC"/> |
98 | 105 | <!-- Apply single price --> |
99 | 106 | <scrollTo selector="{{AdminCreateProductConfigurationsPanel.applySinglePriceToAllSkus}}" stepKey="scrollToApplyPrice"/> |
| 107 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.applySinglePriceToAllSkus}}" stepKey="waitForApplySinglePriceClickable"/> |
100 | 108 | <click selector="{{AdminCreateProductConfigurationsPanel.applySinglePriceToAllSkus}}" stepKey="clickApplySinglePrice"/> |
101 | 109 | <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.singlePrice}}" stepKey="waitForPriceField"/> |
102 | 110 | <fillField selector="{{AdminCreateProductConfigurationsPanel.singlePrice}}" userInput="50" stepKey="enterPrice"/> |
103 | 111 | <!-- Apply single quantity --> |
104 | 112 | <scrollTo selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="scrollToApplyQuantity"/> |
| 113 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="waitForApplySingleQuantityClickable"/> |
105 | 114 | <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickApplySingleQuantity"/> |
106 | 115 | <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.quantity}}" stepKey="waitForQuantityField"/> |
107 | 116 | <fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="100" stepKey="enterQuantity"/> |
| 117 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="waitForNextToSummaryClickable"/> |
108 | 118 | <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNextToSummary"/> |
109 | 119 | <!-- Generate products --> |
| 120 | + <waitForElementClickable selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="waitForGenerateProductsClickable"/> |
110 | 121 | <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickGenerateProducts"/> |
111 | 122 | <waitForPageLoad stepKey="waitForConfigurationsGenerated"/> |
112 | 123 | <!-- Save product --> |
113 | 124 | <actionGroup ref="SaveConfiguredProductActionGroup" stepKey="saveConfigProduct"/> |
114 | 125 | </before> |
115 | 126 | <after> |
116 | 127 | <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
117 | | - <!-- Delete configurable product & its variants via API using ProductApiHelper --> |
| 128 | + <!-- Delete configurable product & its variants --> |
118 | 129 | <helper class="Magento\Catalog\Test\Mftf\Helper\ProductApiHelper" method="deleteAllProductsApi" stepKey="deleteAllProductsViaApi"/> |
119 | 130 | <!-- Delete attributes --> |
120 | 131 | <deleteData createDataKey="createVisualSwatchAttribute" stepKey="deleteVisualSwatchAttribute"/> |
|
129 | 140 | <waitForPageLoad stepKey="waitForCategoryPageLoad"/> |
130 | 141 | <waitForElementVisible selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="waitForProductsVisible"/> |
131 | 142 | <!-- Step 4: Select A-2-Y options --> |
| 143 | + <waitForElementClickable selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(VisualSwatchOptionA.label)}}" stepKey="waitForOptionAClickable"/> |
132 | 144 | <click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(VisualSwatchOptionA.label)}}" stepKey="selectOptionA"/> |
133 | 145 | <waitForPageLoad stepKey="waitAfterSelectA"/> |
134 | 146 | <click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(TextSwatchOption2.label)}}" stepKey="selectOption2"/> |
|
142 | 154 | <waitForPageLoad stepKey="waitAfterSelectZ"/> |
143 | 155 | <!-- Expected Result: Base image of the A-2-Z product is displayed --> |
144 | 156 | <waitForElementVisible selector="{{StorefrontCategoryMainSection.productImage}}" stepKey="verifyImageDisplayedForA2Z"/> |
145 | | - <!-- Step 6: Open Product page --> |
| 157 | + <!-- Step 6: Open product page --> |
146 | 158 | <click selector="{{StorefrontCategoryMainSection.specifiedProductItemInfo('$$createConfigProduct.name$$')}}" stepKey="openProductPage"/> |
147 | 159 | <waitForPageLoad stepKey="waitForProductPage"/> |
148 | 160 | <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="waitForProductName"/> |
149 | 161 | <!-- Step 7: Select A-2-Y options --> |
| 162 | + <waitForElementClickable selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(VisualSwatchOptionA.label)}}" stepKey="waitForOptionAClickableOnProductPage"/> |
150 | 163 | <click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(VisualSwatchOptionA.label)}}" stepKey="selectOptionAOnProductPage"/> |
151 | | - <waitForElementVisible selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(TextSwatchOption2.label)}}" stepKey="waitForTextSwatchesVisible"/> |
| 164 | + <waitForElementClickable selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(TextSwatchOption2.label)}}" stepKey="waitForTextSwatchesVisibleOnProductPage"/> |
152 | 165 | <click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(TextSwatchOption2.label)}}" stepKey="selectOption2OnProductPage"/> |
153 | | - <waitForElementVisible selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(TextSwatchOptionY.label)}}" stepKey="waitForThirdSwatchVisible"/> |
| 166 | + <waitForElementClickable selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(TextSwatchOptionY.label)}}" stepKey="waitForThirdSwatchVisibleOnProductPage"/> |
154 | 167 | <click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(TextSwatchOptionY.label)}}" stepKey="selectOptionYOnProductPage"/> |
155 | 168 | <waitForPageLoad stepKey="waitAfterSelectYOnProductPage"/> |
156 | 169 | <!-- Expected Result: Base image of the A-2-Y product is displayed. All images of this product are displayed in roundabout --> |
|
168 | 181 | </actionGroup> |
169 | 182 | <waitForElementVisible selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" stepKey="waitForLayeredNavigation"/> |
170 | 183 | <!-- Step 10: Select A-2-Y options --> |
| 184 | + <waitForElementClickable selector="{{StorefrontCategorySidebarSection.filterOptionTitle('$$createVisualSwatchAttribute.frontend_label[0]$$')}}" stepKey="waitForVisualSwatchFilterClickable"/> |
171 | 185 | <click selector="{{StorefrontCategorySidebarSection.filterOptionTitle('$$createVisualSwatchAttribute.frontend_label[0]$$')}}" stepKey="expandVisualSwatchFilter"/> |
172 | 186 | <waitForPageLoad stepKey="waitAfterExpandVisualFilter"/> |
173 | 187 | <click selector="{{StorefrontCategorySidebarSection.swatchVisualLayeredNav(VisualSwatchOptionA.label)}}" stepKey="selectAInLayeredNav"/> |
|
0 commit comments