|
9 | 9 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
|
10 | 10 | <test name="AssertGroupedProductQtyOnProductPageTest">
|
11 | 11 | <annotations>
|
12 |
| - <title value="Validate quantity in Storefront with group product"/> |
13 |
| - <stories value="ACP2E-3469: Validation Error Triggered for All Products in Group When One Has Invalid Quantity"/> |
14 |
| - <description value="Products in group should not show error for all Products when one Has invalid quantity"/> |
| 12 | + <title value="Validate quantity in Storefront for a grouped product"/> |
| 13 | + <stories value="Storefront grouped product quantity validation when one child product has invalid quantity"/> |
| 14 | + <description value="On the storefront, validate that if a child product in a grouped product has an invalid quantity, the error is displayed only for that specific child product."/> |
15 | 15 | <features value="GroupedProduct"/>
|
16 | 16 | <testCaseId value="AC-13508"/>
|
17 | 17 | <severity value="MINOR"/>
|
18 | 18 | </annotations>
|
19 | 19 | <before>
|
20 | 20 | <!--Create simple and grouped product-->
|
21 |
| - <createData entity="ApiProductWithDescription" before="simple2" stepKey="simple1"/> |
22 |
| - <createData entity="ApiProductWithDescription" before="groupedProduct" stepKey="simple2"/> |
| 21 | + <createData entity="ApiProductWithDescription" stepKey="simple1"/> |
| 22 | + <createData entity="ApiProductWithDescription" stepKey="simple2"/> |
| 23 | + <createData entity="ApiProductWithDescription" stepKey="simple3"/> |
23 | 24 | <createData entity="ApiGroupedProduct" stepKey="groupedProduct"/>
|
24 | 25 | <createData entity="OneSimpleProductLink" stepKey="addProductOne">
|
25 | 26 | <requiredEntity createDataKey="groupedProduct"/>
|
|
29 | 30 | <requiredEntity createDataKey="groupedProduct"/>
|
30 | 31 | <requiredEntity createDataKey="simple2"/>
|
31 | 32 | </updateData>
|
| 33 | + <updateData entity="OneMoreSimpleProductLink" createDataKey="addProductOne" stepKey="addProductThree"> |
| 34 | + <requiredEntity createDataKey="groupedProduct"/> |
| 35 | + <requiredEntity createDataKey="simple3"/> |
| 36 | + </updateData> |
32 | 37 | </before>
|
33 | 38 | <after>
|
34 |
| - <deleteData createDataKey="simple1" before="deleteSimple2" stepKey="deleteSimple1"/> |
35 |
| - <deleteData createDataKey="simple2" before="deleteGroupProduct" stepKey="deleteSimple2"/> |
36 | 39 | <deleteData createDataKey="groupedProduct" stepKey="deleteGroupProduct"/>
|
| 40 | + <deleteData createDataKey="simple1" stepKey="deleteSimple1"/> |
| 41 | + <deleteData createDataKey="simple2" stepKey="deleteSimple2"/> |
| 42 | + <deleteData createDataKey="simple3" stepKey="deleteSimple3"/> |
37 | 43 | </after>
|
38 |
| - <!-- Go to storefront home page --> |
39 |
| - <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomepage"/> |
40 |
| - <!-- Check Grouped product is visible on the storefront--> |
41 |
| - <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> |
42 |
| - <argument name="productUrl" value="$$groupedProduct.custom_attributes[url_key]$$"/> |
| 44 | + <!-- Add grouped product to the cart --> |
| 45 | + <actionGroup ref="StorefrontAddThreeGroupedProductToTheCartActionGroup" stepKey="addGropedProductsToTheCart"> |
| 46 | + <argument name="urlKey" value="$$groupedProduct.custom_attributes[url_key]$$"/> |
| 47 | + <argument name="product1" value="$$simple1.name$$"/> |
| 48 | + <argument name="product2" value="$$simple2.name$$"/> |
| 49 | + <argument name="product3" value="$$simple3.name$$"/> |
| 50 | + <argument name="qty1" value="1"/> |
| 51 | + <argument name="qty2" value="1"/> |
| 52 | + <argument name="qty3" value="-1"/> |
43 | 53 | </actionGroup>
|
44 |
| - <!-- Fill qty for product options--> |
45 |
| - <fillField selector="{{StorefrontProductPageSection.qtyInputWithProduct($simple1.name$)}}" userInput="1" before="addToCart" stepKey="fillQuantityForFirsProduct"/> |
46 |
| - <fillField selector="{{StorefrontProductPageSection.qtyInputWithProduct($simple2.name$)}}" userInput="-1" after="fillQuantityForFirsProduct" stepKey="fillQuantityForSecondProduct"/> |
47 |
| - <!--Add grouped product to cart --> |
48 |
| - <waitForElementClickable selector="{{StorefrontProductPageSection.addToCart}}" stepKey="waitForAddToCart"/> |
49 |
| - <click selector="{{StorefrontProductPageSection.addToCart}}" stepKey="addToCart"/> |
50 | 54 | <!-- Asserting product options qty errors-->
|
51 | 55 | <waitForElementNotVisible selector="{{StorefrontProductInfoMainSection.groupedProductOptionQtyError($simple1.id$)}}" stepKey="firstProductQtyError"/>
|
52 |
| - <waitForElementVisible selector="{{StorefrontProductInfoMainSection.groupedProductOptionQtyError($simple2.id$)}}" stepKey="secondProductQtyError"/> |
| 56 | + <waitForElementNotVisible selector="{{StorefrontProductInfoMainSection.groupedProductOptionQtyError($simple2.id$)}}" stepKey="secondProductQtyError"/> |
| 57 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.groupedProductOptionQtyError($simple3.id$)}}" stepKey="thirdProductQtyError"/> |
53 | 58 | </test>
|
54 | 59 | </tests>
|
0 commit comments