|
7 | 7 | --> |
8 | 8 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
9 | 9 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
10 | | - <test name="CreateCreditMemowithBaseCurrencyUSDandDisplayCurrencyEuroTest"> |
| 10 | + <test name="CreateCreditMemoWithBaseCurrencyUSDAndDisplayCurrencyEuroTest"> |
11 | 11 | <annotations> |
12 | 12 | <features value="Order"/> |
13 | 13 | <stories value="Create Credit Memo"/> |
|
22 | 22 | <!-- Create SimpleProductWithPrice100 --> |
23 | 23 | <createData entity="SimpleProduct_100" stepKey="createProduct"/> |
24 | 24 | <!-- Currency Options settings --> |
25 | | - <magentoCLI command="config:set {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}},{{SetAllowedCurrenciesConfigForEUR.value}}" stepKey="setAllowedCurrencyEURandUSD"/> |
| 25 | + <magentoCLI command="config:set {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}},{{SetAllowedCurrenciesConfigForEUR.value}}" stepKey="setAllowedCurrencyEURAndUSD"/> |
26 | 26 | <magentoCLI command="config:set {{SetDefaultCurrencyEURConfig.path}} {{SetDefaultCurrencyEURConfig.value}}" stepKey="setCurrencyDefaultEUR"/> |
27 | 27 | <!-- Login as Admin --> |
28 | 28 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
29 | | - <!-- Navigate to curency rates page --> |
| 29 | + <!-- Navigate to currency rates page --> |
30 | 30 | <actionGroup ref="AdminOpenCurrencyRatesPageActionGroup" stepKey="naviagteToCurrencyRatesPage"/> |
31 | 31 | <!-- Currency Rates (Stores > Currency Rates): 1.000 USD = 0.7067 EUR --> |
32 | 32 | <actionGroup ref="AdminSetCurrencyRatesActionGroup" stepKey="setCurrencyRates"> |
|
53 | 53 | <!-- Admin log out --> |
54 | 54 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
55 | 55 | </after> |
56 | | - <!--Login as customer --> |
| 56 | + <!-- Login as customer --> |
57 | 57 | <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> |
58 | 58 | <argument name="Customer" value="$$createCustomer$$"/> |
59 | 59 | </actionGroup> |
60 | | - <!--Navigate To Simple Product Page --> |
| 60 | + <!-- Navigate To Simple Product Page --> |
61 | 61 | <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToSimpleProductPage"> |
62 | 62 | <argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/> |
63 | 63 | </actionGroup> |
64 | | - <!-- Verify product prices for simple product--> |
| 64 | + <!-- Verify product prices for simple product --> |
65 | 65 | <actionGroup ref="AssertStorefrontProductPricesActionGroup" stepKey="assertSimpleProductPrices"> |
66 | 66 | <argument name="productPrice" value="€70.67"/> |
67 | 67 | <argument name="productFinalPrice" value="€70.67"/> |
|
72 | 72 | </actionGroup> |
73 | 73 | <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToShoppingCart"/> |
74 | 74 | <actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="goToCheckout"/> |
75 | | - <!-- verify flat rate €3.53--> |
76 | | - <waitForText selector="{{CheckoutShippingMethodsSection.price}}" stepKey="seeflatRate" userInput="€3.53"/> |
| 75 | + <!-- verify flat rate €3.53 --> |
| 76 | + <waitForText selector="{{CheckoutShippingMethodsSection.price}}" stepKey="seeFlatRate" userInput="€3.53"/> |
77 | 77 | <!-- click on Next button --> |
78 | 78 | <actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/> |
79 | 79 | <!-- verify order summary --> |
|
84 | 84 | <argument name="total" value="€74.20"/> |
85 | 85 | </actionGroup> |
86 | 86 | <waitForText userInput="$105.00" selector="{{CheckoutPaymentSection.productChargedFor}}" stepKey="assertProductChargedFor"/> |
87 | | - <!-- Place order--> |
| 87 | + <!-- Place order --> |
88 | 88 | <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/> |
89 | 89 | <waitForElement selector="{{CheckoutSuccessMainSection.orderLink}}" stepKey="waitForOrderId"/> |
90 | 90 | <grabTextFrom selector="{{CheckoutSuccessMainSection.orderLink}}" stepKey="orderId"/> |
91 | | - <!-- Navigate to Sales order page--> |
| 91 | + <!-- Navigate to Sales order page --> |
92 | 92 | <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/> |
93 | 93 | <!-- Open created order --> |
94 | 94 | <actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="filterOrdersGridById"> |
95 | 95 | <argument name="entityId" value="{$orderId}"/> |
96 | 96 | </actionGroup> |
97 | | - <!-- Submit invoice--> |
| 97 | + <!-- Submit invoice --> |
98 | 98 | <actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickOnInvoiceBtn"/> |
99 | 99 | <actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/> |
100 | 100 | <waitForElementVisible selector="{{AdminMessagesSection.successMessage}}" stepKey="waitForSuccessMessage"/> |
101 | | - <!-- Click 'Credit Memo' button and create new memo --> |
| 101 | + <!-- Click 'Credit Memo' button and create new memo --> |
102 | 102 | <actionGroup ref="AdminStartToCreateCreditMemoFromOrderPageActionGroup" stepKey="createCreditMemo"/> |
103 | | - <!-- Assert Credit Memo refund prices--> |
| 103 | + <!-- Assert Credit Memo refund prices --> |
104 | 104 | <actionGroup ref="AssertAdminCreditMemoNewPageTotalsActionGroup" stepKey="assertCreditMemoRefundTotals"> |
105 | 105 | <argument name="refundShipping" value="5.00"/> |
106 | 106 | <argument name="adjustmentRefund" value="0.00"/> |
107 | 107 | <argument name="adjustmentFee" value="0.00"/> |
108 | 108 | <argument name="subtotalRow" value="$100.00"/> |
109 | 109 | <argument name="grandTotal" value="$105.00"/> |
110 | 110 | </actionGroup> |
111 | | - <!-- Assert Grand total and subtotal value--> |
112 | | - <waitForElementVisible selector="{{AdminCreditMemoTotalSection.orderTotalPrices('Grand Total','€74.20')}}" stepKey="seeGrandTotalValueEURO"/> |
113 | | - <waitForElementVisible selector="{{AdminCreditMemoTotalSection.subtotalAndShipping('Subtotal','€70.67')}}" stepKey="seeSubTotalValueEURO"/> |
114 | | - <!-- Refund Offline--> |
| 111 | + <!-- Assert Grand total and subtotal value --> |
| 112 | + <waitForElementVisible selector="{{AdminCreditMemoTotalSection.orderTotalPrices('Grand Total','€74.20')}}" stepKey="waitForGrandTotalValueEURO"/> |
| 113 | + <waitForElementVisible selector="{{AdminCreditMemoTotalSection.subTotalAndShipping('Subtotal','€70.67')}}" stepKey="waitForSubTotalValueEURO"/> |
| 114 | + <!-- Refund Offline --> |
115 | 115 | <actionGroup ref="AdminClickRefundOfflineOnCreditMemoDetailPageActionGroup" stepKey="clickRefundOffline"/> |
116 | 116 | <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPageAgain"/> |
117 | 117 | <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> |
118 | 118 | <waitForElementClickable selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="waitForColumnsDropdownToBeOpened"/> |
119 | | - <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsdropDown"/> |
120 | | - <!-- Enable to display Total Refunded column and validate currency --> |
| 119 | + <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsDropDown"/> |
| 120 | + <!-- Enable to display Total Refunded column and validate currency --> |
121 | 121 | <checkOption selector="{{AdminProductGridFilterSection.viewColumnOption('Total Refunded')}}" stepKey="showRefundedColumn"/> |
122 | 122 | <waitForElementClickable selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="waitForColumnsDropdownToBeClickedToClose"/> |
123 | | - <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="closeColumnsdropDown"/> |
| 123 | + <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="closeColumnsDropDown"/> |
124 | 124 | <waitForElement selector="{{AdminGridHeaders.headerNameandValueOtherCurrency('Grand Total (Base)','105.00')}}" stepKey="waitForGrandTotalBaseValue"/> |
125 | 125 | <grabTextFrom selector="{{AdminGridHeaders.headerNameandValueOtherCurrency('Grand Total (Base)','105.00')}}" stepKey="grabGrandTotalBaseValue"/> |
126 | 126 | <assertEquals stepKey="seeGrandTotalBase"> |
|
0 commit comments