|
36 | 36 | <comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
|
37 | 37 |
|
38 | 38 | <!--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> |
43 | 49 |
|
44 | 50 | <!--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> |
49 | 58 | <actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeCorrectSku">
|
50 | 59 | <argument name="productSku" value="{{productWithHTMLEntityOne.sku}}"/>
|
51 | 60 | </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> |
53 | 64 |
|
54 | 65 | <!--Veriy the breadcrumbs on Product Display page-->
|
55 |
| - <see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="Home" stepKey="seeHomePageInBreadcrumbs1"/> |
56 |
| - <see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$createCategoryOne.name$$" stepKey="seeCorrectBreadCrumbCategory"/> |
57 |
| - <see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$productOne.name$$" stepKey="seeCorrectBreadCrumbProduct"/> |
| 66 | + <actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeHomePageInBreadcrumbs1"> |
| 67 | + <argument name="breadcrumbs" value="Home"/> |
| 68 | + </actionGroup> |
| 69 | + <actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeCorrectBreadCrumbCategory"> |
| 70 | + <argument name="breadcrumbs" value="$$createCategoryOne.name$$"/> |
| 71 | + </actionGroup> |
| 72 | + <actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeCorrectBreadCrumbProduct"> |
| 73 | + <argument name="breadcrumbs" value="$$productOne.name$$"/> |
| 74 | + </actionGroup> |
58 | 75 |
|
59 |
| - <click selector="{{StorefrontNavigationSection.topCategory($$createCategoryOne.name$$)}}" stepKey="goBackToCategoryPage"/> |
60 |
| - <waitForPageLoad stepKey="waitforCategoryPageToLoad2"/> |
| 76 | + <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="goBackToCategoryPage"> |
| 77 | + <argument name="category" value="$createCategoryOne$"/> |
| 78 | + </actionGroup> |
| 79 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitforCategoryPageToLoad2"/> |
61 | 80 |
|
62 | 81 | <!--Open product display page-->
|
63 |
| - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName(productWithHTMLEntityTwo.name)}}" stepKey="clickProductToGoSecondProductPage"/> |
64 |
| - <waitForPageLoad stepKey="waitForProductDisplayPageLoad3"/> |
| 82 | + <actionGroup ref="StorefrontOpenProductFromCategoryPageActionGroup" stepKey="clickProductToGoSecondProductPage"> |
| 83 | + <argument name="productName" value="{{productWithHTMLEntityTwo.name}}"/> |
| 84 | + </actionGroup> |
| 85 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductDisplayPageLoad3"/> |
65 | 86 |
|
66 | 87 | <!--Verify the breadcrumbs on Product Display page-->
|
67 |
| - <see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="Home" stepKey="seeHomePageInBreadcrumbs2"/> |
68 |
| - <see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$createCategoryOne.name$$" stepKey="seeCorrectBreadCrumbCategory2"/> |
69 |
| - <see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$productTwo.name$$" stepKey="seeCorrectBreadCrumbProduct2"/> |
70 |
| - |
| 88 | + <actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeHomePageInBreadcrumbs2"> |
| 89 | + <argument name="breadcrumbs" value="Home"/> |
| 90 | + </actionGroup> |
| 91 | + <actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeCorrectBreadCrumbCategory2"> |
| 92 | + <argument name="breadcrumbs" value="$$createCategoryOne.name$$"/> |
| 93 | + </actionGroup> |
| 94 | + <actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeCorrectBreadCrumbProduct2"> |
| 95 | + <argument name="breadcrumbs" value="$$productTwo.name$$"/> |
| 96 | + </actionGroup> |
71 | 97 | </test>
|
72 | 98 | </tests>
|
0 commit comments