|
178 | 178 | <click selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="clickAddToCart" />
|
179 | 179 | <see userInput="This is a required field" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsError}}" stepKey="seeError"/>
|
180 | 180 | </test>
|
| 181 | + |
| 182 | + <test name="StorefrontConfigurableProductVariationsTest"> |
| 183 | + <annotations> |
| 184 | + <features value="ConfigurableProduct"/> |
| 185 | + <stories value="Configurable Product"/> |
| 186 | + <title value="Customer should get the right options list"/> |
| 187 | + <description value="Customer should get the right options list for each variation of configurable product"/> |
| 188 | + <severity value="CRITICAL"/> |
| 189 | + <testCaseId value="MC-23027"/> |
| 190 | + <useCaseId value="MC-22732"/> |
| 191 | + <group value="configurable_product"/> |
| 192 | + </annotations> |
| 193 | + |
| 194 | + <before> |
| 195 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 196 | + <!-- Add first attribute with options --> |
| 197 | + <createData entity="productAttributeWithTwoOptions" stepKey="createFirstAttribute"/> |
| 198 | + <createData entity="productAttributeOption1" stepKey="createFirstAttributeFirstOption"> |
| 199 | + <requiredEntity createDataKey="createFirstAttribute"/> |
| 200 | + </createData> |
| 201 | + <createData entity="productAttributeOption2" stepKey="createFirstAttributeSecondOption"> |
| 202 | + <requiredEntity createDataKey="createFirstAttribute"/> |
| 203 | + </createData> |
| 204 | + <!-- Add second attribute with options --> |
| 205 | + <createData entity="productAttributeWithTwoOptions" stepKey="createSecondAttribute"/> |
| 206 | + <createData entity="productAttributeOption1" stepKey="createSecondAttributeFirstOption"> |
| 207 | + <requiredEntity createDataKey="createSecondAttribute"/> |
| 208 | + </createData> |
| 209 | + <createData entity="productAttributeOption2" stepKey="createSecondAttributeSecondOption"> |
| 210 | + <requiredEntity createDataKey="createSecondAttribute"/> |
| 211 | + </createData> |
| 212 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 213 | + </before> |
| 214 | + <after> |
| 215 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 216 | + <actionGroup ref="deleteProductBySku" stepKey="deleteProduct"> |
| 217 | + <argument name="sku" value="{{BaseConfigurableProduct.sku}}"/> |
| 218 | + </actionGroup> |
| 219 | + <deleteData createDataKey="createFirstAttribute" stepKey="deleteFirstAttribute"/> |
| 220 | + <deleteData createDataKey="createSecondAttribute" stepKey="deleteSecondAttribute"/> |
| 221 | + <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearProductsGridFilters"/> |
| 222 | + <actionGroup ref="logout" stepKey="adminLogout"/> |
| 223 | + </after> |
| 224 | + |
| 225 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="openProductIndexPage"/> |
| 226 | + <actionGroup ref="goToCreateProductPage" stepKey="navigateToCreateProductPage"> |
| 227 | + <argument name="product" value="BaseConfigurableProduct"/> |
| 228 | + </actionGroup> |
| 229 | + <actionGroup ref="fillMainProductForm" stepKey="fillProductForm"> |
| 230 | + <argument name="product" value="BaseConfigurableProduct"/> |
| 231 | + </actionGroup> |
| 232 | + <actionGroup ref="SetCategoryByName" stepKey="addCategoryToProduct"> |
| 233 | + <argument name="categoryName" value="$createCategory.name$"/> |
| 234 | + </actionGroup> |
| 235 | + <actionGroup ref="SetProductUrlKeyByString" stepKey="fillUrlKey"> |
| 236 | + <argument name="urlKey" value="{{BaseConfigurableProduct.urlKey}}"/> |
| 237 | + </actionGroup> |
| 238 | + <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnCreateConfigurations"/> |
| 239 | + <actionGroup ref="AdminSelectAttributeInConfigurableAttributesGrid" stepKey="checkFirstAttribute"> |
| 240 | + <argument name="attributeCode" value="$createFirstAttribute.attribute_code$"/> |
| 241 | + </actionGroup> |
| 242 | + <actionGroup ref="AdminSelectAttributeInConfigurableAttributesGrid" stepKey="checkSecondAttribute"> |
| 243 | + <argument name="attributeCode" value="$createSecondAttribute.attribute_code$"/> |
| 244 | + </actionGroup> |
| 245 | + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton"/> |
| 246 | + <waitForPageLoad stepKey="waitForStepLoad"/> |
| 247 | + <click selector="{{AdminCreateProductConfigurationsPanel.selectAllByAttribute($createFirstAttribute.default_frontend_label$)}}" stepKey="clickFirstAttributeSelectAll"/> |
| 248 | + <click selector="{{AdminCreateProductConfigurationsPanel.selectAllByAttribute($createSecondAttribute.default_frontend_label$)}}" stepKey="clickSecondAttributeSelectAll"/> |
| 249 | + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickSecondNextStep"/> |
| 250 | + <waitForElement selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="waitThirdNextButton"/> |
| 251 | + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickThirdStep"/> |
| 252 | + <waitForElement selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="waitGenerateConfigurationsButton"/> |
| 253 | + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickToGenerateConfigurations"/> |
| 254 | + |
| 255 | + <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.variationsGrid}}" stepKey="waitForVariationsGrid"/> |
| 256 | + <actionGroup ref="AdminChangeConfigurableProductVariationQty" stepKey="setFirstVariationQuantity"> |
| 257 | + <argument name="rowIndex" value="0"/> |
| 258 | + <argument name="quantity" value="0"/> |
| 259 | + </actionGroup> |
| 260 | + <actionGroup ref="AdminChangeConfigurableProductVariationQty" stepKey="setSecondVariationQuantity"> |
| 261 | + <argument name="rowIndex" value="1"/> |
| 262 | + <argument name="quantity" value="1"/> |
| 263 | + </actionGroup> |
| 264 | + <actionGroup ref="AdminChangeConfigurableProductVariationQty" stepKey="setThirdVariationQuantity"> |
| 265 | + <argument name="rowIndex" value="2"/> |
| 266 | + <argument name="quantity" value="1"/> |
| 267 | + </actionGroup> |
| 268 | + <actionGroup ref="AdminChangeConfigurableProductVariationQty" stepKey="setFourthVariationQuantity"> |
| 269 | + <argument name="rowIndex" value="3"/> |
| 270 | + <argument name="quantity" value="1"/> |
| 271 | + </actionGroup> |
| 272 | + <actionGroup ref="saveConfigurableProduct" stepKey="saveConfigurableProduct"> |
| 273 | + <argument name="product" value="BaseConfigurableProduct"/> |
| 274 | + </actionGroup> |
| 275 | + <scrollTo selector="{{AdminProductSEOSection.sectionHeader}}" x="0" y="-80" stepKey="scrollToAdminProductSEOSection"/> |
| 276 | + <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSectionHeader"/> |
| 277 | + <grabValueFrom selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="grabUrlKey"/> |
| 278 | + <amOnPage url="{$grabUrlKey}.html" stepKey="amOnConfigurableProductPage"/> |
| 279 | + <waitForPageLoad stepKey="waitForProductPageLoad"/> |
| 280 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productOptionSelect($createFirstAttribute.default_frontend_label$)}}" stepKey="waitForFirstSelect"/> |
| 281 | + <selectOption userInput="$createFirstAttributeFirstOption.option[store_labels][0][label]$" selector="{{StorefrontProductInfoMainSection.productOptionSelect($createFirstAttribute.default_frontend_label$)}}" stepKey="selectFirstAttributeFirstOption"/> |
| 282 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productOptionSelect($createSecondAttribute.default_frontend_label$)}}" stepKey="waitForSecondSelect"/> |
| 283 | + <selectOption userInput="$createSecondAttributeSecondOption.option[store_labels][0][label]$" selector="{{StorefrontProductInfoMainSection.productOptionSelect($createSecondAttribute.default_frontend_label$)}}" stepKey="selectSecondAttributeSecondOption"/> |
| 284 | + </test> |
181 | 285 | </tests>
|
0 commit comments