Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MFTF] Use Action Group to click on minicart #27671

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@
<argument name="product" value="$$simpleProduct2$$"/>
<argument name="currency" value="USD - US Dollar"/>
</actionGroup>
<click stepKey="openMiniCart" selector="{{StorefrontMinicartSection.showCart}}"/>
<waitForPageLoad stepKey="waitForMiniCart"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart"/>
<see stepKey="seeCartSubtotal" userInput="$12,300.00"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<waitForPageLoad stepKey="waitForAddToCart"/>
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
<waitForText userInput="You added $$createSimpleProduct.name$$ to your shopping cart." stepKey="waitForText"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickCart"/>
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/>
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.email}}" stepKey="waitEmailFieldVisible"/>
<fillField selector="{{StorefrontCustomerSignInPopupFormSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillCustomerEmail"/>
Expand All @@ -50,7 +50,7 @@
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaReload}}" stepKey="seeCaptchaReloadButton"/>
<reloadPage stepKey="refreshPage"/>
<waitForPageLoad stepKey="waitForPageLoad2"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart2"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickCart2"/>
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout2"/>
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.email}}" stepKey="waitEmailFieldVisible2"/>
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaField}}" stepKey="seeCaptchaField2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
<seeElement selector="{{StorefrontProductPageSection.successMsg}}" stepKey="seeSuccessSaveMessage"/>
<seeElement selector="{{StorefrontMinicartSection.quantity(1)}}" stepKey="seeAddedProductQuantityInCart"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
<see selector="{{StorefrontMinicartSection.miniCartItemsText}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductNameInMiniCart"/>
<see selector="{{StorefrontMinicartSection.miniCartItemsText}}" userInput="{{SimpleProduct.price}}" stepKey="seeProductPriceInMiniCart"/>
<seeElement selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="seeCheckOutButtonInMiniCart"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<seeElement selector="{{StorefrontProductMediaSection.imageFile(placeholderBaseImage.name)}}" stepKey="seeBasePlaceholderImage"/>
<click selector="{{StorefrontProductPageSection.addToCartBtn}}" stepKey="addProductToCart1"/>
<waitForElementVisible selector="{{StorefrontProductPageSection.successMsg}}" stepKey="waitForProductAdded1"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="openMiniCart1"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart1"/>
<grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$productNoImages.name$$)}}" userInput="src" stepKey="getThumbnailPlaceholderImageSrc"/>
<assertContains stepKey="checkThumbnailPlaceholderImage">
<actualResult type="variable">$getThumbnailPlaceholderImageSrc</actualResult>
Expand All @@ -132,7 +132,7 @@
<dontSeeElement selector="{{StorefrontProductMediaSection.imageFile(placeholderBaseImage.name)}}" stepKey="dontSeeBasePlaceholderImage"/>
<click selector="{{StorefrontProductPageSection.addToCartBtn}}" stepKey="addProductToCart2"/>
<waitForElementVisible selector="{{StorefrontProductPageSection.successMsg}}" stepKey="waitForProductAdded2"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="openMiniCart2"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart2"/>
<grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$productWithImages.name$$)}}" userInput="src" stepKey="getThumbnailImageSrc"/>
<assertNotContains stepKey="checkThumbnailImage">
<actualResult type="variable">$getThumbnailImageSrc</actualResult>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
<seeElement selector="{{StorefrontProductPageSection.successMsg}}" stepKey="seeYouAddedSimpleprod4ToYourShoppingCartSuccessSaveMessage"/>
<seeElement selector="{{StorefrontMinicartSection.quantity(1)}}" stepKey="seeAddedProductQuantityInCart"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
<see selector="{{StorefrontMinicartSection.miniCartItemsText}}" userInput="{{simpleProductRegularPriceCustomOptions.name}}" stepKey="seeProductNameInMiniCart"/>
<see selector="{{StorefrontMinicartSection.miniCartItemsText}}" userInput="{{simpleProductRegularPriceCustomOptions.storefront_new_cartprice}}" stepKey="seeProductPriceInMiniCart"/>
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@
<waitForPageLoad time="30" stepKey="waitForPageLoad4"/>
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
<see selector="{{StorefrontMessagesSection.success}}" userInput="You added $$createConfigProduct1.name$ to your shopping cart." stepKey="seeAddToCartSuccessMessage"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="openMiniShoppingCart1"/>
<waitForPageLoad time="30" stepKey="waitForPageLoad5"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniShoppingCart1"/>
<see selector="{{StorefrontMinicartSection.productPriceByName($$createConfigProduct1.name$$)}}" userInput="$$createConfigProduct1.price$$" stepKey="seeCorrectProductPrice1"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addProductToShoppingCart1">
<argument name="productName" value="$$createProduct1.name$$"/>
</actionGroup>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="openMiniShoppingCart1"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniShoppingCart1"/>
<see selector="{{StorefrontMinicartSection.productPriceByName($$createProduct1.name$$)}}" userInput="$$createProduct1.price$$" stepKey="seeCorrectProductPrice1"/>

