|
10 | 10 | <test name="StorefrontSpecialPriceBundleProductInCartTest"> |
11 | 11 | <annotations> |
12 | 12 | <features value="Bundle"/> |
13 | | - <stories value="Check that the cart total is correct when the bundle product with special price added to the cart"/> |
| 13 | + <stories value="Add bundle product to cart on storefront"/> |
14 | 14 | <title value="Customer should not be able to add a Bundle Product to the cart when added a special price for associated products"/> |
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"/> |
|
19 | 19 | <group value="bundle"/> |
20 | 20 | </annotations> |
21 | 21 | <before> |
22 | | - <createData entity="_defaultCategory" stepKey="category"/> |
23 | | - <!-- Create simple product --> |
24 | | - <createData entity="SimpleProductWithSpecialPrice" stepKey="simpleProduct"> |
25 | | - <requiredEntity createDataKey="category"/> |
| 22 | + <!-- Create the Simple product with Special price --> |
| 23 | + <createData entity="SimpleProduct2" stepKey="simpleProduct"/> |
| 24 | + <createData entity="specialProductPrice2" stepKey="specialPriceToSimpleProduct"> |
| 25 | + <requiredEntity createDataKey="simpleProduct"/> |
26 | 26 | </createData> |
27 | 27 | <!-- Create the bundle product --> |
28 | 28 | <createData entity="ApiBundleProduct" stepKey="bundleProduct"/> |
|
35 | 35 | <requiredEntity createDataKey="bundleOption"/> |
36 | 36 | <requiredEntity createDataKey="simpleProduct"/> |
37 | 37 | </createData> |
38 | | - <!-- Add special price to simple product --> |
39 | | - <actionGroup ref="LoginAsAdmin" stepKey="login"/> |
40 | | - <amOnPage url="{{AdminProductEditPage.url($simpleProduct.id$)}}" stepKey="goToAdminProductPage"/> |
41 | | - <actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPrice"> |
42 | | - <argument name="price" value="{{SimpleProductWithSpecialPrice.special_price}}"/> |
43 | | - </actionGroup> |
44 | | - <actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/> |
| 38 | + <!-- Run reindex stock status --> |
| 39 | + <magentoCLI command="indexer:reindex" arguments="cataloginventory_stock" stepKey="reindex"/> |
45 | 40 | </before> |
46 | 41 | <after> |
47 | 42 | <deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/> |
48 | 43 | <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> |
49 | | - <deleteData createDataKey="category" stepKey="deleteCategory"/> |
50 | | - <actionGroup ref="logout" stepKey="logout"/> |
51 | 44 | </after> |
52 | 45 | <!-- Go to storefront BundleProduct --> |
53 | 46 | <amOnPage url="{{StorefrontProductPage.url($$bundleProduct.custom_attributes[url_key]$$)}}" stepKey="goToStorefront"/> |
|
59 | 52 | </actionGroup> |
60 | 53 | <actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart"/> |
61 | 54 | <actionGroup ref="AssertStorefrontMiniCartSubtotalActionGroup" stepKey="assertSubtotal"> |
62 | | - <argument name="subtotal" value="$180"/> |
| 55 | + <argument name="subtotal" value="$111.10"/> |
63 | 56 | </actionGroup> |
64 | 57 | </test> |
65 | 58 | </tests> |
0 commit comments