|
| 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="StorefrontProductNameWithDoubleQuote"> |
| 12 | + <annotations> |
| 13 | + <title value="Product with double quote in name"/> |
| 14 | + <description value="Product with a double quote in the name should appear correctly on the storefront"/> |
| 15 | + <severity value="CRITICAL"/> |
| 16 | + <group value="product"/> |
| 17 | + <testCaseId value="MAGETWO-92384"/> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 21 | + </before> |
| 22 | + <after> |
| 23 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 24 | + </after> |
| 25 | + |
| 26 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 27 | + <!--Create product via admin--> |
| 28 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductIndex"/> |
| 29 | + <waitForPageLoad stepKey="waitForProductIndexPage"/> |
| 30 | + <actionGroup ref="goToCreateProductPage" stepKey="goToProductCreatePage"> |
| 31 | + <argument name="product" value="SimpleProductNameWithDoubleQuote"/> |
| 32 | + </actionGroup> |
| 33 | + <actionGroup ref="fillMainProductForm" stepKey="fillProductForm"> |
| 34 | + <argument name="product" value="SimpleProductNameWithDoubleQuote"/> |
| 35 | + </actionGroup> |
| 36 | + <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createCategory.name$$]" stepKey="selectCategory"/> |
| 37 | + <actionGroup ref="addProductImage" stepKey="addImageToProduct"> |
| 38 | + <argument name="image" value="ImageUpload"/> |
| 39 | + </actionGroup> |
| 40 | + <actionGroup ref="saveProductForm" stepKey="saveProduct"/> |
| 41 | + |
| 42 | + <!--Check product in category listing--> |
| 43 | + <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="goToCategoryPage"/> |
| 44 | + <seeElement selector="{{StorefrontCategoryProductSection.ProductImageByNameAndSrc(SimpleProductNameWithDoubleQuote.name, ImageUpload.fileName)}}" stepKey="seeCorrectImageCategoryPage"/> |
| 45 | + <see selector="{{StorefrontCategoryProductSection.ProductTitleByName(SimpleProductNameWithDoubleQuote.name)}}" userInput="{{SimpleProductNameWithDoubleQuote.name}}" stepKey="seeCorrectNameCategoryPage"/> |
| 46 | + <see selector="{{StorefrontCategoryProductSection.ProductPriceByName(SimpleProductNameWithDoubleQuote.name)}}" userInput="${{SimpleProductNameWithDoubleQuote.price}}" stepKey="seeCorrectPriceCategoryPage"/> |
| 47 | + <!--Open product display page--> |
| 48 | + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName(SimpleProductNameWithDoubleQuote.name)}}" stepKey="clickProductToGoProductPage"/> |
| 49 | + <waitForPageLoad stepKey="waitForProductDisplayPageLoad"/> |
| 50 | + <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{SimpleProductNameWithDoubleQuote.name}}" stepKey="seeCorrectName"/> |
| 51 | + <see selector="{{StorefrontProductInfoMainSection.productSku}}" userInput="{{SimpleProductNameWithDoubleQuote.sku}}" stepKey="seeCorrectSku"/> |
| 52 | + <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="${{SimpleProductNameWithDoubleQuote.price}}" stepKey="seeCorrectPrice"/> |
| 53 | + <seeElement selector="{{StorefrontProductInfoMainSection.productImageSrc(ImageUpload.fileName)}}" stepKey="seeCorrectImage"/> |
| 54 | + <see selector="{{StorefrontProductInfoMainSection.stock}}" userInput="In Stock" stepKey="seeInStock"/> |
| 55 | + <see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$createCategory.name$$" stepKey="seeCorrectBreadCrumbCategory"/> |
| 56 | + <see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="{{SimpleProductNameWithDoubleQuote.name}}" stepKey="seeCorrectBreadCrumbProduct"/> |
| 57 | + |
| 58 | + <!--Remove product--> |
| 59 | + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteProduct"> |
| 60 | + <argument name="product" value="SimpleProductNameWithDoubleQuote"/> |
| 61 | + </actionGroup> |
| 62 | + </test> |
| 63 | +</tests> |
0 commit comments