<!-- Assert that the rule isn't present on the Checkout page -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,16 @@
<see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$createSimpleProduct.name$$ to your shopping cart." stepKey="seeAddedToCartMessage"/>
<see selector="{{StorefrontMinicartSection.quantity}}" userInput="1" stepKey="seeCartQuantity"/>
<!-- open the minicart -->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickShowMinicart1"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickShowMinicart1"/>
<click selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="editProductFromMiniCart"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickShowMinicart2"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickShowMinicart2"/>
<click selector="{{StorefrontMinicartSection.deleteMiniCartItem}}" stepKey="deleteMiniCartItem"/>
<waitForElementVisible selector="{{StoreFrontRemoveItemModalSection.message}}" stepKey="waitFortheConfirmationModal"/>
<see selector="{{StoreFrontRemoveItemModalSection.message}}" userInput="Are you sure you would like to remove this item from the shopping cart?" stepKey="seeDeleteConfirmationMessage"/>
<click selector="{{StoreFrontRemoveItemModalSection.ok}}" stepKey="confirmDelete"/>
<waitForPageLoad stepKey="waitForDeleteToFinish"/>
<dontSeeElement selector="{{CheckoutCartProductSection.RemoveItem}}" stepKey="dontSeeDeleteProductFromCheckoutCart"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
<waitForPageLoad stepKey="WaitForPageLoad3"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickCart"/>
<see userInput="You have no items in your shopping cart." stepKey="seeNoItemsInShoppingCart"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@

<!-- Assert product in mini cart -->
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertProductInMiniCart">
<argument name="productName" value="$$createSimpleProduct.name$$"/>
<argument name="productPrice" value="$$createSimpleProduct.price$$"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</assertEquals>

<!--Open minicart and change Qty-->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="openMiniCart"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart"/>
<waitForElementVisible selector="{{StorefrontMinicartSection.quantity}}" stepKey="waitForElementQty"/>
<pressKey selector="{{StorefrontMinicartSection.itemQuantity($$createProduct.name$$)}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::BACKSPACE]" stepKey="deleteFiled"/>
<fillField selector="{{StorefrontMinicartSection.itemQuantity($$createProduct.name$$)}}" userInput="5" stepKey="changeQty"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@
</actionGroup>

<!-- Assert Product in Mini Cart -->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/>
<waitForPageLoad stepKey="waitForPageToLoad1"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertSimpleProduct3MiniCart">
<argument name="productName" value="$$createBundleProduct.name$$"/>
<argument name="productPrice" value="$50.00"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@
</actionGroup>

<!-- Assert product details in Mini Cart -->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertMiniCart">
<argument name="productName" value="$$createConfigProduct.name$$"/>
<argument name="productPrice" value="$$createConfigChildProduct2.price$$"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@
</actionGroup>

<!-- Assert product details in Mini Cart -->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/>
<waitForPageLoad stepKey="waitForPageToLoad1"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertMiniCart">
<argument name="productName" value="$$createDownloadableProduct.name$$"/>
<argument name="productPrice" value="$123.00"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@
</actionGroup>

<!-- Assert product1 details in Mini Cart -->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/>
<waitForPageLoad stepKey="waitForPageToLoad1"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertSimpleProduct3MiniCart">
<argument name="productName" value="$$simple3.name$$"/>
<argument name="productPrice" value="$300.00"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@
</actionGroup>

<!-- Assert Product in Mini Cart -->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/>
<waitForPageLoad stepKey="waitForPageToLoad1"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertSimpleProduct3MiniCart">
<argument name="productName" value="$$createBundleProduct.name$$"/>
<argument name="productPrice" value="$60.00"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@
<waitForPageLoad stepKey="waitForMiniCartPanelToAppear"/>

<!-- Assert Product in Mini Cart -->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/>
<waitForPageLoad stepKey="waitForPageToLoad1"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertSimpleProduct3MiniCart">
<argument name="productName" value="$$createBundleProduct.name$$"/>
<argument name="productPrice" value="$10.00"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
<actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="selectViewAndEditCart"/>

<!-- Assert product details in Mini Cart -->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/>
<waitForPageLoad stepKey="waitForPageToLoad1"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertMiniCart">
<argument name="productName" value="$$createDownloadableProduct.name$$"/>
<argument name="productPrice" value="$123.00"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
</actionGroup>

<!-- Assert Simple and Virtual products in mini cart -->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/>
<waitForPageLoad stepKey="waitForPageToLoad1"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertSimpleProductInMiniCart">
<argument name="productName" value="$$simpleProduct.name$$"/>
<argument name="productPrice" value="$10.00"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
</actionGroup>

<!-- Assert Product in Mini Cart -->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/>
<waitForPageLoad stepKey="waitForPageToLoad1"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertSimpleProduct3MiniCart">
<argument name="productName" value="$$simpleProduct.name$$"/>
<argument name="productPrice" value="$10.00"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<waitForPageLoad stepKey="waitForStoreView"/>

<!--Check product name in Minicart-->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickCart"/>
<grabTextFrom selector="{{StorefrontMinicartSection.productName}}" stepKey="grabProductNameMinicart"/>
<assertContains stepKey="assertProductNameMinicart">
<actualResult type="const">$grabProductNameMinicart</actualResult>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</actionGroup>

<!--Proceed to shipment-->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickToOpenCard"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickToOpenCard"/>
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="clickToProceedToCheckout"/>
<waitForPageLoad stepKey="waitForTheFormIsOpened"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<waitForPageLoad stepKey="waitForMiniCart"/>

<!-- Edit Item in Cart -->
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="openMiniCart"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart"/>
<click selector="{{StorefrontMinicartSection.editMiniCartItem}}" stepKey="clickEditCartItem"/>

<!-- Check if Product Configuration is still selected -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/>
<click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart"/>
<waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickCart"/>
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/>
<waitForPageLoad stepKey="waitForPageLoad2"/>
<fillField selector="{{CheckoutShippingGuestInfoSection.email}}" userInput="{{CustomerEntityOne.email}}" stepKey="enterEmail"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverOverProduct"/>
<click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart"/>
<waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductToAdd"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickCart"/>
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/>
<waitForPageLoad stepKey="waitForPageLoad2"/>
<!-- fill out customer information -->
Expand Down