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: Extract Action Groups to separate files for dev/tests #26322

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -9,7 +9,7 @@
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<!-- Check configurable product in wishlist -->
<actionGroup name="StorefrontCustomerCheckConfigurableProductInWishlist">
<actionGroup name="StorefrontCustomerCheckConfigurableProductInWishlistActionGroup">
<annotations>
<description>Validates that the provided Configurable Product and Product Option is present in the Storefront Wish List.</description>
</annotations>
Expand All @@ -24,20 +24,4 @@
<seeElement selector="{{StorefrontCustomerWishlistProductSection.ProductAddToCartByName(productVar.name)}}" stepKey="AssertWishlistAddToCart"/>
<seeElement selector="{{StorefrontCustomerWishlistProductSection.ProductImageByName(productVar.name)}}" stepKey="AssertWishlistProductImage"/>
</actionGroup>

<!-- Check configurable product in wishlist sidebar -->
<actionGroup name="StorefrontCustomerCheckConfigurableProductInWishlistSidebar">
dmytro-ch marked this conversation as resolved.
Show resolved Hide resolved
<annotations>
<description>Validates that the provided Configurable Product and Product Option is present in the Storefront Wish List sidebar.</description>
</annotations>
<arguments>
<argument name="productVar"/>
<argument name="optionProductVar"/>
</arguments>

<waitForElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductTitleByName(productVar.name)}}" time="30" stepKey="assertWishlistSidebarProductName"/>
<see userInput="${{optionProductVar.price}}.00" selector="{{StorefrontCustomerWishlistSidebarSection.ProductPriceByName(productVar.name)}}" stepKey="AssertWishlistSidebarProductPrice"/>
<seeElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductAddToCartByName(productVar.name)}}" stepKey="AssertWishlistSidebarAddToCart"/>
<seeElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductImageByName(productVar.name)}}" stepKey="AssertWishlistSidebarProductImage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<!-- Check configurable product in wishlist sidebar -->
<actionGroup name="StorefrontCustomerCheckConfigurableProductInWishlistSidebarActionGroup">
<annotations>
<description>Validates that the provided Configurable Product and Product Option is present in the Storefront Wish List sidebar.</description>
</annotations>
<arguments>
<argument name="productVar"/>
<argument name="optionProductVar"/>
</arguments>

<waitForElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductTitleByName(productVar.name)}}" time="30" stepKey="assertWishlistSidebarProductName"/>
<see userInput="${{optionProductVar.price}}.00" selector="{{StorefrontCustomerWishlistSidebarSection.ProductPriceByName(productVar.name)}}" stepKey="AssertWishlistSidebarProductPrice"/>
<seeElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductAddToCartByName(productVar.name)}}" stepKey="AssertWishlistSidebarAddToCart"/>
<seeElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductImageByName(productVar.name)}}" stepKey="AssertWishlistSidebarProductImage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" after="wishlistClickConfigurableProduct" stepKey="wishlistAddConfigurableProductToWishlist">
<argument name="productVar" value="$$createConfigProduct$$"/>
</actionGroup>
<actionGroup ref="StorefrontCustomerCheckConfigurableProductInWishlist" after="wishlistAddConfigurableProductToWishlist" stepKey="wishlistCheckConfigurableProductInWishlist">
<actionGroup ref="StorefrontCustomerCheckConfigurableProductInWishlistActionGroup" after="wishlistAddConfigurableProductToWishlist" stepKey="wishlistCheckConfigurableProductInWishlist">
<argument name="productVar" value="$$createConfigProduct$$"/>
<argument name="optionProductVar" value="$$createConfigChildProduct1$$"/>
</actionGroup>
<actionGroup ref="StorefrontCustomerCheckConfigurableProductInWishlistSidebar" after="wishlistCheckConfigurableProductInWishlist" stepKey="wishlistCheckConfigurableProductInWishlistSidebar">
<actionGroup ref="StorefrontCustomerCheckConfigurableProductInWishlistSidebarActionGroup" after="wishlistCheckConfigurableProductInWishlist" stepKey="wishlistCheckConfigurableProductInWishlistSidebar">
<argument name="productVar" value="$$createConfigProduct$$"/>
<argument name="optionProductVar" value="$$createConfigChildProduct1$$"/>
</actionGroup>
Expand Down