|
| 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="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="StorefrontWishlistConfigureProductQtyTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Wishlist"/> |
| 14 | + <stories value="The qty should get updated in the wishlist product detail page as per the wishlist page."/> |
| 15 | + <title value="The qty in the wishlist product detail page should get updated as per the wishlist item on the wishlist page."/> |
| 16 | + <description value="The qty in the wishlist product detail page should get updated as per the wishlist item on the wishlist page."/> |
| 17 | + <testCaseId value="AC-2555"/> |
| 18 | + <useCaseId value="ACP2E-459"/> |
| 19 | + <severity value="AVERAGE"/> |
| 20 | + <group value="wishlist"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <createData entity="SimpleProduct2" stepKey="createProduct"/> |
| 24 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 25 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> |
| 26 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 27 | + </actionGroup> |
| 28 | + </before> |
| 29 | + <after> |
| 30 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutStorefront"/> |
| 31 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 32 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 33 | + </after> |
| 34 | + <!-- See the product page main section --> |
| 35 | + <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="amOnProductPage"/> |
| 36 | + |
| 37 | + <!-- Add product to wishlist --> |
| 38 | + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addProductToWishlist"> |
| 39 | + <argument name="productVar" value="$$createProduct$$"/> |
| 40 | + </actionGroup> |
| 41 | + |
| 42 | + <!-- Check if product available in wishlist --> |
| 43 | + <actionGroup ref="StorefrontCustomerCheckProductInWishlistActionGroup" stepKey="checkProductInWishlist"> |
| 44 | + <argument name="productVar" value="$$createProduct$$"/> |
| 45 | + </actionGroup> |
| 46 | + |
| 47 | + <!-- Edit wishlist product --> |
| 48 | + <actionGroup ref="StorefrontCustomerUpdateWishlistItemActionGroup" stepKey="clickEditWishlistItem"> |
| 49 | + <argument name="productName" value="$$createProduct.name$$"/> |
| 50 | + </actionGroup> |
| 51 | + |
| 52 | + <!-- Fill updated quantity to product info main section --> |
| 53 | + <fillField selector="{{StorefrontProductInfoMainSection.qty}}" userInput="1000" stepKey="fillQuantity"/> |
| 54 | + |
| 55 | + <!-- Update wishlist with new quantity --> |
| 56 | + <click selector="{{StorefrontProductInfoMainSection.productAddToWishlist}}" stepKey="clickUpdateWishlist"/> |
| 57 | + |
| 58 | + <!-- Click edit wishlist product link again to redirect product info main section --> |
| 59 | + <actionGroup ref="StorefrontCustomerUpdateWishlistItemActionGroup" stepKey="clickEditWishlistItemAgain"> |
| 60 | + <argument name="productName" value="$$createProduct.name$$"/> |
| 61 | + </actionGroup> |
| 62 | + |
| 63 | + <!-- Verify that product info main section contains the updated quantity. --> |
| 64 | + <seeInField userInput="1000" selector="{{StorefrontProductInfoMainSection.qty}}" stepKey="seeUpdatedQuantity"/> |
| 65 | + </test> |
| 66 | +</tests> |
0 commit comments