Skip to content

Commit 5cf7259

Browse files
committed
ACP2E-3710: updated mftf to avoid flakiness
1 parent d1b88c0 commit 5cf7259

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright 2011 Adobe
4+
* Copyright 2024 Adobe
55
* All Rights Reserved.
66
*/
77
-->
@@ -13,12 +13,12 @@
1313
<description>Validates Child Products Quantities Input Error Messages are displaying</description>
1414
</annotations>
1515
<arguments>
16-
<argument name="firstProductIndex" type="string" defaultValue="1"/>
17-
<argument name="secondProductIndex" type="string" defaultValue="2"/>
18-
<argument name="thirdProductIndex" type="string" defaultValue="3"/>
16+
<argument name="firstProductId" type="string"/>
17+
<argument name="secondProductId" type="string"/>
18+
<argument name="thirdProductId" type="string" />
1919
</arguments>
20-
<dontSeeElement selector="{{StorefrontProductInfoMainSection.groupedProductsAssociatedProductQuantityMageError(firstProductIndex)}}" stepKey="checkingInputValidationErrorMessageForFirstProduct"/>
21-
<seeElement selector="{{StorefrontProductInfoMainSection.groupedProductsAssociatedProductQuantityMageError(secondProductIndex)}}" stepKey="checkingInputValidationErrorMessageForSecondProduct"/>
22-
<dontSeeElement selector="{{StorefrontProductInfoMainSection.groupedProductsAssociatedProductQuantityMageError(thirdProductIndex)}}" stepKey="checkingInputValidationErrorMessageForThirdProduct"/>
20+
<dontSeeElement selector="{{StorefrontProductInfoMainSection.groupedProductOptionQtyError(firstProductId)}}" stepKey="checkingInputValidationErrorMessageForFirstProduct"/>
21+
<seeElement selector="{{StorefrontProductInfoMainSection.groupedProductOptionQtyError(secondProductId)}}" stepKey="checkingInputValidationErrorMessageForSecondProduct"/>
22+
<dontSeeElement selector="{{StorefrontProductInfoMainSection.groupedProductOptionQtyError(thirdProductId)}}" stepKey="checkingInputValidationErrorMessageForThirdProduct"/>
2323
</actionGroup>
2424
</actionGroups>

app/code/Magento/GroupedProduct/Test/Mftf/Section/StorefrontProductInfoMainSection.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
<element name="groupedProductsAssociatedProductName" type="text" parameterized="true" selector="#super-product-table tbody tr:nth-of-type({{index}}) .product-item-name"/>
1515
<element name="groupedProductsAssociatedProductPrice" type="text" parameterized="true" selector="#super-product-table tbody tr:nth-of-type({{index}}) .price"/>
1616
<element name="groupedProductsAssociatedProductQuantity" type="input" parameterized="true" selector="#super-product-table tbody tr:nth-of-type({{index}}) input.qty"/>
17-
<element name="groupedProductsAssociatedProductQuantityMageError" type="input" parameterized="true" selector="#super-product-table tr:nth-of-type({{index}}) input.mage-error"/>
1817
<element name="groupedProductOptions" type="input" selector="//td//strong[text()='{{productName}}']" parameterized="true"/>
1918
<element name="groupedProductOptionQtyError" type="text" selector="//*[@id='super_group[{{productId}}]-error']" parameterized="true"/>
2019
</section>

app/code/Magento/GroupedProduct/Test/Mftf/Test/StoreFrontValidateGroupedProductQuantityInputErrorMessageTest.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,12 @@
3535
<requiredEntity createDataKey="product"/>
3636
<requiredEntity createDataKey="simple3"/>
3737
</updateData>
38-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="runIndex">
39-
<argument name="indices" value=""/>
40-
</actionGroup>
4138
</before>
4239
<after>
40+
<deleteData createDataKey="product" stepKey="deleteGroupedProduct"/>
4341
<deleteData createDataKey="simple1" stepKey="deleteSimple1"/>
4442
<deleteData createDataKey="simple2" stepKey="deleteSimple2"/>
4543
<deleteData createDataKey="simple3" stepKey="deleteSimple3"/>
46-
<deleteData createDataKey="product" stepKey="deleteGroupedProduct"/>
4744
</after>
4845
<actionGroup ref="StorefrontAddThreeGroupedProductToTheCartActionGroup" stepKey="enterSimpleProductsQty">
4946
<argument name="urlKey" value="$$product.custom_attributes[url_key]$$" />
@@ -54,6 +51,10 @@
5451
<argument name="qty2" value="-10"/>
5552
<argument name="qty3" value="5"/>
5653
</actionGroup>
57-
<actionGroup ref="StorefrontValidateThreeGroupedProductQtyErrorMessageActionGroup" stepKey="verifyQtyInputErrorMessage" />
54+
<actionGroup ref="StorefrontValidateThreeGroupedProductQtyErrorMessageActionGroup" stepKey="verifyQtyInputErrorMessage">
55+
<argument name="firstProductId" value="$simple1.id$"/>
56+
<argument name="secondProductId" value="$simple2.id$"/>
57+
<argument name="thirdProductId" value="$simple3.id$"/>
58+
</actionGroup>
5859
</test>
5960
</tests>

0 commit comments

Comments
 (0)