|
| 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="StorefrontButtonsInlineTranslationOnProductPageTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Translation"/> |
| 14 | + <stories value="Inline Translation"/> |
| 15 | + <title value="Buttons inline translation on product page"/> |
| 16 | + <description value="A merchant should be able to translate buttons by an inline translation tool"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MC-27118"/> |
| 19 | + <useCaseId value="MC-24186"/> |
| 20 | + <group value="translation"/> |
| 21 | + <group value="catalog"/> |
| 22 | + <group value="developer_mode_only"/> |
| 23 | + </annotations> |
| 24 | + <before> |
| 25 | + <!-- Enable Translate Inline For Storefront --> |
| 26 | + <magentoCLI command="config:set {{EnableTranslateInlineForStorefront.path}} {{EnableTranslateInlineForStorefront.value}}" stepKey="enableTranslateInlineForStorefront"/> |
| 27 | + <!-- Create Category --> |
| 28 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 29 | + <!-- Create Simple Product --> |
| 30 | + <createData entity="ApiSimpleProduct" stepKey="createProduct"> |
| 31 | + <requiredEntity createDataKey="createCategory"/> |
| 32 | + </createData> |
| 33 | + </before> |
| 34 | + <after> |
| 35 | + <!-- Disable Translate Inline For Storefront --> |
| 36 | + <magentoCLI command="config:set {{DisableTranslateInlineForStorefront.path}} {{DisableTranslateInlineForStorefront.value}}" stepKey="disableTranslateInlineForStorefront"/> |
| 37 | + <!-- Delete Simple Product --> |
| 38 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 39 | + <!-- Delete Category --> |
| 40 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 41 | + </after> |
| 42 | + |
| 43 | + <!-- Add product to cart on storefront --> |
| 44 | + <amOnPage url="{{StorefrontProductPage.url($createProduct.custom_attributes[url_key]$)}}" stepKey="goToProductPage"/> |
| 45 | + <waitForPageLoad stepKey="waitForProductPageLoad"/> |
| 46 | + <waitForElementVisible selector="{{StorefrontProductActionSection.addToCartEnabledWithTranslation}}" stepKey="waitForAddToCartButtonEnabled"/> |
| 47 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addProductToCart"> |
| 48 | + <argument name="productName" value="$createProduct.name$"/> |
| 49 | + </actionGroup> |
| 50 | + |
| 51 | + <!-- Open Mini Cart --> |
| 52 | + <actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openMiniCart"/> |
| 53 | + |
| 54 | + <!-- Check button "Proceed to Checkout". There must be red borders and "book" icons on labels that can be translated. --> |
| 55 | + <actionGroup ref="AssertElementInTranslateInlineModeActionGroup" stepKey="assertRedBordersAndBookIcon"> |
| 56 | + <argument name="elementSelector" value="{{StorefrontMinicartSection.goToCheckout}}"/> |
| 57 | + </actionGroup> |
| 58 | + |
| 59 | + <!-- Open Inline Translation popup --> |
| 60 | + <actionGroup ref="StorefrontOpenInlineTranslationPopupActionGroup" stepKey="openInlineTranslationPopup"> |
| 61 | + <argument name="elementSelector" value="{{StorefrontMinicartSection.goToCheckout}}"/> |
| 62 | + </actionGroup> |
| 63 | + </test> |
| 64 | +</tests> |
0 commit comments