|
64 | 64 | <argument name="Store" value="customStoreENNotUnique.name"/>
|
65 | 65 | <argument name="CatName" value="$$createCategory.name$$"/>
|
66 | 66 | </actionGroup>
|
67 |
| - <uncheckOption selector="{{AdminCategoryBasicFieldSection.categoryNameUseDefault}}" stepKey="uncheckUseDefaultValueENStoreView"/> |
68 |
| - <fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="category-english" stepKey="changeNameField"/> |
69 |
| - <click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="clickOnSectionHeader"/> |
| 67 | + <actionGroup ref="AdminChangeCategoryNameOnStoreViewLevelActionGroup" stepKey="changeCategoryNameForENStoreView"> |
| 68 | + <argument name="categoryName" value="categoryenglish"/> |
| 69 | + </actionGroup> |
70 | 70 | <actionGroup ref="ChangeSeoUrlKeyForSubCategoryActionGroup" stepKey="changeSeoUrlKeyENStoreView">
|
71 | 71 | <argument name="value" value="category-english"/>
|
72 | 72 | </actionGroup>
|
73 | 73 | <actionGroup ref="SwitchCategoryStoreViewActionGroup" stepKey="switchToStoreViewNl">
|
74 | 74 | <argument name="Store" value="customStoreNLNotUnique.name"/>
|
75 | 75 | <argument name="CatName" value="$$createCategory.name$$"/>
|
76 | 76 | </actionGroup>
|
77 |
| - <uncheckOption selector="{{AdminCategoryBasicFieldSection.categoryNameUseDefault}}" stepKey="uncheckUseDefaultValue1"/> |
78 |
| - <fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="category-dutch" stepKey="changeNameFieldNLStoreView"/> |
79 |
| - <click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="clickOnSectionHeader2"/> |
| 77 | + <actionGroup ref="AdminChangeCategoryNameOnStoreViewLevelActionGroup" stepKey="changeCategoryNameForNLStoreView"> |
| 78 | + <argument name="categoryName" value="categorydutch"/> |
| 79 | + </actionGroup> |
80 | 80 | <actionGroup ref="ChangeSeoUrlKeyForSubCategoryActionGroup" stepKey="changeSeoUrlKeyNLStoreView">
|
81 | 81 | <argument name="value" value="category-dutch"/>
|
82 | 82 | </actionGroup>
|
83 |
| - <amOnPage url="{{AdminImportIndexPage.url}}" stepKey="navigateToSystemImport"/> |
84 |
| - <selectOption selector="{{AdminImportMainSection.entityType}}" userInput="Products" stepKey="selectProductsOption"/> |
85 |
| - <waitForElementVisible selector="{{AdminImportMainSection.importBehavior}}" stepKey="waitForImportBehaviorElementVisible"/> |
86 |
| - <selectOption selector="{{AdminImportMainSection.importBehavior}}" userInput="Add/Update" stepKey="selectAddUpdateOption"/> |
87 |
| - <attachFile selector="{{AdminImportMainSection.selectFileToImport}}" userInput="import_updated.csv" stepKey="attachFileForImport"/> |
88 |
| - <click selector="{{AdminImportHeaderSection.checkDataButton}}" stepKey="clickCheckDataButton"/> |
89 |
| - <see selector="{{AdminImportValidationMessagesSection.notice}}" userInput="Checked rows: 3, checked entities: 1, invalid rows: 0, total errors: 0" stepKey="assertNotice"/> |
90 |
| - <see selector="{{AdminImportValidationMessagesSection.success}}" userInput="File is valid! To start import process press "Import" button" stepKey="assertSuccessMessage"/> |
91 |
| - <click selector="{{AdminImportMainSection.importButton}}" stepKey="clickImportButton"/> |
92 |
| - <see selector="{{AdminImportValidationMessagesSection.success}}" userInput="Import successfully done" stepKey="assertSuccessMessage1"/> |
93 |
| - <see selector="{{AdminImportValidationMessagesSection.notice}}" userInput="Created: 1, Updated: 0, Deleted: 0" stepKey="assertNotice1"/> |
94 |
| - <actionGroup ref="SearchForProductOnBackendByNameActionGroup" stepKey="searchForProductOnBackend"> |
95 |
| - <argument name="productName" value="productformagetwo68980"/> |
96 |
| - </actionGroup> |
97 |
| - <click selector="{{AdminProductGridSection.productRowBySku('productformagetwo68980')}}" stepKey="clickOnProductRow"/> |
| 83 | + |
| 84 | + <!-- Import products with add/update behavior --> |
| 85 | + <actionGroup ref="AdminImportProductsWithCheckValidationResultActionGroup" stepKey="importProduct"> |
| 86 | + <argument name="behavior" value="Add/Update"/> |
| 87 | + <argument name="importFile" value="import_updated.csv"/> |
| 88 | + <argument name="importNoticeMessage" value="Created: 1, Updated: 0, Deleted: 0"/> |
| 89 | + <argument name="validationNoticeMessage" value="Checked rows: 3, checked entities: 1, invalid rows: 0, total errors: 0"/> |
| 90 | + </actionGroup> |
| 91 | + |
| 92 | + <!--Filter Product in product page and get the Product ID --> |
| 93 | + <actionGroup ref="FilterAndSelectProductActionGroup" stepKey="filterProduct"> |
| 94 | + <argument name="productSku" value="productformagetwo68980"/> |
| 95 | + </actionGroup> |
98 | 96 | <grabFromCurrentUrl regex="~/id/(\d+)/~" stepKey="grabProductIdFromUrl"/>
|
99 |
| - <amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="goToUrlRewritesIndexPage"/> |
100 | 97 |
|
101 |
| - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters"/> |
102 |
| - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="category-english.html" stepKey="inputCategoryUrlForENStoreView"/> |
103 |
| - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters"/> |
104 |
| - <waitForPageLoad stepKey="waitForPageToLoad"/> |
105 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-english.html')}}" stepKey="seeUrlInRequestPathColumn"/> |
106 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/category/view/id/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn"/> |
| 98 | + <!-- Open Marketing - SEO & Search - URL Rewrites --> |
| 99 | + <actionGroup ref="AdminSearchUrlRewriteByRequestPathActionGroup" stepKey="searchingCategoryUrlRewriteForENStoreView"> |
| 100 | + <argument name="requestPath" value="category-english.html"/> |
| 101 | + </actionGroup> |
| 102 | + <actionGroup ref="AssertAdminRequestPathInUrlRewriteGrigActionGroup" stepKey="seeUrlInRequestPathColumnForENStoreView"> |
| 103 | + <argument name="requestPath" value="category-english.html"/> |
| 104 | + </actionGroup> |
| 105 | + <actionGroup ref="AssertAdminTargetPathInUrlRewriteGrigActionGroup" stepKey="seeUrlInTargetPathColumnForENStoreView"> |
| 106 | + <argument name="targetPath" value="catalog/category/view/id/$$createCategory.id$$"/> |
| 107 | + </actionGroup> |
107 | 108 |
|
108 |
| - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters1"/> |
109 |
| - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="category-dutch.html" stepKey="inputCategoryUrlForNLStoreView"/> |
110 |
| - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters1"/> |
111 |
| - <waitForPageLoad stepKey="waitForPageToLoad1"/> |
112 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-dutch.html')}}" stepKey="seeUrlInRequestPathColumn1"/> |
113 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/category/view/id/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn1"/> |
| 109 | + <actionGroup ref="AdminSearchUrlRewriteByRequestPathActionGroup" stepKey="searchingCategoryUrlRewriteForNLStoreView"> |
| 110 | + <argument name="requestPath" value="category-dutch.html"/> |
| 111 | + </actionGroup> |
| 112 | + <actionGroup ref="AssertAdminRequestPathInUrlRewriteGrigActionGroup" stepKey="seeUrlInRequestPathColumnForNLStoreView"> |
| 113 | + <argument name="requestPath" value="category-dutch.html"/> |
| 114 | + </actionGroup> |
| 115 | + <actionGroup ref="AssertAdminTargetPathInUrlRewriteGrigActionGroup" stepKey="seeUrlInTargetPathColumnForNLStoreView"> |
| 116 | + <argument name="targetPath" value="catalog/category/view/id/$$createCategory.id$$"/> |
| 117 | + </actionGroup> |
114 | 118 |
|
115 |
| - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters2"/> |
116 |
| - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="productformagetwo68980-english.html" stepKey="inputProductUrlForENStoreView"/> |
117 |
| - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters2"/> |
118 |
| - <waitForPageLoad stepKey="waitForPageToLoad2"/> |
119 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'productformagetwo68980-english.html')}}" stepKey="seeUrlInRequestPathColumn2"/> |
120 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', 'catalog/product/view/id/$grabProductIdFromUrl')}}" stepKey="seeUrlInTargetPathColumn2"/> |
121 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-english/productformagetwo68980-english.html')}}" stepKey="seeUrlInRequestPathColumn4"/> |
122 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/product/view/id/$grabProductIdFromUrl/category/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn4"/> |
| 119 | + <actionGroup ref="AdminSearchUrlRewriteByRequestPathActionGroup" stepKey="searchingProductUrl"> |
| 120 | + <argument name="requestPath" value="productformagetwo68980-english.html"/> |
| 121 | + </actionGroup> |
| 122 | + <actionGroup ref="AssertAdminRequestPathInUrlRewriteGrigActionGroup" stepKey="seeRequestPathForProduct"> |
| 123 | + <argument name="requestPath" value="productformagetwo68980-english.html"/> |
| 124 | + </actionGroup> |
| 125 | + <actionGroup ref="AssertAdminTargetPathInUrlRewriteGrigActionGroup" stepKey="seeTargetPathForProduct"> |
| 126 | + <argument name="targetPath" value="catalog/product/view/id/$grabProductIdFromUrl"/> |
| 127 | + </actionGroup> |
| 128 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeRequestPathForENStoreView"> |
| 129 | + <argument name="requestPath" value="category-english/productformagetwo68980-english.html"/> |
| 130 | + </actionGroup> |
| 131 | + <actionGroup ref="AssertAdminTargetPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeTargetPathForENStoreView"> |
| 132 | + <argument name="targetPath" value="catalog/product/view/id/$grabProductIdFromUrl/category/$$createCategory.id$$"/> |
| 133 | + </actionGroup> |
123 | 134 |
|
124 |
| - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters3"/> |
125 |
| - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="productformagetwo68980-dutch.html" stepKey="inputProductUrlForENStoreView1"/> |
126 |
| - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters3"/> |
127 |
| - <waitForPageLoad stepKey="waitForPageToLoad3"/> |
128 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'productformagetwo68980-dutch.html')}}" stepKey="seeUrlInRequestPathColumn3"/> |
129 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', 'catalog/product/view/id/$grabProductIdFromUrl')}}" stepKey="seeUrlInTargetPathColumn3"/> |
130 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-dutch/productformagetwo68980-dutch.html')}}" stepKey="seeUrlInRequestPathColumn5"/> |
131 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/product/view/id/$grabProductIdFromUrl/category/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn5"/> |
| 135 | + <actionGroup ref="AdminSearchUrlRewriteByRequestPathActionGroup" stepKey="searchingProductUrlForNLStoreView"> |
| 136 | + <argument name="requestPath" value="productformagetwo68980-dutch.html"/> |
| 137 | + </actionGroup> |
| 138 | + <actionGroup ref="AssertAdminRequestPathInUrlRewriteGrigActionGroup" stepKey="seeRequestPathForProductForNLStoreView"> |
| 139 | + <argument name="requestPath" value="productformagetwo68980-dutch.html"/> |
| 140 | + </actionGroup> |
| 141 | + <actionGroup ref="AssertAdminTargetPathInUrlRewriteGrigActionGroup" stepKey="seeTargetPathForProductForNLStoreView"> |
| 142 | + <argument name="targetPath" value="catalog/product/view/id/$grabProductIdFromUrl"/> |
| 143 | + </actionGroup> |
| 144 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeRequestPathForNLStoreView"> |
| 145 | + <argument name="requestPath" value="category-dutch/productformagetwo68980-dutch.html"/> |
| 146 | + </actionGroup> |
| 147 | + <actionGroup ref="AssertAdminTargetPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="doNotSeeTargetPathForNLStoreView"> |
| 148 | + <argument name="targetPath" value="catalog/product/view/id/$grabProductIdFromUrl/category/$$createCategory.id$$"/> |
| 149 | + </actionGroup> |
132 | 150 |
|
133 | 151 | <!-- Switch StoreView -->
|
134 |
| - <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnProduct4Page"/> |
| 152 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnStoreFrontHomePage"/> |
135 | 153 | <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchToCustomStoreView">
|
136 | 154 | <argument name="storeView" value="customStoreENNotUnique"/>
|
137 | 155 | </actionGroup>
|
138 | 156 |
|
139 |
| - <amOnPage url="/productformagetwo68980-english.html" stepKey="navigateToProductPage"/> |
140 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="productformagetwo68980-english" stepKey="seeProductName"/> |
141 |
| - <amOnPage url="/category-english/productformagetwo68980-english.html" stepKey="navigateToProductPage2"/> |
142 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="productformagetwo68980-english" stepKey="seeProductName2"/> |
| 157 | + <!-- Assert Redirects work and Product is present on StoreFront--> |
| 158 | + <actionGroup ref="AssertStorefrontProductRedirectActionGroup" stepKey="verifyProductInStoreFrontPage"> |
| 159 | + <argument name="productName" value="productformagetwo68980-english"/> |
| 160 | + <argument name="productSku" value="productformagetwo68980"/> |
| 161 | + <argument name="productRequestPath" value="/productformagetwo68980-english.html"/> |
| 162 | + </actionGroup> |
| 163 | + <actionGroup ref="AssertStorefrontProductRedirectActionGroup" stepKey="verifyProductInStoreFrontPageSecondAttempt"> |
| 164 | + <argument name="productName" value="productformagetwo68980-english"/> |
| 165 | + <argument name="productSku" value="productformagetwo68980"/> |
| 166 | + <argument name="productRequestPath" value="/category-english/productformagetwo68980-english.html"/> |
| 167 | + </actionGroup> |
143 | 168 |
|
144 | 169 | <!-- Switch StoreView -->
|
145 |
| - <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnProduct4Page2"/> |
| 170 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="backToHomePage"/> |
146 | 171 | <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchToCustomStoreView2">
|
147 | 172 | <argument name="storeView" value="customStoreNLNotUnique"/>
|
148 | 173 | </actionGroup>
|
149 | 174 |
|
150 |
| - <amOnPage url="/productformagetwo68980-dutch.html" stepKey="navigateToProductPage3"/> |
151 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="productformagetwo68980-dutch" stepKey="seeProductName3"/> |
152 |
| - <amOnPage url="/category-dutch/productformagetwo68980-dutch.html" stepKey="navigateToProductPage4"/> |
153 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="productformagetwo68980-dutch" stepKey="seeProductName4"/> |
| 175 | + <!-- Assert Redirects work and Product is present on StoreFront--> |
| 176 | + <actionGroup ref="AssertStorefrontProductRedirectActionGroup" stepKey="verifyProductInStoreFrontPageThirdAttempt"> |
| 177 | + <argument name="productName" value="productformagetwo68980-dutch"/> |
| 178 | + <argument name="productSku" value="productformagetwo68980"/> |
| 179 | + <argument name="productRequestPath" value="/productformagetwo68980-dutch.html"/> |
| 180 | + </actionGroup> |
| 181 | + <actionGroup ref="AssertStorefrontProductRedirectActionGroup" stepKey="verifyProductInStoreFrontPageFourthAttempt"> |
| 182 | + <argument name="productName" value="productformagetwo68980-dutch"/> |
| 183 | + <argument name="productSku" value="productformagetwo68980"/> |
| 184 | + <argument name="productRequestPath" value="/category-dutch/productformagetwo68980-dutch.html"/> |
| 185 | + </actionGroup> |
154 | 186 | </test>
|
155 | 187 | </tests>
|
0 commit comments