|
| 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" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> |
| 10 | + <test name="ConfigurableProductChildImageShouldBeShownOnWishListTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Wishlist"/> |
| 13 | + <stories value="MAGETWO-8709"/> |
| 14 | + <group value="wishlist12"/> |
| 15 | + <title value="When user add Configurable child product to WIshlist then child product image should be shown in Wishlist"/> |
| 16 | + <description value="When user add Configurable child product to WIshlist then child product image should be shown in Wishlist"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MAGETWO-93097"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <magentoCLI command="config:set checkout/cart/configurable_product_image 0" stepKey="setProductImageSettingUnderCofigurationSalesCheckout"/> |
| 22 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 23 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> |
| 24 | + |
| 25 | + <actionGroup ref="createConfigurableProduct" stepKey="createProduct"> |
| 26 | + <argument name="product" value="_defaultProduct"/> |
| 27 | + <argument name="category" value="$$createCategory$$"/> |
| 28 | + </actionGroup> |
| 29 | + <createData entity="Simple_US_Customer" stepKey="customer"/> |
| 30 | + </before> |
| 31 | + <after> |
| 32 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 33 | + <deleteData createDataKey="customer" stepKey="deleteCustomer"/> |
| 34 | + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> |
| 35 | + </after> |
| 36 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> |
| 37 | + <waitForPageLoad stepKey="waitForProductIndexPageLoad"/> |
| 38 | + <click selector="{{AdminProductGridSection.selectRowBasedOnName(_defaultProduct.name)}}" stepKey="selectProductToAddImage"/> |
| 39 | + <waitForPageLoad stepKey="waitForProductEditPageLoad"/> |
| 40 | + <actionGroup ref="addProductImage" stepKey="addImageForParentProduct"> |
| 41 | + <argument name="image" value="MagentoLogo"/> |
| 42 | + </actionGroup> |
| 43 | + <actionGroup ref="saveProductForm" stepKey="saveProduct"/> |
| 44 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex1"/> |
| 45 | + <waitForPageLoad stepKey="waitForProductIndexPageLoad1"/> |
| 46 | + <click selector="{{AdminProductGridSection.selectRowBasedOnName(colorProductAttribute1.name)}}" stepKey="selectProductToAddImage1"/> |
| 47 | + <waitForPageLoad stepKey="waitForProductEditPageLoad1"/> |
| 48 | + <actionGroup ref="addProductImage" stepKey="addImageForChildProduct"> |
| 49 | + <argument name="image" value="TestImageNew"/> |
| 50 | + </actionGroup> |
| 51 | + <actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/> |
| 52 | + |
| 53 | + <!--Sign in as customer --> |
| 54 | + <amOnPage url="{{StorefrontCustomerSignInPage.url}}" stepKey="amOnSignInPage"/> |
| 55 | + <fillField userInput="$$customer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}" stepKey="fillEmail"/> |
| 56 | + <fillField userInput="$$customer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}" stepKey="fillPassword"/> |
| 57 | + <waitForElementVisible selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="waitForButton"/> |
| 58 | + <click selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="clickSignInAccountButton"/> |
| 59 | + <see userInput="$$customer.firstname$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" stepKey="seeFirstName"/> |
| 60 | + <see userInput="$$customer.lastname$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" stepKey="seeLastName"/> |
| 61 | + <see userInput="$$customer.email$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" stepKey="seeEmail"/> |
| 62 | + <waitForPageLoad stepKey="waitForLogin"/> |
| 63 | + <amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="amOnConfigurableProductPage"/> |
| 64 | + <waitForPageLoad stepKey="wait3"/> |
| 65 | + <see userInput="{{_defaultProduct.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="seeProductName"/> |
| 66 | + <selectOption userInput="{{colorProductAttribute1.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption1"/> |
| 67 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="waitForAddToCartVisible"/> |
| 68 | + <click selector="{{StorefrontProductPageSection.addToWishlist}}" stepKey="addFirstProductToWishlist"/> |
| 69 | + <waitForElement selector="{{StorefrontCustomerWishlistSection.successMsg}}" time="30" stepKey="addProductToWishlistWaitForSuccessMessage"/> |
| 70 | + <waitForPageLoad stepKey="waitForPageToLoad2"/> |
| 71 | + <seeElement selector="{{StorefrontCustomerWishlistProductSection.ProductImageByImageName(TestImageNew.filename)}}" stepKey="AssertWishlistProductImage" /> |
| 72 | + <seeElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductImageByImageName(TestImageNew.filename)}}" stepKey="AssertWishlistSidebarProductImage" /> |
| 73 | + </test> |
| 74 | +</tests> |
0 commit comments