|
141 | 141 | <argument name="websiteName" value="$createWebsite.website[name]$"/>
|
142 | 142 | </actionGroup>
|
143 | 143 | </test>
|
| 144 | + <test name="AdminCreateAndEditBundleProductOptionsNegativeTest"> |
| 145 | + <annotations> |
| 146 | + <features value="Bundle"/> |
| 147 | + <stories value="Modify bundle product in Admin"/> |
| 148 | + <title value="Admin should be able to remove any bundle option a bundle product"/> |
| 149 | + <description value="Admin should be able to set/edit other product information when creating/editing a bundle product"/> |
| 150 | + <severity value="MAJOR"/> |
| 151 | + <testCaseId value="MC-224"/> |
| 152 | + <skip> |
| 153 | + <issueId value="https://github.com/magento/magento2/issues/25468"/> |
| 154 | + </skip> |
| 155 | + <group value="Catalog"/> |
| 156 | + </annotations> |
| 157 | + <before> |
| 158 | + <!-- Create a Website --> |
| 159 | + <createData entity="customWebsite" stepKey="createWebsite"/> |
| 160 | + |
| 161 | + <!-- Create first simple product for a bundle option --> |
| 162 | + <createData entity="SimpleProduct2" stepKey="createFirstSimpleProduct"/> |
| 163 | + |
| 164 | + <!-- Create second simple product for a bundle option --> |
| 165 | + <createData entity="SimpleProduct2" stepKey="createSecondSimpleProduct"/> |
| 166 | + |
| 167 | + <!-- Login as admin --> |
| 168 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 169 | + </before> |
| 170 | + <after> |
| 171 | + <!-- Delete the simple product --> |
| 172 | + <deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/> |
| 173 | + |
| 174 | + <!-- Delete the simple product --> |
| 175 | + <deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/> |
| 176 | + |
| 177 | + <!-- Delete a Website --> |
| 178 | + <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> |
| 179 | + <argument name="websiteName" value="Second Website"/> |
| 180 | + </actionGroup> |
| 181 | + |
| 182 | + <!-- Log out --> |
| 183 | + <actionGroup ref="logout" stepKey="logout"/> |
| 184 | + </after> |
| 185 | + |
| 186 | + <!-- Create new bundle product --> |
| 187 | + <actionGroup ref="GoToSpecifiedCreateProductPage" stepKey="createBundleProduct"> |
| 188 | + <argument name="productType" value="bundle"/> |
| 189 | + </actionGroup> |
| 190 | + |
| 191 | + <!-- Fill all main fields --> |
| 192 | + <actionGroup ref="fillMainBundleProductForm" stepKey="fillMainProductFields"/> |
| 193 | + |
| 194 | + <!-- Add first bundle option to the product --> |
| 195 | + <actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addFirstBundleOption"> |
| 196 | + <argument name="x" value="0"/> |
| 197 | + <argument name="n" value="1"/> |
| 198 | + <argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/> |
| 199 | + <argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/> |
| 200 | + <argument name="optionTitle" value="{{RadioButtonsOption.title}}"/> |
| 201 | + <argument name="inputType" value="{{RadioButtonsOption.type}}"/> |
| 202 | + </actionGroup> |
| 203 | + |
| 204 | + <!-- Add second bundle option to the product --> |
| 205 | + <actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addSecondBundleOption"> |
| 206 | + <argument name="x" value="1"/> |
| 207 | + <argument name="n" value="2"/> |
| 208 | + <argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/> |
| 209 | + <argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/> |
| 210 | + <argument name="optionTitle" value="{{CheckboxOption.title}}"/> |
| 211 | + <argument name="inputType" value="{{CheckboxOption.type}}"/> |
| 212 | + </actionGroup> |
| 213 | + |
| 214 | + <!-- Add third bundle option to the product --> |
| 215 | + <actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addThirdBundleOption"> |
| 216 | + <argument name="x" value="2"/> |
| 217 | + <argument name="n" value="3"/> |
| 218 | + <argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/> |
| 219 | + <argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/> |
| 220 | + <argument name="optionTitle" value="{{RadioButtonsOption.title}}"/> |
| 221 | + <argument name="inputType" value="{{RadioButtonsOption.type}}"/> |
| 222 | + </actionGroup> |
| 223 | + |
| 224 | + <!-- Set product in created Website --> |
| 225 | + <actionGroup ref="AdminAssignProductInWebsiteActionGroup" stepKey="selectProductInWebsites"> |
| 226 | + <argument name="website" value="$createWebsite.website[name]$"/> |
| 227 | + </actionGroup> |
| 228 | + |
| 229 | + <!-- Save product form --> |
| 230 | + <actionGroup ref="saveProductForm" stepKey="saveWithThreeOptions"/> |
| 231 | + |
| 232 | + <!-- Open created product --> |
| 233 | + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct"> |
| 234 | + <argument name="product" value="BundleProduct"/> |
| 235 | + </actionGroup> |
| 236 | + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct"> |
| 237 | + <argument name="product" value="BundleProduct"/> |
| 238 | + </actionGroup> |
| 239 | + |
| 240 | + <!-- Remove second option --> |
| 241 | + <actionGroup ref="deleteBundleOptionByIndex" stepKey="deleteSecondOption"> |
| 242 | + <argument name="deleteIndex" value="1"/> |
| 243 | + </actionGroup> |
| 244 | + |
| 245 | + <!-- Save product form --> |
| 246 | + <actionGroup ref="saveProductForm" stepKey="clickSaveProduct"/> |
| 247 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveWithTwoOptions"/> |
| 248 | + <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/> |
| 249 | + |
| 250 | + <!-- Delete created bundle product --> |
| 251 | + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteProduct"> |
| 252 | + <argument name="product" value="BundleProduct"/> |
| 253 | + </actionGroup> |
| 254 | + </test> |
144 | 255 | </tests>
|
145 | 256 |
|
0 commit comments