|
41 | 41 | <!--Flush cache-->
|
42 | 42 | <magentoCLI command="cache:flush" stepKey="cleanCache2"/>
|
43 | 43 | </after>
|
| 44 | + |
44 | 45 | <!-- 1. Log in to Admin -->
|
45 | 46 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
|
| 47 | + |
46 | 48 | <!-- 2. Open Marketing - SEO & Search - URL Rewrites -->
|
47 |
| - <amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="amOnUrlRewriteIndexPage"/> |
48 |
| - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters"/> |
49 |
| - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="inputProductName"/> |
50 |
| - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters"/> |
51 |
| - <waitForPageLoad stepKey="waitForPageToLoad"/> |
52 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeProducturl"/> |
53 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $simpleSubCategory1.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="dontSeeCategoryProducturlKey"/> |
54 |
| - <amOnPage url="/$simpleSubCategory1.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="navigateToProductPage"/> |
55 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createSimpleProduct.name$$" stepKey="seeProductName"/> |
| 49 | + <actionGroup ref="AdminSearchUrlRewriteByRequestPathActionGroup" stepKey="searchingUrlRewrite"> |
| 50 | + <argument name="requestPath" value="$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 51 | + </actionGroup> |
| 52 | + <actionGroup ref="AssertAdminRequestPathInUrlRewriteGrigActionGroup" stepKey="seeProductUrlInGrid"> |
| 53 | + <argument name="requestPath" value="$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 54 | + </actionGroup> |
| 55 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="categoryProductUrlIsNotShown"> |
| 56 | + <argument name="requestPath" value="$simpleSubCategory1.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 57 | + </actionGroup> |
| 58 | + |
| 59 | + <!-- 3. Assert the Redirect works and Product is present on StoreFront--> |
| 60 | + <actionGroup ref="AssertStorefrontProductRedirectActionGroup" stepKey="verifyProductInStoreFrontPage"> |
| 61 | + <argument name="productName" value="$$createSimpleProduct.name$$"/> |
| 62 | + <argument name="productSku" value="$$createSimpleProduct.sku$$"/> |
| 63 | + <argument name="productRequestPath" value="/$simpleSubCategory1.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 64 | + </actionGroup> |
56 | 65 | </test>
|
57 | 66 | </tests>
|
0 commit comments