|
15 | 15 | <description value="Customer should not be able to add a Bundle Product to the cart when added a special price for associated products"/>
|
16 | 16 | <severity value="MAJOR"/>
|
17 | 17 | <testCaseId value="MC-19134"/>
|
| 18 | + <useCaseId value="MC-18963"/> |
18 | 19 | <group value="bundle"/>
|
19 | 20 | </annotations>
|
20 | 21 | <before>
|
21 | 22 | <createData entity="_defaultCategory" stepKey="category"/>
|
22 |
| - <!-- Create simple product and add special price --> |
| 23 | + <!-- Create simple product --> |
23 | 24 | <createData entity="SimpleProductWithSpecialPrice" stepKey="simpleProduct">
|
24 | 25 | <requiredEntity createDataKey="category"/>
|
25 | 26 | </createData>
|
| 27 | + <!-- Create the bundle product --> |
| 28 | + <createData entity="ApiBundleProduct" stepKey="bundleProduct"/> |
| 29 | + <createData entity="RadioButtonsOption" stepKey="bundleOption"> |
| 30 | + <requiredEntity createDataKey="bundleProduct"/> |
| 31 | + <field key="required">true</field> |
| 32 | + </createData> |
| 33 | + <createData entity="ApiBundleLink" stepKey="linkOptionToProduct"> |
| 34 | + <requiredEntity createDataKey="bundleProduct"/> |
| 35 | + <requiredEntity createDataKey="bundleOption"/> |
| 36 | + <requiredEntity createDataKey="simpleProduct"/> |
| 37 | + </createData> |
| 38 | + <!-- Add special price to simple product --> |
26 | 39 | <actionGroup ref="LoginAsAdmin" stepKey="login"/>
|
27 | 40 | <amOnPage url="{{AdminProductEditPage.url($simpleProduct.id$)}}" stepKey="goToAdminProductPage"/>
|
28 | 41 | <actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPrice">
|
|
31 | 44 | <actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/>
|
32 | 45 | </before>
|
33 | 46 | <after>
|
| 47 | + <deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/> |
34 | 48 | <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/>
|
35 | 49 | <deleteData createDataKey="category" stepKey="deleteCategory"/>
|
36 |
| - <!-- Delete the bundled product --> |
37 |
| - <actionGroup stepKey="deleteBundle" ref="deleteProductUsingProductGrid"> |
38 |
| - <argument name="product" value="BundleProduct"/> |
39 |
| - </actionGroup> |
40 |
| - <actionGroup ref="AdminClearFiltersActionGroup" stepKey="ClearFiltersAfter"/> |
41 | 50 | <actionGroup ref="logout" stepKey="logout"/>
|
42 | 51 | </after>
|
43 |
| - <!--Go to bundle product creation page--> |
44 |
| - <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/> |
45 |
| - <actionGroup ref="fillMainBundleProductForm" stepKey="fillMainFieldsForBundle"/> |
46 |
| - <!-- Add Option, a "Radio Buttons" type option --> |
47 |
| - <actionGroup ref="addBundleOptionWithOneProduct" stepKey="addBundleOptions"> |
48 |
| - <argument name="x" value="0"/> |
49 |
| - <argument name="n" value="1"/> |
50 |
| - <argument name="prodOneSku" value="$$simpleProduct.sku$$"/> |
51 |
| - <argument name="prodTwoSku" value=""/> |
52 |
| - <argument name="optionTitle" value="Option"/> |
53 |
| - <argument name="inputType" value="radio"/> |
54 |
| - </actionGroup> |
55 |
| - <checkOption selector="{{AdminProductFormBundleSection.userDefinedQuantity('0', '0')}}" stepKey="userDefinedQuantitiyOptionProduct"/> |
56 |
| - <actionGroup ref="saveProductForm" stepKey="saveBundleProduct"/> |
57 | 52 | <!-- Go to storefront BundleProduct -->
|
58 |
| - <amOnPage url="{{BundleProduct.sku}}.html" stepKey="goToStorefront"/> |
| 53 | + <amOnPage url="{{StorefrontProductPage.url($$bundleProduct.custom_attributes[url_key]$$)}}" stepKey="goToStorefront"/> |
59 | 54 | <actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addProductToCartFirstTime">
|
60 |
| - <argument name="productName" value="{{BundleProduct.name}}"/> |
| 55 | + <argument name="productName" value="$$bundleProduct.name$$"/> |
61 | 56 | </actionGroup>
|
62 | 57 | <actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addProductToCartSecondTime">
|
63 |
| - <argument name="productName" value="{{BundleProduct.name}}"/> |
| 58 | + <argument name="productName" value="$$bundleProduct.name$$"/> |
| 59 | + </actionGroup> |
| 60 | + <actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart"/> |
| 61 | + <actionGroup ref="AssertStorefrontMiniCartSubtotalActionGroup" stepKey="assertSubtotal"> |
| 62 | + <argument name="subtotal" value="$180"/> |
64 | 63 | </actionGroup>
|
65 |
| - <click stepKey="openMiniCart" selector="{{StorefrontMinicartSection.showCart}}"/> |
66 |
| - <waitForPageLoad stepKey="waitForMiniCart"/> |
67 |
| - <see stepKey="seeCartSubtotal" userInput="$180.00"/> |
68 | 64 | </test>
|
69 | 65 | </tests>
|
0 commit comments