|
| 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="StorefrontButtonsInlineTranslationTest"> |
| 12 | + <annotations> |
| 13 | + <stories value="Inline Translation"/> |
| 14 | + <title value="[Inline Translation] Buttons inline translation"/> |
| 15 | + <description value="[Inline Translation] Buttons inline translation"/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <testCaseId value="MC-12735"/> |
| 18 | + <group value="translation"/> |
| 19 | + <skip> |
| 20 | + <issueId value="MC-20127"/> |
| 21 | + </skip> |
| 22 | + </annotations> |
| 23 | + <before> |
| 24 | + <!-- Create Simple Product --> |
| 25 | + <createData entity="SimpleProduct2" stepKey="createProduct"/> |
| 26 | + <!-- Enable Translate Inline For Storefront--> |
| 27 | + <magentoCLI |
| 28 | + command="config:set {{EnableTranslateInlineForStorefront.path}} {{EnableTranslateInlineForStorefront.value}}" |
| 29 | + stepKey="enableTranslateInlineForStorefront"/> |
| 30 | + <!-- Set developer mode --> |
| 31 | + <magentoCLI command="deploy:mode:set developer" stepKey="setDeveloperMode"/> |
| 32 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 33 | + </before> |
| 34 | + <after> |
| 35 | + <!-- Disable Translate Inline For Storefront --> |
| 36 | + <magentoCLI |
| 37 | + command="config:set {{DisableTranslateInlineForStorefront.path}} {{DisableTranslateInlineForStorefront.value}}" |
| 38 | + stepKey="disableTranslateInlineForStorefront"/> |
| 39 | + <!-- Delete Simple Product --> |
| 40 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 41 | + </after> |
| 42 | + |
| 43 | + <!-- Add product to cart on storefront --> |
| 44 | + <actionGroup ref="AddSimpleProductToCart" stepKey="addProduct"> |
| 45 | + <argument name="product" value="$$createProduct$$"/> |
| 46 | + </actionGroup> |
| 47 | + |
| 48 | + <!-- Click on cart button on the top --> |
| 49 | + <reloadPage stepKey="reloadPage"/> |
| 50 | + <waitForPageLoad stepKey="waitForReload"/> |
| 51 | + <click selector="{{StorefrontMiniCartSection.show}}" stepKey="showMiniCart"/> |
| 52 | + |
| 53 | + <!-- Small cart popup appeared. --> |
| 54 | + <waitForElementVisible selector="{{StorefrontMinicartSection.blockMiniCart}}" stepKey="seePopUpAppeared"/> |
| 55 | + |
| 56 | + <!-- Check button "Proceed to Checkout". There must be red borders and "book" icons on labels that can be translated. --> |
| 57 | + <actionGroup ref="AssertElementInTranslateInlineModeActionGroup" stepKey="assertProceedToCheckout"> |
| 58 | + <argument name="elementSelector" value="{{StorefrontMinicartSection.goToCheckout}}"/> |
| 59 | + </actionGroup> |
| 60 | + |
| 61 | + <actionGroup ref="AdminTranslateElementActionGroup" stepKey="translateProceedToCheckout"> |
| 62 | + <argument name="elementSelector" value="{{StorefrontMinicartSection.goToCheckout}}"/> |
| 63 | + <argument name="translateText" value="Proceed to Checkout Translated"/> |
| 64 | + </actionGroup> |
| 65 | + </test> |
| 66 | +</tests> |
0 commit comments