Skip to content

Commit cbc5a5b

Browse files
committed
B2B-2133: [AWS S3] Test Fails to Assert Success Message after adding to cart
- Fixing flaky tests
1 parent e8c31f5 commit cbc5a5b

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddProductWithQtyToCartFromStorefrontProductPageActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<argument name="productQty" type="string"/>
1818
</arguments>
1919

20-
<fillField selector="{{StorefrontProductActionSection.quantity}}" userInput="{{productQty}}" stepKey="fillProductQuantity" before="addToCart"/>
20+
<waitForElementVisible selector="{{StorefrontProductActionSection.quantity}}" stepKey="waitForProductQuantity" before="fillProductQuantity"/>
21+
<fillField selector="{{StorefrontProductActionSection.quantity}}" userInput="{{productQty}}" stepKey="fillProductQuantity" before="waitForAddToCartButton"/>
2122
</actionGroup>
2223
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddToCartFromStorefrontProductPageActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<argument name="productName"/>
1818
</arguments>
1919

20+
<waitForElementVisible selector="{{StorefrontProductActionSection.addToCart}}" stepKey="waitForAddToCartButton"/>
2021
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/>
2122
<waitForPageLoad stepKey="waitForAddToCart"/>
2223
<waitForElementNotVisible selector="{{StorefrontProductActionSection.addToCartButtonTitleIsAdding}}" stepKey="waitForElementNotVisibleAddToCartButtonTitleIsAdding"/>

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndCheckoutItemsCountTest/StorefrontCartItemsCountDisplayItemsQuantitiesTest.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,17 @@
3232
</after>
3333

3434
<!-- Add simpleProduct1 to cart -->
35-
<amOnPage url="{{StorefrontProductPage.url($$simpleProduct1.custom_attributes[url_key]$)}}" stepKey="amOnProduct1Page"/>
35+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="amOnProduct1Page">
36+
<argument name="product" value="$simpleProduct1$"/>
37+
</actionGroup>
3638
<actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addProduct1ToCart">
3739
<argument name="productName" value="$$simpleProduct1.name$$"/>
3840
<argument name="productQty" value="2"/>
3941
</actionGroup>
4042
<!-- Add simpleProduct2 to cart -->
41-
<amOnPage url="{{StorefrontProductPage.url($$simpleProduct2.custom_attributes[url_key]$)}}" stepKey="amOnProduct2Page"/>
43+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="amOnProduct2Page">
44+
<argument name="product" value="$simpleProduct2$"/>
45+
</actionGroup>
4246
<actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addProduct2ToCart">
4347
<argument name="productName" value="$$simpleProduct2.name$$"/>
4448
<argument name="productQty" value="1"/>

app/code/Magento/CurrencySymbol/Test/Mftf/ActionGroup/StorefrontSwitchCurrencyActionGroup.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
<click selector="{{StorefrontSwitchCurrencyRatesSection.currencyToggle}}" stepKey="openToggle"/>
1616
<waitForElementVisible selector="{{StorefrontSwitchCurrencyRatesSection.currency(currency)}}" stepKey="waitForCurrency"/>
1717
<click selector="{{StorefrontSwitchCurrencyRatesSection.currency(currency)}}" stepKey="chooseCurrency"/>
18+
<waitForPageLoad stepKey="waitForPageLoad"/>
19+
<waitForElementVisible selector="{{StorefrontSwitchCurrencyRatesSection.selectedCurrency}}" stepKey="waitForSelectedCurrency"/>
1820
<see selector="{{StorefrontSwitchCurrencyRatesSection.selectedCurrency}}" userInput="{{currency}}" stepKey="seeSelectedCurrency"/>
1921
</actionGroup>
2022
</actionGroups>

app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayWhenChooseThreeAllowedCurrenciesTest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@
4343
<argument name="rate" value="0.8"/>
4444
</actionGroup>
4545
<!--Open created product on Storefront and place for order-->
46-
<amOnPage url="{{StorefrontProductPage.url($$createNewProduct.custom_attributes[url_key]$$)}}" stepKey="goToNewProductPage"/>
47-
<waitForPageLoad stepKey="waitForNewProductPagePageLoad"/>
46+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToNewProductPage">
47+
<argument name="product" value="$createNewProduct$"/>
48+
</actionGroup>
49+
<comment userInput="BIC workaround" stepKey="waitForNewProductPagePageLoad"/>
4850
<actionGroup ref="StorefrontSwitchCurrencyActionGroup" stepKey="switchCurrency">
4951
<argument name="currency" value="RUB"/>
5052
</actionGroup>

0 commit comments

Comments
 (0)