|
| 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="StorefrontInlineTranslationWithQuoteSymbolsTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Translation"/> |
| 14 | + <stories value="Inline Translation"/> |
| 15 | + <title value="Inline translation with quote symbols"/> |
| 16 | + <description value="As merchant I want to be able to rename text labels using quote symbols in it"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MC-41175"/> |
| 19 | + <useCaseId value="MC-23989"/> |
| 20 | + <group value="translation"/> |
| 21 | + <group value="developer_mode_only"/> |
| 22 | + </annotations> |
| 23 | + |
| 24 | + <before> |
| 25 | + <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/> |
| 26 | + <magentoCLI command="config:set {{EnableTranslateInlineForStorefront.path}} {{EnableTranslateInlineForStorefront.value}}" stepKey="enableTranslateInlineStorefront"/> |
| 27 | + <createData entity="RevertWelcomeMessageTranslate" stepKey="revertWelcomeMessageTranslation"> |
| 28 | + <requiredEntity createDataKey="createCustomer"/> |
| 29 | + </createData> |
| 30 | + <createData entity="SimpleProduct2" stepKey="createProduct"/> |
| 31 | + <createData entity="SimpleProduct2" stepKey="createProductSecond"/> |
| 32 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCacheAfterTranslateEnabled"> |
| 33 | + <argument name="tags" value=""/> |
| 34 | + </actionGroup> |
| 35 | + </before> |
| 36 | + |
| 37 | + <after> |
| 38 | + <magentoCLI command="config:set {{EnableTranslateInlineForStorefront.path}} {{EnableTranslateInlineForStorefront.value}}" stepKey="enableTranslateInlineStorefront"/> |
| 39 | + <createData entity="RevertWelcomeMessageTranslate" stepKey="revertWelcomeMessageTranslation"> |
| 40 | + <requiredEntity createDataKey="createCustomer"/> |
| 41 | + </createData> |
| 42 | + <magentoCLI command="config:set {{DisableTranslateInlineForStorefront.path}} {{DisableTranslateInlineForStorefront.value}}" stepKey="disableTranslateInlineForStorefront"/> |
| 43 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 44 | + <deleteData createDataKey="createProductSecond" stepKey="deleteProductSecond"/> |
| 45 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 46 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCacheAfterTranslateDisabled"> |
| 47 | + <argument name="tags" value=""/> |
| 48 | + </actionGroup> |
| 49 | + </after> |
| 50 | + |
| 51 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> |
| 52 | + <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> |
| 53 | + </actionGroup> |
| 54 | + <actionGroup ref="AssertStorefrontDefaultWelcomeMessageActionGroup" stepKey="assertDefaultWelcomeMessage"/> |
| 55 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addProductToCart"> |
| 56 | + <argument name="productName" value="$createProduct.name$"/> |
| 57 | + </actionGroup> |
| 58 | + <actionGroup ref="AssertOneProductNameInMiniCartActionGroup" stepKey="seeProductInMiniCart"> |
| 59 | + <argument name="productName" value="$createProduct.name$"/> |
| 60 | + </actionGroup> |
| 61 | + |
| 62 | + <actionGroup ref="AssertElementInTranslateInlineModeActionGroup" stepKey="assertWelcomeMessageInInlineTranslateMode"> |
| 63 | + <argument name="elementSelector" value="{{StorefrontPanelHeaderTranslationSection.welcomeMessage}}"/> |
| 64 | + </actionGroup> |
| 65 | + <actionGroup ref="StorefrontOpenInlineTranslationPopupActionGroup" stepKey="openWelcomeMessageInlineTranslatePopup"> |
| 66 | + <argument name="elementSelector" value="{{StorefrontPanelHeaderTranslationSection.welcomeMessage}}"/> |
| 67 | + </actionGroup> |
| 68 | + <actionGroup ref="StorefrontFillCustomTranslationFieldActionGroup" stepKey="fillInlineTranslateNewValue"> |
| 69 | + <argument name="translateText" value="Welcome to "Food & Drinks" store"/> |
| 70 | + </actionGroup> |
| 71 | + <actionGroup ref="StorefrontSubmitInlineTranslationFormActionGroup" stepKey="saveInlineTranslateNewValue"/> |
| 72 | + |
| 73 | + <magentoCLI command="config:set {{DisableTranslateInlineForStorefront.path}} {{DisableTranslateInlineForStorefront.value}}" stepKey="disableTranslateInlineForStorefront"/> |
| 74 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCacheAfterTranslateDisabled"> |
| 75 | + <argument name="tags" value=""/> |
| 76 | + </actionGroup> |
| 77 | + |
| 78 | + <actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/> |
| 79 | + <actionGroup ref="AssertStorefrontCustomWelcomeMessageActionGroup" stepKey="verifyTranslatedWelcomeMessage"/> |
| 80 | + <actionGroup ref="AssertOneProductNameInMiniCartActionGroup" stepKey="seeProductInMiniCartAgain"> |
| 81 | + <argument name="productName" value="$createProduct.name$"/> |
| 82 | + </actionGroup> |
| 83 | + |
| 84 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openSecondProductPage"> |
| 85 | + <argument name="productUrl" value="$createProductSecond.custom_attributes[url_key]$"/> |
| 86 | + </actionGroup> |
| 87 | + <actionGroup ref="AssertStorefrontCustomWelcomeMessageActionGroup" stepKey="verifyTranslatedWelcomeMessageForSecondProduct"/> |
| 88 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addSecondProductToCart"> |
| 89 | + <argument name="productName" value="$createProductSecond.name$"/> |
| 90 | + </actionGroup> |
| 91 | + <actionGroup ref="AssertOneProductNameInMiniCartActionGroup" stepKey="seeSecondProductInMiniCart"> |
| 92 | + <argument name="productName" value="$createProductSecond.name$"/> |
| 93 | + </actionGroup> |
| 94 | + </test> |
| 95 | +</tests> |
0 commit comments