|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 9 | + <test name="SpecialPriceCheckOnWishListPageTest"> |
| 10 | + <annotations> |
| 11 | + <features value="Checkout"/> |
| 12 | + <stories value="Check verify Special Price is the same as on the catalog page"/> |
| 13 | + <title value="'Special Price on Catalog' is shown correctly"/> |
| 14 | + <description value="Add Product to Wishlist and verify Special Price is the same as on the catalog page"/> |
| 15 | + <testCaseId value="MC-26860"/> |
| 16 | + <severity value="AVERAGE"/> |
| 17 | + <group value="Catalog"/> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + <!-- Create first simple product--> |
| 21 | + |
| 22 | + <createData entity="ApiSimplePrice100Qty100" stepKey="createFirstSimpleProduct"/> |
| 23 | + |
| 24 | + <!-- Create category --> |
| 25 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 26 | + <createData entity="AssignProductToCategory" stepKey="assignTestCategoryToTestProduct"> |
| 27 | + <requiredEntity createDataKey="createCategory"/> |
| 28 | + <requiredEntity createDataKey="createFirstSimpleProduct"/> |
| 29 | + </createData> |
| 30 | + |
| 31 | + <!-- Create Customer --> |
| 32 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 33 | + </before> |
| 34 | + <!-- Delete Data --> |
| 35 | + <after> |
| 36 | + <deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 37 | + <deleteData createDataKey="createCategory" stepKey="deleteSimpleCategory"/> |
| 38 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 39 | + </after> |
| 40 | + <!-- Login into Admin Panel--> |
| 41 | + <actionGroup ref="AdminLoginActionGroup" stepKey="adminLogin"/> |
| 42 | + |
| 43 | + <!-- Open Product Page--> |
| 44 | + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductPagebyID"> |
| 45 | + <argument name="productId" value="$createFirstSimpleProduct.id$"/> |
| 46 | + </actionGroup> |
| 47 | + |
| 48 | + <!-- Open Advanced Pricing and add Special Price to Product--> |
| 49 | + <actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPriceForFirstProduct"> |
| 50 | + <argument name="price" value="{{specialProductPrice3.price}}"/> |
| 51 | + </actionGroup> |
| 52 | + |
| 53 | + <!-- Save Product Page--> |
| 54 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/> |
| 55 | + |
| 56 | + <!-- Login to StoreFront--> |
| 57 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin"> |
| 58 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 59 | + </actionGroup> |
| 60 | + |
| 61 | + <!-- Navigates to category page --> |
| 62 | + <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage"> |
| 63 | + <argument name="category" value="$$createCategory$$"/> |
| 64 | + </actionGroup> |
| 65 | + |
| 66 | + <!-- Grab Value of Product Price from Category Page--> |
| 67 | + <grabTextFrom selector=" {{StorefrontCategoryMainSection.productPrice}}" stepKey="grabProductPrice"/> |
| 68 | + |
| 69 | + <!-- Open Product Page --> |
| 70 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage"> |
| 71 | + <argument name="product" value="$$createFirstSimpleProduct$$"/> |
| 72 | + </actionGroup> |
| 73 | + |
| 74 | + <!-- Grab Value of Special Price from Product Page--> |
| 75 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.specialPriceValue}}" stepKey="waitForProductSpecialPrice"/> |
| 76 | + <grabTextFrom selector="{{StorefrontProductInfoMainSection.specialPriceValue}}" stepKey="grabSpecialPricefromProductPage"/> |
| 77 | + |
| 78 | + <!-- Add Product To WishList from Product Page--> |
| 79 | + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="wishlist"> |
| 80 | + <argument name="productVar" value="$$createFirstSimpleProduct$$"/> |
| 81 | + </actionGroup> |
| 82 | + |
| 83 | + <!-- Grab Value of Special Price from WishList Page--> |
| 84 | + <grabTextFrom selector="{{StorefrontProductInfoMainSection.productSpecialPrice}}" stepKey="grabspecialPriceFromWishListPage"/> |
| 85 | + |
| 86 | + <!-- Check Special Price on the Catalog Page is same as Special Price on WishList Page--> |
| 87 | + <assertEquals stepKey="assertProductPriceValuesAreEqual"> |
| 88 | + <actualResult type="const">$grabSpecialPricefromProductPage</actualResult> |
| 89 | + <expectedResult type="string">$grabspecialPriceFromWishListPage</expectedResult> |
| 90 | + </assertEquals> |
| 91 | + |
| 92 | + </test> |
| 93 | +</tests> |
0 commit comments