|
37 | 37 | </after>
|
38 | 38 |
|
39 | 39 | <!--Go to bundle product creation page-->
|
40 |
| - <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage" /> |
41 |
| - <waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/> |
| 40 | + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage"> |
| 41 | + <argument name="attributeSetId" value="{{BundleProduct.set}}"/> |
| 42 | + <argument name="productType" value="{{BundleProduct.type}}"/> |
| 43 | + </actionGroup> |
| 44 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreatePageToLoad"/> |
42 | 45 |
|
43 | 46 | <!--Create bundle product-->
|
44 | 47 | <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
|
|
66 | 69 |
|
67 | 70 | <!--Save the product-->
|
68 | 71 | <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
|
69 |
| - <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/> |
| 72 | + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown"> |
| 73 | + <argument name="message" value="You saved the product."/> |
| 74 | + </actionGroup> |
70 | 75 |
|
71 | 76 | <!--Creating Second bundle product-->
|
72 | 77 | <!--Go to bundle product creation page-->
|
73 |
| - <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage2" /> |
74 |
| - <waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad2"/> |
| 78 | + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage2"> |
| 79 | + <argument name="attributeSetId" value="{{BundleProduct.set}}"/> |
| 80 | + <argument name="productType" value="{{BundleProduct.type}}"/> |
| 81 | + </actionGroup> |
| 82 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreatePageToLoad2"/> |
75 | 83 |
|
76 | 84 | <!--Create bundle product 2-->
|
77 | 85 | <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems2"/>
|
|
104 | 112 |
|
105 | 113 | <!--Save the product-->
|
106 | 114 | <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton2"/>
|
107 |
| - <see userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown2"/> |
| 115 | + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown2"> |
| 116 | + <argument name="message" value="You saved the product."/> |
| 117 | + </actionGroup> |
108 | 118 |
|
109 | 119 | <!--Mass delete bundle products-->
|
110 | 120 | <!--Clear Filters-->
|
|
117 | 127 | <actionGroup ref="AdminDeleteAllProductsFromGridActionGroup" stepKey="selectAndDeleteProducts"/>
|
118 | 128 |
|
119 | 129 | <!--Locating delete message-->
|
120 |
| - <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="deleteMessage"/> |
| 130 | + <!--<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="deleteMessage"/>--> |
| 131 | + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="deleteMessage"> |
| 132 | + <argument name="message" value="A total of 2 record(s) have been deleted."/> |
| 133 | + </actionGroup> |
121 | 134 |
|
122 | 135 | <!--Clear Cache - resets products according to enabled/disabled view-->
|
123 | 136 | <actionGroup ref="ClearPageCacheActionGroup" stepKey="ClearPageCaches"/>
|
124 | 137 |
|
125 | 138 | <!--Testing deletion of products-->
|
126 |
| - <amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="GoToProductPageAgain"/> |
127 |
| - <waitForPageLoad stepKey="WaitForProductPageToLoadToShowElement"/> |
128 |
| - <dontSeeElement stepKey="LookingForNameOfProduct" selector="{{StorefrontBundledSection.bundleProductName}}"/> |
129 |
| - <seeElement stepKey="LookingForPageNotFoundMessage" selector="{{StorefrontBundledSection.pageNotFound}}"/> |
130 |
| - <amOnPage url="{{BundleProduct.urlKey2}}.html" stepKey="GoToProductPageAgain2"/> |
131 |
| - <waitForPageLoad stepKey="WaitForProductPageToLoadToShowElement2"/> |
132 |
| - <dontSeeElement stepKey="LookingForNameOfProduct2" selector="{{StorefrontBundledSection.bundleProductName}}"/> |
133 |
| - <seeElement stepKey="LookingForPageNotFoundMessage2" selector="{{StorefrontBundledSection.pageNotFound}}"/> |
| 139 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPageAgain"> |
| 140 | + <argument name="productUrl" value="{{BundleProduct.urlKey}}"/> |
| 141 | + </actionGroup> |
| 142 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="WaitForProductPageToLoadToShowElement"/> |
| 143 | + <actionGroup ref="StorefrontAssertProductNameIsNotShownOnProductPageActionGroup" stepKey="LookingForNameOfProduct"> |
| 144 | + <argument name="productName" value="{{BundleProduct.name}}"/> |
| 145 | + </actionGroup> |
| 146 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LookingForPageNotFoundMessage"/> |
| 147 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPageAgain2"> |
| 148 | + <argument name="productUrl" value="{{BundleProduct.urlKey2}}"/> |
| 149 | + </actionGroup> |
| 150 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="WaitForProductPageToLoadToShowElement2"/> |
| 151 | + <actionGroup ref="StorefrontAssertProductNameIsNotShownOnProductPageActionGroup" stepKey="LookingForNameOfProduct2"> |
| 152 | + <argument name="productName" value="{{BundleProduct.name2}}"/> |
| 153 | + </actionGroup> |
| 154 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LookingForPageNotFoundMessage2"/> |
134 | 155 | </test>
|
135 | 156 | </tests>
|
0 commit comments