|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="CurrencyChangingBundleProductInCartTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Bundle"/> |
| 13 | + <stories value="Check that after changing currency price of cart is correct when the bundle product added to the cart"/> |
| 14 | + <title value="User should be able change the currency and get right price in cart when the bundle product added to the cart"/> |
| 15 | + <description value="User should be able change the currency and add one more product in cart and get right price in previous currency"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="MAGETWO-94467"/> |
| 18 | + <group value="Bundle"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <actionGroup ref="LoginAsAdmin" stepKey="login"/> |
| 22 | + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> |
| 23 | + <createData entity="SimpleProduct2" stepKey="simpleProduct2"/> |
| 24 | + </before> |
| 25 | + <after> |
| 26 | + <!-- Delete the bundled product --> |
| 27 | + <actionGroup stepKey="deleteBundle" ref="deleteProductUsingProductGrid"> |
| 28 | + <argument name="product" value="BundleProduct"/> |
| 29 | + </actionGroup> |
| 30 | + <actionGroup ref="AdminClearFiltersActionGroup" stepKey="ClearFiltersAfter"/> |
| 31 | + <!--Clear Configs--> |
| 32 | + <amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/> |
| 33 | + <waitForPageLoad stepKey="waitForAdminLoginPageLoad"/> |
| 34 | + <amOnPage url="{{ConfigCurrencySetupPage.url}}" stepKey="navigateToConfigCurrencySetupPage"/> |
| 35 | + <waitForPageLoad stepKey="waitForConfigCurrencySetupPageForUnselectEuroCurrency"/> |
| 36 | + <unselectOption selector="{{CurrencySetupSection.allowCurrencies}}" userInput="Euro" stepKey="unselectEuro"/> |
| 37 | + <click stepKey="saveUnselectedConfigs" selector="{{AdminConfigSection.saveButton}}"/> |
| 38 | + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="logout"/> |
| 39 | + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> |
| 40 | + <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> |
| 41 | + </after> |
| 42 | + <!--Go to bundle product creation page--> |
| 43 | + <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/> |
| 44 | + <waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/> |
| 45 | + <actionGroup ref="fillMainBundleProductForm" stepKey="fillMainFieldsForBundle"/> |
| 46 | + <!-- Add Option, a "Radio Buttons" type option --> |
| 47 | + <actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addBundleOptionWithTwoProducts2"> |
| 48 | + <argument name="x" value="0"/> |
| 49 | + <argument name="n" value="1"/> |
| 50 | + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> |
| 51 | + <argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/> |
| 52 | + <argument name="optionTitle" value="Option"/> |
| 53 | + <argument name="inputType" value="radio"/> |
| 54 | + </actionGroup> |
| 55 | + <checkOption selector="{{AdminProductFormBundleSection.userDefinedQuantity('0', '0')}}" stepKey="userDefinedQuantitiyOptionProduct0"/> |
| 56 | + <checkOption selector="{{AdminProductFormBundleSection.userDefinedQuantity('0', '1')}}" stepKey="userDefinedQuantitiyOptionProduct1"/> |
| 57 | + <actionGroup ref="saveProductForm" stepKey="saveProduct"/> |
| 58 | + <amOnPage url="{{ConfigCurrencySetupPage.url}}" stepKey="navigateToConfigCurrencySetupPage"/> |
| 59 | + <waitForPageLoad stepKey="waitForConfigCurrencySetupPage"/> |
| 60 | + <selectOption selector="{{CurrencySetupSection.allowCurrencies}}" parameterArray="['Euro', 'US Dollar']" stepKey="selectCurrencies"/> |
| 61 | + <click stepKey="saveConfigs" selector="{{AdminConfigSection.saveButton}}"/> |
| 62 | + <!-- Go to storefront BundleProduct --> |
| 63 | + <amOnPage url="{{BundleProduct.sku}}.html" stepKey="goToStorefront"/> |
| 64 | + <waitForPageLoad stepKey="waitForStorefront"/> |
| 65 | + <actionGroup ref="StoreFrontAddProductToCartFromBundleWithCurrencyActionGroup" stepKey="addProduct1ToCartAndChangeCurrencyToEuro"> |
| 66 | + <argument name="product" value="$$simpleProduct1$$"/> |
| 67 | + <argument name="currency" value="EUR - Euro"/> |
| 68 | + </actionGroup> |
| 69 | + <actionGroup ref="StoreFrontAddProductToCartFromBundleWithCurrencyActionGroup" stepKey="addProduct2ToCartAndChangeCurrencyToUSD"> |
| 70 | + <argument name="product" value="$$simpleProduct2$$"/> |
| 71 | + <argument name="currency" value="USD - US Dollar"/> |
| 72 | + </actionGroup> |
| 73 | + <click stepKey="openMiniCart" selector="{{StorefrontMinicartSection.showCart}}"/> |
| 74 | + <waitForPageLoad stepKey="waitForMiniCart"/> |
| 75 | + <see stepKey="seeCartSubtotal" userInput="$12,300.00"/> |
| 76 | + </test> |
| 77 | +</tests> |
0 commit comments