Skip to content

Commit 3ed5cc4

Browse files
committed
use action group for adding to cart
1 parent 02b87f6 commit 3ed5cc4

16 files changed

+19
-55
lines changed

app/code/Magento/Captcha/Test/Mftf/Test/CaptchaFormsDisplayingTest/CaptchaWithDisabledGuestCheckoutTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
</after>
3535
<amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.sku$$)}}" stepKey="openProductPage"/>
3636
<waitForPageLoad stepKey="waitForPageLoad"/>
37-
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/>
38-
<waitForPageLoad stepKey="waitForAddToCart"/>
39-
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
37+
<actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/>
4038
<waitForText userInput="You added $$createSimpleProduct.name$$ to your shopping cart." stepKey="waitForText"/>
4139
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickCart"/>
4240
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@
7878
<see selector="{{StorefrontProductInfoMainSection.productStockStatus}}" userInput="In Stock" stepKey="seeProductStatusInStoreFront"/>
7979
<!--Add Product to the cart-->
8080
<fillField selector="{{StorefrontProductPageSection.qtyInput}}" userInput="1" stepKey="fillProductQuantity"/>
81-
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="clickOnAddToCartButton"/>
82-
<waitForPageLoad stepKey="waitForProductToAddInCart"/>
83-
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
81+
<actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/>
8482
<seeElement selector="{{StorefrontProductPageSection.successMsg}}" stepKey="seeSuccessSaveMessage"/>
8583
<seeElement selector="{{StorefrontMinicartSection.quantity(1)}}" stepKey="seeAddedProductQuantityInCart"/>
8684
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockWithCustomOptionsTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@
150150
<!-- Verify added Product in cart -->
151151
<selectOption selector="{{StorefrontProductPageSection.customOptionDropDown}}" userInput="{{simpleProductCustomizableOption.option_0_title}} +$98.00" stepKey="selectCustomOption"/>
152152
<fillField selector="{{StorefrontProductPageSection.qtyInput}}" userInput="1" stepKey="fillProductQuantity"/>
153-
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="clickOnAddToCartButton"/>
154-
<waitForPageLoad stepKey="waitForProductToAddInCart"/>
155-
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
153+
<actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/>
156154
<seeElement selector="{{StorefrontProductPageSection.successMsg}}" stepKey="seeYouAddedSimpleprod4ToYourShoppingCartSuccessSaveMessage"/>
157155
<seeElement selector="{{StorefrontMinicartSection.quantity(1)}}" stepKey="seeAddedProductQuantityInCart"/>
158156
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>

app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleByPercentTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@
6161
<see stepKey="seeNewPrice2" selector="{{StorefrontProductInfoMainSection.updatedPrice}}" userInput="$110.70"/>
6262

6363
<!-- Add the product to cart and check that the price is correct there -->
64-
<click stepKey="addToCart" selector="{{StorefrontProductActionSection.addToCart}}"/>
65-
<waitForPageLoad stepKey="waitForAddedToCart"/>
64+
<actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/>
6665
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckout"/>
6766
<see stepKey="seeNewPriceInCart" selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$110.70"/>
6867
</test>

app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromConfigurableProductTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@
131131

132132
<!-- Assert that the rule isn't present in the Shopping Cart -->
133133
<selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="option1" stepKey="selectOption1"/>
134-
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart1"/>
135-
<waitForPageLoad time="30" stepKey="waitForPageLoad4"/>
136-
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
134+
<actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/>
137135
<see selector="{{StorefrontMessagesSection.success}}" userInput="You added $$createConfigProduct1.name$ to your shopping cart." stepKey="seeAddToCartSuccessMessage"/>
138136
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniShoppingCart1"/>
139137
<see selector="{{StorefrontMinicartSection.productPriceByName($$createConfigProduct1.name$$)}}" userInput="$$createConfigProduct1.price$$" stepKey="seeCorrectProductPrice1"/>

app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontAddProductWithAllTypesOfCustomOptionToTheShoppingCartWithoutAnySelectedOptionTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
</actionGroup>
3737

3838
<!--Click on Add To Cart button-->
39-
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/>
40-
<waitForPageLoad stepKey="waitForPageToLoad"/>
39+
<actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/>
4140

4241
<!--Assert all types of product options field displayed Required message -->
4342
<actionGroup ref="AssertStorefrontSeeElementActionGroup" stepKey="assertRequiredProductOptionField">

app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@
8383
<see userInput="$$createProduct.name$$" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertFirstProductNameTitle"/>
8484

8585
<!--Add a product to the cart-->
86-
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addProductToCart"/>
87-
<waitForPageLoad stepKey="waitForAddProductToCart"/>
88-
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
86+
<actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/>
8987
<!--Proceed to checkout-->
9088
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="GoToCheckoutFromMinicartActionGroup"/>
9189
<!-- Click next button to open payment section -->

app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleEmptyFromDateTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@
8383
<!-- Spot check the storefront -->
8484
<amOnPage url="$$product.custom_attributes[url_key]$$.html" stepKey="goToProductPage"/>
8585
<waitForPageLoad stepKey="waitForProductPageLoad"/>
86-
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addProductToCart"/>
87-
<waitForPageLoad stepKey="waitForAddToCart"/>
88-
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
86+
<actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/>
8987
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCartPage"/>
9088
<actionGroup ref="StorefrontApplyCouponActionGroup" stepKey="applyCoupon">
9189
<argument name="coupon" value="_defaultCoupon"/>

app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@
7575
<!-- Spot check the storefront -->
7676
<amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="goToProductPage"/>
7777
<waitForPageLoad stepKey="waitForProductPageLoad"/>
78-
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addProductToCart"/>
79-
<waitForPageLoad stepKey="waitForAddToCart"/>
80-
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
78+
<actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/>
8179
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCartPage"/>
8280
<actionGroup ref="StorefrontApplyCouponActionGroup" stepKey="applyCoupon">
8381
<argument name="coupon" value="_defaultCoupon"/>

app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@
7979
<!-- Spot check the storefront -->
8080
<amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="goToProductPage"/>
8181
<waitForPageLoad stepKey="waitForProductPageLoad"/>
82-
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addProductToCart"/>
83-
<waitForPageLoad stepKey="waitForAddToCart"/>
84-
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
82+
<actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/>
8583
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCartPage"/>
8684
<conditionalClick selector="{{StorefrontSalesRuleCartCouponSection.couponHeader}}" dependentSelector="{{StorefrontSalesRuleCartCouponSection.discountBlockActive}}" visible="false" stepKey="clickCouponHeader"/>
8785
<waitForElementVisible selector="{{StorefrontSalesRuleCartCouponSection.couponField}}" stepKey="waitForCouponField" />

0 commit comments

Comments
 (0)