|
150 | 150 | <createData entity="_defaultProduct" stepKey="createPreReqProduct2">
|
151 | 151 | <requiredEntity createDataKey="createPreReqCategory"/>
|
152 | 152 | </createData>
|
| 153 | + <createData entity="_defaultProduct" stepKey="createPreReqProduct3"> |
| 154 | + <requiredEntity createDataKey="createPreReqCategory"/> |
| 155 | + </createData> |
| 156 | + <createData entity="_defaultProduct" stepKey="createPreReqProduct4"> |
| 157 | + <requiredEntity createDataKey="createPreReqCategory"/> |
| 158 | + </createData> |
153 | 159 | <actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
|
154 | 160 | <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
|
155 | 161 | </before>
|
156 | 162 | <after>
|
157 | 163 | <deleteData createDataKey="createPreReqProduct1" stepKey="deletePreReqProduct1"/>
|
158 | 164 | <deleteData createDataKey="createPreReqProduct2" stepKey="deletePreReqProduct2"/>
|
| 165 | + <deleteData createDataKey="createPreReqProduct3" stepKey="deletePreReqProduct3"/> |
| 166 | + <deleteData createDataKey="createPreReqProduct4" stepKey="deletePreReqProduct4"/> |
159 | 167 | <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/>
|
| 168 | + <closeTab stepKey="closeTab"/> |
160 | 169 | <actionGroup ref="logout" stepKey="logout"/>
|
161 | 170 | </after>
|
162 | 171 | <actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
|
|
168 | 177 | <actionGroup ref="dragContentTypeToStage" stepKey="dragProductsIntoStage">
|
169 | 178 | <argument name="contentType" value="PageBuilderProductsContentType"/>
|
170 | 179 | </actionGroup>
|
171 |
| - |
172 | 180 | <!-- Add both products from the created category -->
|
173 | 181 | <actionGroup ref="addCategoryConditionToProductsBlock" stepKey="addCategory">
|
174 | 182 | <argument name="page" value="ProductsContentTypeForm"/>
|
175 | 183 | <argument name="category" value="$$createPreReqCategory.id$$"/>
|
176 | 184 | </actionGroup>
|
177 |
| - |
178 |
| - <!-- Only one of them should be showing --> |
179 | 185 | <waitForElementVisible selector="{{ProductsContentTypeForm.productsCountInput}}" stepKey="waitForProductCountToBeVisible"/>
|
180 | 186 | <waitForLoadingMaskToDisappear stepKey="waitForConditionsToLoad"/>
|
181 |
| - <fillField selector="{{ProductsContentTypeForm.productsCountInput}}" userInput="1" stepKey="fillProductsCountField"/> |
182 |
| - |
| 187 | + <!-- Check form field validations --> |
| 188 | + <comment userInput="Check form field validations" stepKey="commentCheckFormFieldValidations"/> |
| 189 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterInvalidMinProductsCount"> |
| 190 | + <argument name="property" value="PageBuilderProductsInvalidMinCountProperty"/> |
| 191 | + </actionGroup> |
| 192 | + <actionGroup ref="saveEditPanelAndValidateFieldErrorGeneralSection" stepKey="validateInvalidMinCount"> |
| 193 | + <argument name="property" value="PageBuilderProductsInvalidMinCountProperty"/> |
| 194 | + </actionGroup> |
| 195 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterInvalidEmptyProductsCount"> |
| 196 | + <argument name="property" value="PageBuilderProductsInvalidEmptyCountProperty"/> |
| 197 | + </actionGroup> |
| 198 | + <actionGroup ref="saveEditPanelAndValidateFieldErrorGeneralSection" stepKey="validateInvalidEmptyCount"> |
| 199 | + <argument name="property" value="PageBuilderProductsInvalidEmptyCountProperty"/> |
| 200 | + </actionGroup> |
| 201 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterInvalidMaxProductsCount"> |
| 202 | + <argument name="property" value="PageBuilderProductsInvalidMaxCountProperty"/> |
| 203 | + </actionGroup> |
| 204 | + <actionGroup ref="saveEditPanelAndValidateFieldErrorGeneralSection" stepKey="validateInvalidMaxCount"> |
| 205 | + <argument name="property" value="PageBuilderProductsInvalidMaxCountProperty"/> |
| 206 | + </actionGroup> |
| 207 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterInvalidTypeProductsCount"> |
| 208 | + <argument name="property" value="PageBuilderProductsInvalidTypeCountProperty"/> |
| 209 | + </actionGroup> |
| 210 | + <actionGroup ref="saveEditPanelAndValidateFieldErrorGeneralSection" stepKey="validateInvalidTypeProductsCount"> |
| 211 | + <argument name="property" value="PageBuilderProductsInvalidTypeCountProperty"/> |
| 212 | + </actionGroup> |
| 213 | + <!-- Validate 999 max is valid --> |
| 214 | + <comment userInput="Validate 999 max is valid" stepKey="commentValidateMax"/> |
| 215 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterMaxProductsCount"> |
| 216 | + <argument name="property" value="PageBuilderProductsCountPropertyMax"/> |
| 217 | + </actionGroup> |
| 218 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveValidationEditPanelSettings"/> |
| 219 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage"> |
| 220 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 221 | + </actionGroup> |
| 222 | + <!-- Only one of them should be showing --> |
| 223 | + <comment userInput="Set only one of them should be showing" stepKey="commentSetOnlyOneShouldBeShowing"/> |
| 224 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterOneProductsCount"> |
| 225 | + <argument name="property" value="PageBuilderProductsCountPropertyOne"/> |
| 226 | + </actionGroup> |
183 | 227 | <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
|
184 |
| - <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/> |
185 |
| - <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
186 |
| - <!-- Validate Stage After Save --> |
| 228 | + <!-- Validate Stage --> |
187 | 229 | <comment userInput="Validate Stage" stepKey="commentValidateStage"/>
|
188 | 230 | <actionGroup ref="validateProductCountInProducts" stepKey="validateProductsCountStage">
|
189 | 231 | <argument name="page" value="ProductsOnStage"/>
|
|
192 | 234 | <actionGroup ref="validateProductInProductsOnStage" stepKey="validateProductsStage">
|
193 | 235 | <argument name="page" value="ProductsOnStage"/>
|
194 | 236 | </actionGroup>
|
195 |
| - <actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront"> |
196 |
| - <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 237 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/> |
| 238 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 239 | + <!-- Validate Stage After Save --> |
| 240 | + <comment userInput="Validate Stage After Save" stepKey="commentValidateStageAfterSave"/> |
| 241 | + <actionGroup ref="validateProductCountInProducts" stepKey="validateProductsCountStageAfterSave"> |
| 242 | + <argument name="page" value="ProductsOnStage"/> |
| 243 | + <argument name="count" value="1"/> |
| 244 | + </actionGroup> |
| 245 | + <actionGroup ref="validateProductInProductsOnStage" stepKey="validateProductsStageAfterSave"> |
| 246 | + <argument name="page" value="ProductsOnStage"/> |
197 | 247 | </actionGroup>
|
198 | 248 | <!-- Validate Storefront -->
|
199 | 249 | <comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
|
| 250 | + <openNewTab stepKey="openNewTab"/> |
| 251 | + <actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront"> |
| 252 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 253 | + </actionGroup> |
200 | 254 | <actionGroup ref="validateProductCountInProducts" stepKey="validateProductCountStorefront">
|
201 | 255 | <argument name="page" value="ProductsOnStorefront"/>
|
202 | 256 | <argument name="count" value="1"/>
|
203 | 257 | </actionGroup>
|
204 | 258 | <actionGroup ref="validateProductInProducts" stepKey="validateProductsStorefront">
|
205 | 259 | <argument name="page" value="ProductsOnStorefront"/>
|
206 | 260 | </actionGroup>
|
| 261 | + <!-- Switch Back To Backend --> |
| 262 | + <comment userInput="Switch Back To Backend" stepKey="commentSwitchToBackend"/> |
| 263 | + <switchToNextTab stepKey="switchToNextTab"/> |
| 264 | + <reloadPage stepKey="reloadPage"/> |
| 265 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 266 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage3"/> |
| 267 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage2"> |
| 268 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 269 | + </actionGroup> |
| 270 | + <!-- Four products should be showing --> |
| 271 | + <comment userInput="Four products should be showing" stepKey="commentFourProductsShouldBeShowing"/> |
| 272 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterFourProductsCount"> |
| 273 | + <argument name="property" value="PageBuilderProductsCountPropertyFour"/> |
| 274 | + </actionGroup> |
| 275 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings2"/> |
| 276 | + <!-- Validate Stage --> |
| 277 | + <comment userInput="Validate Stage" stepKey="commentValidateStage2"/> |
| 278 | + <actionGroup ref="validateProductCountInProducts" stepKey="validateProductsCountStage2"> |
| 279 | + <argument name="page" value="ProductsOnStage"/> |
| 280 | + <argument name="count" value="4"/> |
| 281 | + </actionGroup> |
| 282 | + <actionGroup ref="validateProductInProductsOnStage" stepKey="validateProductsStage2"> |
| 283 | + <argument name="page" value="ProductsOnStage"/> |
| 284 | + </actionGroup> |
| 285 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage2"/> |
| 286 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/> |
| 287 | + <!-- Validate Stage After Save --> |
| 288 | + <comment userInput="Validate Stage" stepKey="commentValidateStage2AfterSave"/> |
| 289 | + <actionGroup ref="validateProductCountInProducts" stepKey="validateProductsCountStage2AfterSave"> |
| 290 | + <argument name="page" value="ProductsOnStage"/> |
| 291 | + <argument name="count" value="4"/> |
| 292 | + </actionGroup> |
| 293 | + <actionGroup ref="validateProductInProductsOnStage" stepKey="validateProductsStage2AfterSave"> |
| 294 | + <argument name="page" value="ProductsOnStage"/> |
| 295 | + </actionGroup> |
| 296 | + <actionGroup ref="ClearCacheActionGroup" stepKey="clearMagentoCache"/> |
| 297 | + <!-- Switch Back To Frontend --> |
| 298 | + <comment userInput="Switch Back To Frontend" stepKey="commentSwitchToFrontend"/> |
| 299 | + <switchToNextTab stepKey="switchToNextTab2"/> |
| 300 | + <reloadPage stepKey="reloadPage2"/> |
| 301 | + <waitForPageLoad stepKey="waitForPageLoad2"/> |
| 302 | + <!-- Validate Storefront --> |
| 303 | + <comment userInput="Validate Storefront" stepKey="commentValidateStorefront2"/> |
| 304 | + <actionGroup ref="validateProductCountInProducts" stepKey="validateProductCountStorefront2"> |
| 305 | + <argument name="page" value="ProductsOnStorefront"/> |
| 306 | + <argument name="count" value="4"/> |
| 307 | + </actionGroup> |
| 308 | + <actionGroup ref="validateProductInProducts" stepKey="validateProductsStorefront2"> |
| 309 | + <argument name="page" value="ProductsOnStorefront"/> |
| 310 | + </actionGroup> |
207 | 311 | </test>
|
208 | 312 | <test name="AdminPageBuilderProductsConfigurationIsPersistent">
|
209 | 313 | <annotations>
|
|
0 commit comments