|
| 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="AdminOrderRateDisplayedInOneLineTest"> |
| 12 | + <annotations> |
| 13 | + <features value="CurrencySymbol"/> |
| 14 | + <stories value="Currency rates order page"/> |
| 15 | + <title value="Order rate converting currency for 'Base Currency' and 'Default Display Currency' displayed correct once"/> |
| 16 | + <description value="Order rate converting currency for 'Base Currency' and 'Default Display Currency' displayed correct once"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MC-17255" /> |
| 19 | + <useCaseId value="MAGETWO-67450"/> |
| 20 | + <group value="currency"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 24 | + <!--Create product--> |
| 25 | + <createData entity="SimpleProduct2" stepKey="createProduct"/> |
| 26 | + <!--Set price scope website--> |
| 27 | + <magentoCLI command="config:set {{CatalogPriceScopeWebsiteConfigData.path}} {{CatalogPriceScopeWebsiteConfigData.value}}" stepKey="setCatalogPriceScopeWebsite"/> |
| 28 | + <!--Set Currency options for Default Config--> |
| 29 | + <magentoCLI command="config:set {{SetCurrencyEURBaseConfig.path}} {{SetCurrencyEURBaseConfig.value}}" stepKey="setCurrencyBaseEUR"/> |
| 30 | + <magentoCLI command="config:set {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}},{{SetAllowedCurrenciesConfigForEUR.value}}" stepKey="setAllowedCurrencyEURandUSD"/> |
| 31 | + <magentoCLI command="config:set {{SetDefaultCurrencyEURConfig.path}} {{SetDefaultCurrencyEURConfig.value}}" stepKey="setCurrencyDefaultEUR"/> |
| 32 | + <!--Set Currency options for Website--> |
| 33 | + <magentoCLI command="config:set --scope={{SetCurrencyUSDBaseConfig.scope}} --scope-code={{SetCurrencyUSDBaseConfig.scope_code}} {{SetCurrencyUSDBaseConfig.path}} {{SetCurrencyUSDBaseConfig.value}}" stepKey="setCurrencyBaseEURWebsites"/> |
| 34 | + <magentoCLI command="config:set --scope={{SetAllowedCurrenciesConfigForUSD.scope}} --scope-code={{SetAllowedCurrenciesConfigForUSD.scope_code}} {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}},{{SetAllowedCurrenciesConfigForEUR.value}}" stepKey="setAllowedCurrencyWebsitesForEURandUSD"/> |
| 35 | + <magentoCLI command="config:set --scope={{SetDefaultCurrencyEURConfig.scope}} --scope-code={{SetDefaultCurrencyEURConfig.scope_code}} {{SetDefaultCurrencyEURConfig.path}} {{SetDefaultCurrencyEURConfig.value}}" stepKey="setCurrencyDefaultEURWebsites"/> |
| 36 | + </before> |
| 37 | + <after> |
| 38 | + <!--Delete created product--> |
| 39 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 40 | + <!--Reset configurations--> |
| 41 | + <magentoCLI command="config:set {{CatalogPriceScopeGlobalConfigData.path}} {{CatalogPriceScopeGlobalConfigData.value}}" stepKey="setCatalogPriceScopeGlobal"/> |
| 42 | + <magentoCLI command="config:set {{SetCurrencyUSDBaseConfig.path}} {{SetCurrencyUSDBaseConfig.value}}" stepKey="setCurrencyBaseUSD"/> |
| 43 | + <magentoCLI command="config:set {{SetDefaultCurrencyUSDConfig.path}} {{SetDefaultCurrencyUSDConfig.value}}" stepKey="setCurrencyDefaultUSD"/> |
| 44 | + <magentoCLI command="config:set {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}}" stepKey="setAllowedCurrencyUSD"/> |
| 45 | + <!--Set Currency options for Website--> |
| 46 | + <magentoCLI command="config:set --scope={{SetCurrencyUSDBaseConfig.scope}} --scope-code={{SetCurrencyUSDBaseConfig.scope_code}} {{SetCurrencyUSDBaseConfig.path}} {{SetCurrencyUSDBaseConfig.value}}" stepKey="setCurrencyBaseUSDWebsites"/> |
| 47 | + <magentoCLI command="config:set --scope={{SetDefaultCurrencyUSDConfig.scope}} --scope-code={{SetDefaultCurrencyUSDConfig.scope_code}} {{SetDefaultCurrencyUSDConfig.path}} {{SetDefaultCurrencyUSDConfig.value}}" stepKey="setCurrencyDefaultUSDWebsites"/> |
| 48 | + <magentoCLI command="config:set --scope={{SetAllowedCurrenciesConfigForUSD.scope}} --scope-code={{SetAllowedCurrenciesConfigForUSD.scope_code}} {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}}" stepKey="setAllowedCurrencyUSDWebsites"/> |
| 49 | + <actionGroup ref="logout" stepKey="logout"/> |
| 50 | + </after> |
| 51 | + <!--Open created product on Storefront and place for order--> |
| 52 | + <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/> |
| 53 | + <waitForPageLoad stepKey="waitForProductPagePageLoad"/> |
| 54 | + <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage"> |
| 55 | + <argument name="productName" value="$$createProduct.name$$"/> |
| 56 | + </actionGroup> |
| 57 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="guestGoToCheckoutFromMinicart" /> |
| 58 | + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSection"> |
| 59 | + </actionGroup> |
| 60 | + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="guestSelectCheckMoneyOrderPayment" /> |
| 61 | + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="guestPlaceOrder"> |
| 62 | + <argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage" /> |
| 63 | + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" /> |
| 64 | + </actionGroup> |
| 65 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> |
| 66 | + <!--Open order and check rates display in one line--> |
| 67 | + <actionGroup ref="OpenOrderById" stepKey="openOrderById"> |
| 68 | + <argument name="orderId" value="$grabOrderNumber"/> |
| 69 | + </actionGroup> |
| 70 | + <see selector="{{AdminOrderDetailsInformationSection.orderInformationTable}}" userInput="EUR / USD rate" stepKey="seeEURandUSDRate"/> |
| 71 | + <grabMultiple selector="{{AdminOrderDetailsInformationSection.rate}}" stepKey="grabRate" /> |
| 72 | + <assertEquals stepKey="assertSelectedCategories"> |
| 73 | + <actualResult type="variable">grabRate</actualResult> |
| 74 | + <expectedResult type="array">[EUR / USD rate:]</expectedResult> |
| 75 | + </assertEquals> |
| 76 | + </test> |
| 77 | +</tests> |
0 commit comments