Skip to content

Commit 92eb21c

Browse files
committed
Replace some actions in the test
1 parent cdd4d4b commit 92eb21c

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithHTMLEntitiesTest.xml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,31 @@
3636
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
3737

3838
<!--Check product in category listing-->
39-
<amOnPage url="{{StorefrontCategoryPage.url($$createCategoryOne.custom_attributes[url_key]$$)}}" stepKey="navigateToCategoryPage"/>
40-
<waitForPageLoad stepKey="waitforCategoryPageToLoad"/>
41-
<see selector="{{StorefrontCategoryProductSection.ProductTitleByName(productWithHTMLEntityOne.name)}}" userInput="{{productWithHTMLEntityOne.name}}" stepKey="seeCorrectNameProd1CategoryPage"/>
42-
<see selector="{{StorefrontCategoryProductSection.ProductTitleByName(productWithHTMLEntityTwo.name)}}" userInput="{{productWithHTMLEntityTwo.name}}" stepKey="seeCorrectNameProd2CategoryPage"/>
39+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage">
40+
<argument name="category" value="$$createCategoryOne$$"/>
41+
</actionGroup>
42+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitforCategoryPageToLoad"/>
43+
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="seeCorrectNameProd1CategoryPage">
44+
<argument name="productName" value="{{productWithHTMLEntityOne.name}}"/>
45+
</actionGroup>
46+
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="seeCorrectNameProd2CategoryPage">
47+
<argument name="productName" value="{{productWithHTMLEntityTwo.name}}"/>
48+
</actionGroup>
4349

4450
<!--Open product display page-->
45-
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName(productWithHTMLEntityOne.name)}}" stepKey="clickProductToGoProductPage"/>
46-
<waitForPageLoad stepKey="waitForProductDisplayPageLoad2"/>
47-
48-
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{productWithHTMLEntityOne.name}}" stepKey="seeCorrectName"/>
51+
<actionGroup ref="StorefrontOpenProductFromCategoryPageActionGroup" stepKey="clickProductToGoProductPage">
52+
<argument name="productName" value="{{productWithHTMLEntityOne.name}}"/>
53+
</actionGroup>
54+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductDisplayPageLoad2"/>
55+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeCorrectName">
56+
<argument name="productName" value="{{productWithHTMLEntityOne.name}}"/>
57+
</actionGroup>
4958
<actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeCorrectSku">
5059
<argument name="productSku" value="{{productWithHTMLEntityOne.sku}}"/>
5160
</actionGroup>
52-
<see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="${{productWithHTMLEntityOne.price}}" stepKey="seeCorrectPrice"/>
61+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeCorrectPrice">
62+
<argument name="productPrice" value="{{productWithHTMLEntityOne.price}}"/>
63+
</actionGroup>
5364

5465
<!--Veriy the breadcrumbs on Product Display page-->
5566
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="Home" stepKey="seeHomePageInBreadcrumbs1"/>

0 commit comments

Comments
 (0)