|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> |
| 11 | + <test name="NoErrorCartCheckoutForProductsDeletedFromMiniCartTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Checkout"/> |
| 14 | + <stories value="Delete product from Storefront checkout"/> |
| 15 | + <title value="Delete product from Checkout"/> |
| 16 | + <description value="No error from cart should be thrown for product deleted from minicart"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MAGETWO-91451"/> |
| 19 | + <group value="checkout"/> |
| 20 | + </annotations> |
| 21 | + <!-- Preconditions --> |
| 22 | + <before> |
| 23 | + <!-- Simple product is created with price = 100 --> |
| 24 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 25 | + <createData entity="_defaultProduct" stepKey="createSimpleProduct"> |
| 26 | + <field key="price">100.00</field> |
| 27 | + <requiredEntity createDataKey="createCategory"/> |
| 28 | + </createData> |
| 29 | + </before> |
| 30 | + <after> |
| 31 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 32 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 33 | + </after> |
| 34 | + <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onStorefrontCategoryPage"/> |
| 35 | + <waitForPageLoad stepKey="waitForPageLoad1"/> |
| 36 | + <moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/> |
| 37 | + <click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addProductToCart"/> |
| 38 | + <waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded"/> |
| 39 | + <see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$createSimpleProduct.name$$ to your shopping cart." stepKey="seeAddedToCartMessage"/> |
| 40 | + <see selector="{{StorefrontMinicartSection.quantity}}" userInput="1" stepKey="seeCartQuantity"/> |
| 41 | + <!-- open the minicart --> |
| 42 | + <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickShowMinicart1"/> |
| 43 | + <click selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="editProductFromMiniCart"/> |
| 44 | + <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickShowMinicart2"/> |
| 45 | + <click selector="{{StorefrontMinicartSection.deleteMiniCartItem}}" stepKey="deleteMiniCartItem"/> |
| 46 | + <waitForElementVisible selector="{{StoreFrontRemoveItemModalSection.message}}" stepKey="waitFortheConfirmationModal"/> |
| 47 | + <see selector="{{StoreFrontRemoveItemModalSection.message}}" userInput="Are you sure you would like to remove this item from the shopping cart?" stepKey="seeDeleteConfirmationMessage"/> |
| 48 | + <click selector="{{StoreFrontRemoveItemModalSection.ok}}" stepKey="confirmDelete"/> |
| 49 | + <waitForPageLoad stepKey="waitForDeleteToFinish"/> |
| 50 | + <click selector="{{CheckoutCartProductSection.RemoveItem}}" stepKey="deleteProductFromCheckoutCart"/> |
| 51 | + <waitForPageLoad stepKey="WaitForPageLoad3"/> |
| 52 | + <see userInput="You have no items in your shopping cart." stepKey="seeNoItemsInShoppingCart"/> |
| 53 | + </test> |
| 54 | +</tests> |
0 commit comments