|
47 | 47 | <after>
|
48 | 48 | <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
|
49 | 49 | <deleteData createDataKey="simpleSubCategory1" stepKey="deletesimpleSubCategory1"/>
|
50 |
| - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> |
| 50 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
51 | 51 | <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="resetConfigurationSetting"/>
|
52 | 52 | <!--Flush cache-->
|
53 | 53 | <magentoCLI command="cache:flush" stepKey="cleanCache2"/>
|
54 | 54 | </after>
|
55 | 55 | <!-- Steps -->
|
56 | 56 | <!-- 1. Log in to Admin -->
|
57 | 57 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
|
| 58 | + |
58 | 59 | <!-- 2. Open Marketing - SEO & Search - URL Rewrites -->
|
59 |
| - <amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="amOnUrlRewriteIndexPage"/> |
60 |
| - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters"/> |
61 |
| - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="inputProductName"/> |
62 |
| - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters"/> |
63 |
| - <waitForPageLoad stepKey="waitForPageToLoad"/> |
64 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeValue1"/> |
65 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $simpleSubCategory1.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeValue2"/> |
66 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $simpleSubCategory1.custom_attributes[url_key]$/$simpleSubCategory2.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeValue3"/> |
67 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $simpleSubCategory1.custom_attributes[url_key]$/$simpleSubCategory2.custom_attributes[url_key]$/$simpleSubCategory3.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeValue4"/> |
| 60 | + <actionGroup ref="AdminSearchUrlRewriteByRequestPathActionGroup" stepKey="searchingUrlRewrite"> |
| 61 | + <argument name="requestPath" value="$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 62 | + </actionGroup> |
| 63 | + <actionGroup ref="AssertAdminRequestPathInUrlRewriteGrigActionGroup" stepKey="seeValueOne"> |
| 64 | + <argument name="requestPath" value="$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 65 | + </actionGroup> |
| 66 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeValueTwo"> |
| 67 | + <argument name="requestPath" value="$simpleSubCategory1.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 68 | + </actionGroup> |
| 69 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeValueThree"> |
| 70 | + <argument name="requestPath" value="$simpleSubCategory1.custom_attributes[url_key]$/$simpleSubCategory2.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 71 | + </actionGroup> |
| 72 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeValueFour"> |
| 73 | + <argument name="requestPath" value="$simpleSubCategory1.custom_attributes[url_key]$/$simpleSubCategory2.custom_attributes[url_key]$/$simpleSubCategory3.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 74 | + </actionGroup> |
68 | 75 |
|
69 | 76 | <!-- 3. Edit Category 1 for DEFAULT Store View: -->
|
70 | 77 | <actionGroup ref="SwitchCategoryStoreViewActionGroup" stepKey="switchStoreView">
|
71 | 78 | <argument name="Store" value="_defaultStore.name"/>
|
72 | 79 | <argument name="CatName" value="$$simpleSubCategory1.name$$"/>
|
73 | 80 | </actionGroup>
|
74 |
| - <click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="openSeoSection2"/> |
75 |
| - <uncheckOption selector="{{AdminCategorySEOSection.UrlKeyDefaultValueCheckbox}}" stepKey="uncheckRedirect2"/> |
76 |
| - <fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="$simpleSubCategory1.custom_attributes[url_key]$-new" stepKey="changeURLKey"/> |
77 |
| - <checkOption selector="{{AdminCategorySEOSection.UrlKeyRedirectCheckbox}}" stepKey="checkUrlKeyRedirect"/> |
78 |
| - <!-- 4. Save Category 1 --> |
79 |
| - <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/> |
80 |
| - <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessageAfterSaved"/> |
81 | 81 |
|
82 |
| - <!-- 5. Open Marketing - SEO & Search - URL Rewrites --> |
83 |
| - <amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="amOnUrlRewriteIndexPage2"/> |
84 |
| - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters1"/> |
85 |
| - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="inputProductName1"/> |
86 |
| - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters1"/> |
87 |
| - <waitForPageLoad stepKey="waitForPageToLoad1"/> |
88 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeInListValue1"/> |
89 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $simpleSubCategory1.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeInListValue2"/> |
90 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $simpleSubCategory1.custom_attributes[url_key]$/$simpleSubCategory2.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeInListValue3"/> |
91 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $simpleSubCategory1.custom_attributes[url_key]$/$simpleSubCategory2.custom_attributes[url_key]$/$simpleSubCategory3.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeInListValue4"/> |
92 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $simpleSubCategory1.custom_attributes[url_key]$-new/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeInListValue5"/> |
93 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $simpleSubCategory1.custom_attributes[url_key]$-new/$simpleSubCategory2.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeInListValue6"/> |
94 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $simpleSubCategory1.custom_attributes[url_key]$-new/$simpleSubCategory2.custom_attributes[url_key]$/$simpleSubCategory3.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeInListValue7"/> |
95 |
| - |
96 |
| - <amOnPage url="/$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="navigateToProductPage"/> |
97 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createSimpleProduct.name$$" stepKey="seeProductName"/> |
| 82 | + <!-- 4. Change URL key for category and save changes --> |
| 83 | + <actionGroup ref="ChangeSeoUrlKeyForSubCategoryActionGroup" stepKey="changeCategoryUrlKey"> |
| 84 | + <argument name="value" value="$simpleSubCategory1.custom_attributes[url_key]$new"/> |
| 85 | + </actionGroup> |
98 | 86 |
|
99 |
| - <amOnPage url="/$simpleSubCategory1.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="navigateToProductPage2"/> |
100 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createSimpleProduct.name$$" stepKey="seeProductName2"/> |
101 |
| - <amOnPage url="/$simpleSubCategory1.custom_attributes[url_key]$/$simpleSubCategory2.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="navigateToProductPage3"/> |
102 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createSimpleProduct.name$$" stepKey="seeProductName3"/> |
103 |
| - <amOnPage url="/$simpleSubCategory1.custom_attributes[url_key]$/$simpleSubCategory2.custom_attributes[url_key]$/$simpleSubCategory3.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="navigateToProductPage4"/> |
104 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createSimpleProduct.name$$" stepKey="seeProductName4"/> |
| 87 | + <!-- 5. Open Marketing - SEO & Search - URL Rewrites --> |
| 88 | + <actionGroup ref="AdminSearchUrlRewriteByRequestPathActionGroup" stepKey="searchingUrlRewriteOneMoreTime"> |
| 89 | + <argument name="requestPath" value="$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 90 | + </actionGroup> |
| 91 | + <actionGroup ref="AssertAdminRequestPathInUrlRewriteGrigActionGroup" stepKey="seeValueInGrid"> |
| 92 | + <argument name="requestPath" value="$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 93 | + </actionGroup> |
| 94 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeValueTwoInGrid"> |
| 95 | + <argument name="requestPath" value="$simpleSubCategory1.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 96 | + </actionGroup> |
| 97 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeValueThreeInGrid"> |
| 98 | + <argument name="requestPath" value="$simpleSubCategory1.custom_attributes[url_key]$/$simpleSubCategory2.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 99 | + </actionGroup> |
| 100 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeValueFourInGrid"> |
| 101 | + <argument name="requestPath" value="$simpleSubCategory1.custom_attributes[url_key]$/$simpleSubCategory2.custom_attributes[url_key]$/$simpleSubCategory3.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 102 | + </actionGroup> |
| 103 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeValueFiveInGrid"> |
| 104 | + <argument name="requestPath" value="$simpleSubCategory1.custom_attributes[url_key]$-new/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 105 | + </actionGroup> |
| 106 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeValueSixInGrid"> |
| 107 | + <argument name="requestPath" value="$simpleSubCategory1.custom_attributes[url_key]$-new/$simpleSubCategory2.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 108 | + </actionGroup> |
| 109 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeValueSevenInGrid"> |
| 110 | + <argument name="requestPath" value="$simpleSubCategory1.custom_attributes[url_key]$-new/$simpleSubCategory2.custom_attributes[url_key]$/$simpleSubCategory3.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 111 | + </actionGroup> |
105 | 112 |
|
106 |
| - <amOnPage url="/$simpleSubCategory1.custom_attributes[url_key]$-new/$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="navigateToProductPage5"/> |
107 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createSimpleProduct.name$$" stepKey="seeProductName5"/> |
108 |
| - <amOnPage url="/$simpleSubCategory1.custom_attributes[url_key]$-new/$simpleSubCategory2.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="navigateToProductPage6"/> |
109 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createSimpleProduct.name$$" stepKey="seeProductName6"/> |
110 |
| - <amOnPage url="/$simpleSubCategory1.custom_attributes[url_key]$-new/$simpleSubCategory2.custom_attributes[url_key]$/$simpleSubCategory3.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="navigateToProductPage7"/> |
111 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createSimpleProduct.name$$" stepKey="seeProductName7"/> |
| 113 | + <!-- 6. Assert Redirects work and Product is present on StoreFront--> |
| 114 | + <actionGroup ref="AssertStorefrontProductRedirectActionGroup" stepKey="verifyProductInStoreFrontPage"> |
| 115 | + <argument name="productName" value="$$createSimpleProduct.name$$"/> |
| 116 | + <argument name="productSku" value="$$createSimpleProduct.sku$$"/> |
| 117 | + <argument name="productRequestPath" value="/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 118 | + </actionGroup> |
| 119 | + <actionGroup ref="AssertStorefrontProductRedirectActionGroup" stepKey="verifyProductInStoreFrontPageSecondAttempt"> |
| 120 | + <argument name="productName" value="$$createSimpleProduct.name$$"/> |
| 121 | + <argument name="productSku" value="$$createSimpleProduct.sku$$"/> |
| 122 | + <argument name="productRequestPath" value="/$simpleSubCategory1.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 123 | + </actionGroup> |
| 124 | + <actionGroup ref="AssertStorefrontProductRedirectActionGroup" stepKey="verifyProductInStoreFrontPageThirdAttempt"> |
| 125 | + <argument name="productName" value="$$createSimpleProduct.name$$"/> |
| 126 | + <argument name="productSku" value="$$createSimpleProduct.sku$$"/> |
| 127 | + <argument name="productRequestPath" value="/$simpleSubCategory1.custom_attributes[url_key]$/$simpleSubCategory2.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 128 | + </actionGroup> |
| 129 | + <actionGroup ref="AssertStorefrontProductRedirectActionGroup" stepKey="verifyProductInStoreFrontPageFourthAttempt"> |
| 130 | + <argument name="productName" value="$$createSimpleProduct.name$$"/> |
| 131 | + <argument name="productSku" value="$$createSimpleProduct.sku$$"/> |
| 132 | + <argument name="productRequestPath" value="/$simpleSubCategory1.custom_attributes[url_key]$/$simpleSubCategory2.custom_attributes[url_key]$/$simpleSubCategory3.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 133 | + </actionGroup> |
| 134 | + <actionGroup ref="AssertStorefrontProductRedirectActionGroup" stepKey="verifyProductInStoreFrontPageFifthAttempt"> |
| 135 | + <argument name="productName" value="$$createSimpleProduct.name$$"/> |
| 136 | + <argument name="productSku" value="$$createSimpleProduct.sku$$"/> |
| 137 | + <argument name="productRequestPath" value="/$simpleSubCategory1.custom_attributes[url_key]$new/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 138 | + </actionGroup> |
| 139 | + <actionGroup ref="AssertStorefrontProductRedirectActionGroup" stepKey="verifyProductInStoreFrontPageSixthAttempt"> |
| 140 | + <argument name="productName" value="$$createSimpleProduct.name$$"/> |
| 141 | + <argument name="productSku" value="$$createSimpleProduct.sku$$"/> |
| 142 | + <argument name="productRequestPath" value="/$simpleSubCategory1.custom_attributes[url_key]$new/$simpleSubCategory2.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 143 | + </actionGroup> |
| 144 | + <actionGroup ref="AssertStorefrontProductRedirectActionGroup" stepKey="verifyProductInStoreFrontPageSeventhAttempt"> |
| 145 | + <argument name="productName" value="$$createSimpleProduct.name$$"/> |
| 146 | + <argument name="productSku" value="$$createSimpleProduct.sku$$"/> |
| 147 | + <argument name="productRequestPath" value="/$simpleSubCategory1.custom_attributes[url_key]$new/$simpleSubCategory2.custom_attributes[url_key]$/$simpleSubCategory3.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 148 | + </actionGroup> |
112 | 149 | </test>
|
113 | 150 | </tests>
|
0 commit comments