Skip to content

Commit ac64826

Browse files
committed
MC-13769: Add Missing P0-P1 MFTF Tests For PageBuilder On CMS Block - Render Content Through Block
- Adding validation to products in block test
1 parent ee0475b commit ac64826

File tree

2 files changed

+68
-1
lines changed

2 files changed

+68
-1
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/ContentTypeProductsActionGroup.xml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,53 @@
7474
<click selector="{{page.conditionsListConditionPlaceholder}}" stepKey="revealCategoryInput"/>
7575
<fillField selector="{{page.conditionsListConditionInput}}" userInput="{{category}}" stepKey="fillCategoryField"/>
7676
</actionGroup>
77+
<actionGroup name="clickProductImageInProductsOnStorefront">
78+
<arguments>
79+
<argument name="product" type="string"/>
80+
<argument name="index" defaultValue="1" type="string"/>
81+
</arguments>
82+
<waitForElementVisible selector="{{ProductsOnStorefront.productImage(index)}}" stepKey="waitForProductImage"/>
83+
<click selector="{{ProductsOnStorefront.productImage(index)}}" stepKey="clickProductImage"/>
84+
<waitForPageLoad stepKey="waitForProductPageToLoad"/>
85+
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{product}}" stepKey="seeProductName"/>
86+
</actionGroup>
87+
<actionGroup name="clickProductNameInProductsOnStorefront">
88+
<arguments>
89+
<argument name="product" type="string"/>
90+
<argument name="index" defaultValue="1" type="string"/>
91+
</arguments>
92+
<waitForElementVisible selector="{{ProductsOnStorefront.productName(index, product)}}" stepKey="waitForProductName"/>
93+
<click selector="{{ProductsOnStorefront.productName(index, product)}}" stepKey="clickProductName"/>
94+
<waitForPageLoad stepKey="waitForProductPageToLoad"/>
95+
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{product}}" stepKey="seeProductName"/>
96+
</actionGroup>
97+
<actionGroup name="clickProductAddToCartInProductsOnStorefront">
98+
<arguments>
99+
<argument name="product" type="string"/>
100+
<argument name="index" defaultValue="1" type="string"/>
101+
</arguments>
102+
<moveMouseOver selector="{{ProductsOnStorefront.productImage(index)}}" stepKey="moveMouseOverProduct"/>
103+
<click selector="{{ProductsOnStorefront.productAddToCart(index)}}" stepKey="clickProductAddToCart"/>
104+
<waitForPageLoad stepKey="waitForProductPageToLoad"/>
105+
<see userInput="You added {{product}} to your shopping cart." stepKey="seeAddToCartSuccessMessage"/>
106+
</actionGroup>
107+
<actionGroup name="clickProductAddToCompareInProductsOnStorefront">
108+
<arguments>
109+
<argument name="product" type="string"/>
110+
<argument name="index" defaultValue="1" type="string"/>
111+
</arguments>
112+
<moveMouseOver selector="{{ProductsOnStorefront.productImage(index)}}" stepKey="moveMouseOverProduct"/>
113+
<click selector="{{ProductsOnStorefront.productAddToCompare(index)}}" stepKey="clickProductAddToCompare"/>
114+
<waitForPageLoad stepKey="waitForProductPageToLoad"/>
115+
<see userInput="You added product {{product}} to the comparison list." stepKey="seeComparisonListSuccessMessage"/>
116+
</actionGroup>
117+
<actionGroup name="clickProductAddToWishListInProductsOnStorefront">
118+
<arguments>
119+
<argument name="index" defaultValue="1" type="string"/>
120+
</arguments>
121+
<moveMouseOver selector="{{ProductsOnStorefront.productImage(index)}}" stepKey="moveMouseOverProduct"/>
122+
<click selector="{{ProductsOnStorefront.productAddToWishList(index)}}" stepKey="clickProductAddToWishList"/>
123+
<waitForPageLoad stepKey="waitForProductPageToLoad"/>
124+
<see userInput="You must login or register to add items to your wishlist." stepKey="seeWishListSuccessMessage"/>
125+
</actionGroup>
77126
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderBlockRenderContentTypesTests.xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2450,6 +2450,24 @@
24502450
<argument name="page" value="ProductsOnStorefront"/>
24512451
<argument name="isClickable" value="auto"/>
24522452
</actionGroup>
2453-
<!--todo: click & verify each button-->
2453+
<actionGroup ref="clickProductImageInProductsOnStorefront" stepKey="clickProductImageInProductsOnStorefront">
2454+
<argument name="product" value="$$createProduct3.name$$"/>
2455+
</actionGroup>
2456+
<actionGroup ref="navigateToStorefrontForCreatedPage" stepKey="navigateToStoreFront2">
2457+
<argument name="page" value="$$createCMSPage.identifier$$"/>
2458+
</actionGroup>
2459+
<actionGroup ref="clickProductNameInProductsOnStorefront" stepKey="clickProductNameInProductsOnStorefront">
2460+
<argument name="product" value="$$createProduct3.name$$"/>
2461+
</actionGroup>
2462+
<actionGroup ref="navigateToStorefrontForCreatedPage" stepKey="navigateToStoreFront3">
2463+
<argument name="page" value="$$createCMSPage.identifier$$"/>
2464+
</actionGroup>
2465+
<actionGroup ref="clickProductAddToCartInProductsOnStorefront" stepKey="clickProductAddToCartInProductsOnStorefront">
2466+
<argument name="product" value="$$createProduct3.name$$"/>
2467+
</actionGroup>
2468+
<actionGroup ref="clickProductAddToCompareInProductsOnStorefront" stepKey="clickProductAddToCompareInProductsOnStorefront">
2469+
<argument name="product" value="$$createProduct3.name$$"/>
2470+
</actionGroup>
2471+
<actionGroup ref="clickProductAddToWishListInProductsOnStorefront" stepKey="clickProductAddToWishListInProductsOnStorefront"/>
24542472
</test>
24552473
</tests>

0 commit comments

Comments
 (0)