|
35 | 35 | <arguments>
|
36 | 36 | <argument name="product" defaultValue="_defaultProduct"/>
|
37 | 37 | </arguments>
|
| 38 | + <scrollToTopOfPage stepKey="scrollToTopOfPage"/> |
38 | 39 | <fillField selector="{{AdminProductFormSection.productName}}" userInput="{{product.name}}" stepKey="fillProductName"/>
|
39 | 40 | <fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{product.sku}}" stepKey="fillProductSku"/>
|
40 | 41 | <fillField selector="{{AdminProductFormSection.productPrice}}" userInput="{{product.price}}" stepKey="fillProductPrice"/>
|
|
283 | 284 | </arguments>
|
284 | 285 | <amOnPage url="{{AdminProductEditPage.url(productId)}}" stepKey="goToProduct"/>
|
285 | 286 | </actionGroup>
|
| 287 | + |
| 288 | + <!-- This action group simply navigates to the product catalog page --> |
| 289 | + <actionGroup name="AdminGoToProductCatalogPage"> |
| 290 | + <comment userInput="actionGroup:GoToProductCatalogPage" stepKey="actionGroupComment"/> |
| 291 | + <amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="goToCatalogProductPage"/> |
| 292 | + <waitForPageLoad stepKey="WaitForPageToLoad"/> |
| 293 | + </actionGroup> |
| 294 | + |
| 295 | + <!-- You are on product Edit Page --> |
| 296 | + <!-- Assert checkbox available for website in Product In Websites --> |
| 297 | + <actionGroup name="AdminAssertWebsiteIsAvailableInProductWebsites"> |
| 298 | + <arguments> |
| 299 | + <argument name="website" type="string"/> |
| 300 | + </arguments> |
| 301 | + <scrollTo selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="scrollToProductInWebsitesSection"/> |
| 302 | + <conditionalClick selector="{{ProductInWebsitesSection.sectionHeader}}" dependentSelector="{{ProductInWebsitesSection.sectionHeaderOpened}}" visible="false" stepKey="expandProductWebsitesSection"/> |
| 303 | + <seeElement selector="{{ProductInWebsitesSection.website(website)}}" stepKey="seeCheckboxForWebsite"/> |
| 304 | + </actionGroup> |
| 305 | + |
| 306 | + <!-- You are on product Edit Page --> |
| 307 | + <!-- Assert checkbox not available for website in Product In Websites --> |
| 308 | + <actionGroup name="AdminAssertWebsiteIsNotAvailableInProductWebsites" extends="AdminAssertWebsiteIsAvailableInProductWebsites"> |
| 309 | + <remove keyForRemoval="seeCheckboxForWebsite"/> |
| 310 | + <dontSeeElement selector="{{ProductInWebsitesSection.website(website)}}" after="expandProductWebsitesSection" stepKey="dontSeeCheckboxForWebsite"/> |
| 311 | + </actionGroup> |
| 312 | + |
| 313 | + <!-- You are on product Edit Page --> |
| 314 | + <!-- Assert checkbox Is checked for website in Product In Websites --> |
| 315 | + <actionGroup name="AdminAssertProductIsAssignedToWebsite" extends="AdminAssertWebsiteIsAvailableInProductWebsites"> |
| 316 | + <remove keyForRemoval="seeCheckboxForWebsite"/> |
| 317 | + <seeCheckboxIsChecked selector="{{ProductInWebsitesSection.website(website)}}" after="expandProductWebsitesSection" stepKey="seeCustomWebsiteIsChecked"/> |
| 318 | + </actionGroup> |
286 | 319 | </actionGroups>
|
0 commit comments