|
7 | 7 | -->
|
8 | 8 |
|
9 | 9 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
10 |
| - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
11 |
| - <test name="UpdateShoppingCartTestVariation1"> |
12 |
| - <annotations> |
13 |
| - <features value="Checkout"/> |
14 |
| - <title value="Check updating shopping cart while updating items qty"/> |
15 |
| - <description value="Check updating shopping cart while updating items qty"/> |
16 |
| - <group value="shoppingCart"/> |
17 |
| - <group value="mtf_migrated"/> |
18 |
| - </annotations> |
19 |
| - <before> |
20 |
| - <createData entity="_defaultCategory" stepKey="createCategory"/> |
21 |
| - <createData entity="SimpleProduct" stepKey="createProduct"> |
22 |
| - <requiredEntity createDataKey="createCategory"/> |
23 |
| - <field key="price">100</field> |
24 |
| - </createData> |
25 |
| - |
26 |
| - <!-- Add the newly created product to the shopping cart --> |
27 |
| - <amOnPage url="$$createProduct.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage"/> |
28 |
| - <waitForPageLoad stepKey="waitForCatalogPageLoad1"/> |
29 |
| - <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage1"> |
30 |
| - <argument name="productName" value="$$createProduct.name$$"/> |
31 |
| - </actionGroup> |
32 |
| - </before> |
33 |
| - <after> |
34 |
| - <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
35 |
| - <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
36 |
| - </after> |
37 |
| - |
38 |
| - <!-- Go to the shopping cart --> |
39 |
| - <amOnPage url="{{CheckoutCartPage.url}}" stepKey="amOnPageShoppingCart"/> |
40 |
| - <waitForPageLoad stepKey="waitForCheckoutPageLoad1"/> |
41 |
| - |
42 |
| - <!-- Change the product QTY --> |
43 |
| - <fillField selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" userInput="3" stepKey="changeCartQty"/> |
44 |
| - <click selector="{{CheckoutCartProductSection.updateShoppingCartButton}}" stepKey="openShoppingCart"/> |
45 |
| - <waitForPageLoad stepKey="waitForCheckoutPageLoad2"/> |
46 |
| - |
47 |
| - <!-- The price and QTY values should be updated for the product --> |
48 |
| - <grabValueFrom selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" stepKey="grabProductQtyInCart"/> |
49 |
| - <see userInput="$300" selector="{{CheckoutCartProductSection.ProductSubtotalByName($$createProduct.name$$)}}" stepKey="assertProductPrice"/> |
50 |
| - <assertEquals expected="3" actual="$grabProductQtyInCart" stepKey="assertProductQtyInCart"/> |
51 |
| - |
52 |
| - <!-- Subtotal should be updated --> |
53 |
| - <see userInput="$300" selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="assertCartSubtotal"/> |
54 |
| - |
55 |
| - <!-- Minicart product price and subtotal should be updated --> |
56 |
| - <actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="openMinicart"/> |
57 |
| - <grabValueFrom selector="{{StorefrontMinicartSection.itemQuantity($$createProduct.name$$)}}" stepKey="grabProductQtyInMinicart"/> |
58 |
| - <assertEquals expected="3" actual="$grabProductQtyInMinicart" stepKey="assertProductQtyInMinicart"/> |
59 |
| - <see userInput="$300" selector="{{StorefrontMinicartSection.subtotal}}" stepKey="assertMinicartSubtotal"/> |
60 |
| - </test> |
61 |
| - <test name="UpdateShoppingCartTestVariation2"> |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="StorefrontUpdateShoppingCartSimpleWithCustomOptionsProductQtyTest"> |
62 | 12 | <annotations>
|
63 | 13 | <features value="Checkout"/>
|
64 | 14 | <title value="Check updating shopping cart while updating qty of items with custom options"/>
|
|
68 | 18 | </annotations>
|
69 | 19 | <before>
|
70 | 20 | <createData entity="_defaultCategory" stepKey="createCategory"/>
|
71 |
| - <createData entity="SimpleProduct" stepKey="createProduct"> |
| 21 | + <createData entity="ApiSimpleProductWithCustomPrice" stepKey="createProduct"> |
72 | 22 | <requiredEntity createDataKey="createCategory"/>
|
73 |
| - <field key="price">100</field> |
74 | 23 | </createData>
|
75 | 24 |
|
76 | 25 | <!-- Add two custom options to the product: field and textarea -->
|
77 |
| - <updateData createDataKey="createProduct" entity="productWithOptions3" stepKey="updateProductWithOption"/> |
| 26 | + <updateData createDataKey="createProduct" entity="ProductWithTextFieldAndAreaOptions" stepKey="updateProductWithOption"/> |
78 | 27 |
|
79 | 28 | <!-- Go to the product page, fill the custom options values and add the product to the shopping cart -->
|
80 | 29 | <amOnPage url="{{StorefrontHomePage.url}}$createProduct.custom_attributes[url_key]$.html" stepKey="amOnProductPage"/>
|
|
101 | 50 |
|
102 | 51 | <!-- The price and QTY values should be updated for the product -->
|
103 | 52 | <grabValueFrom selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" stepKey="grabProductQtyInCart"/>
|
104 |
| - <see userInput="$1,320.00" selector="{{CheckoutCartProductSection.ProductSubtotalByName($$createProduct.name$$)}}" stepKey="assertProductPrice"/> |
| 53 | + <see userInput="$1,320.00" selector="{{CheckoutCartProductSection.productSubtotalByName($$createProduct.name$$)}}" stepKey="assertProductPrice"/> |
105 | 54 | <assertEquals expected="11" actual="$grabProductQtyInCart" stepKey="assertProductQtyInCart"/>
|
106 | 55 | <see userInput="$1,320.00" selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="assertSubtotal"/>
|
107 | 56 |
|
|
0 commit comments