|
10 | 10 | <test name="CreateCreditMemowithBaseCurrencyUSDandDisplayCurrencyEuroTest">
|
11 | 11 | <annotations>
|
12 | 12 | <features value="Order"/>
|
13 |
| - <stories value="Create Credit Memo if Base Currency is USD and Display Currency is Euro"/> |
14 |
| - <title value="Create Credit Memo if Base Currency is USD and Display Currency is Euro"/> |
15 |
| - <description value="Create Credit Memo if Base Currency is USD and Display Currency is Euro"/> |
16 |
| - <severity value="MAJOR"/> |
| 13 | + <stories value="Create Credit Memo"/> |
| 14 | + <title value="Create Credit Memo with Base Currency as USD and Display Currency as Euro"/> |
| 15 | + <description value="The purpose of this test is to create credit memo with base currency as USD and display currency as Euro and validate the corresponding prices and currency symbols"/> |
| 16 | + <severity value="CRITICAL"/> |
17 | 17 | <testCaseId value="AC-4521"/>
|
18 | 18 | </annotations>
|
19 | 19 | <before>
|
|
22 | 22 | <!-- Create SimpleProductWithPrice100 -->
|
23 | 23 | <createData entity="SimpleProduct_100" stepKey="createProduct"/>
|
24 | 24 | <!-- Currency Options settings -->
|
25 |
| - <magentoCLI command="config:set {{SetCurrencyUSDBaseConfig.path}} {{SetCurrencyUSDBaseConfig.value}}" stepKey="setCurrencyBaseUSD"/> |
26 | 25 | <magentoCLI command="config:set {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}},{{SetAllowedCurrenciesConfigForEUR.value}}" stepKey="setAllowedCurrencyEURandUSD"/>
|
27 | 26 | <magentoCLI command="config:set {{SetDefaultCurrencyEURConfig.path}} {{SetDefaultCurrencyEURConfig.value}}" stepKey="setCurrencyDefaultEUR"/>
|
28 | 27 | <!-- Login as Admin -->
|
|
35 | 34 | <argument name="secondCurrency" value="EUR"/>
|
36 | 35 | <argument name="rate" value="0.7067"/>
|
37 | 36 | </actionGroup>
|
38 |
| - <magentoCLI stepKey="reindex" command="indexer:reindex"/> |
39 |
| - <magentoCLI stepKey="flushCache" command="cache:flush"/> |
| 37 | + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> |
| 38 | + <argument name="tags" value="config full_page"/> |
| 39 | + </actionGroup> |
40 | 40 | </before>
|
41 | 41 | <after>
|
42 | 42 | <magentoCLI command="config:set {{SetCurrencyUSDBaseConfig.path}} {{SetCurrencyUSDBaseConfig.value}}" stepKey="resetCurrencyBaseBackToUSD"/>
|
43 | 43 | <magentoCLI command="config:set {{SetDefaultCurrencyUSDConfig.path}} {{SetDefaultCurrencyUSDConfig.value}}" stepKey="resetDefaultCurrencyBaseBackToUSD"/>
|
44 | 44 | <magentoCLI command="config:set {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}}" stepKey="resetAllowedCurrencyBaseBackToUSD"/>
|
| 45 | + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> |
| 46 | + <argument name="tags" value="config full_page"/> |
| 47 | + </actionGroup> |
| 48 | + <!-- Customer log out --> |
| 49 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> |
45 | 50 | <!-- Delete customer -->
|
46 | 51 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
|
47 | 52 | <!-- Delete product -->
|
48 | 53 | <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
|
49 | 54 | <!-- Admin log out -->
|
50 | 55 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
51 |
| - <!-- Customer log out --> |
52 |
| - <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> |
53 | 56 | </after>
|
54 | 57 | <!--Login as customer -->
|
55 | 58 | <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
|
56 | 59 | <argument name="Customer" value="$$createCustomer$$"/>
|
57 | 60 | </actionGroup>
|
58 | 61 | <!--Navigate To Simple Product Page -->
|
59 |
| - <comment userInput="Add product to the shopping cart" stepKey="addSimpleProductToCart"/> |
60 |
| - <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToSimpleProductPage"/> |
61 |
| - <waitForPageLoad stepKey="waitForProductPageLoad"/> |
62 |
| - <!-- Verify price for simple product with attribute option €70.67 --> |
63 |
| - <actionGroup ref="AssertStorefrontProductPricesActionGroup" stepKey="assertFirstSimpleProductPrices"> |
| 62 | + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToSimpleProductPage"> |
| 63 | + <argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/> |
| 64 | + </actionGroup> |
| 65 | + <!-- Verify product prices for simple product--> |
| 66 | + <actionGroup ref="AssertStorefrontProductPricesActionGroup" stepKey="assertSimpleProductPrices"> |
64 | 67 | <argument name="productPrice" value="€70.67"/>
|
65 | 68 | <argument name="productFinalPrice" value="€70.67"/>
|
66 | 69 | </actionGroup>
|
67 |
| - <!-- Customer placed order from storefront with payment method --> |
| 70 | + <!-- Add product to cart --> |
68 | 71 | <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
|
69 | 72 | <argument name="product" value="$$createProduct$$"/>
|
70 | 73 | </actionGroup>
|
71 |
| - <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> |
| 74 | + <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToShoppingCart"/> |
| 75 | + <actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="goToCheckout"/> |
72 | 76 | <!-- verify flat rate €3.53-->
|
73 |
| - <see selector="{{CheckoutShippingMethodsSection.price}}" stepKey="seeflatRate" userInput="€3.53"/> |
| 77 | + <waitForText selector="{{CheckoutShippingMethodsSection.price}}" stepKey="seeflatRate" userInput="€3.53"/> |
74 | 78 | <!-- click on Next button -->
|
75 | 79 | <actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
|
76 | 80 | <!-- verify order summary -->
|
|
80 | 84 | <argument name="shippingMethod" value="Flat Rate - Fixed"/>
|
81 | 85 | <argument name="total" value="€74.20"/>
|
82 | 86 | </actionGroup>
|
83 |
| - <!-- application issue --> |
84 |
| - <see userInput="$105.00" selector="{{CheckoutPaymentSection.productChargedFor}}" stepKey="assertProductChargedFor"/> |
| 87 | + <waitForText userInput="$105.00" selector="{{CheckoutPaymentSection.productChargedFor}}" stepKey="assertProductChargedFor"/> |
85 | 88 | <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/>
|
| 89 | + <waitForElement selector="{{CheckoutSuccessMainSection.orderLink}}" stepKey="waitForOrderId"/> |
86 | 90 | <grabTextFrom selector="{{CheckoutSuccessMainSection.orderLink}}" stepKey="orderId"/>
|
87 | 91 | <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/>
|
88 | 92 | <!-- clear filter if set -->
|
89 |
| - <conditionalClick selector="{{AdminProductFiltersSection.clearFiltersButton}}" dependentSelector="{{AdminProductFiltersSection.clearFiltersButton}}" visible="true" stepKey="cleanFiltersIfTheySet"/> |
90 |
| - <actionGroup ref="SearchAdminDataGridByKeywordActionGroup" stepKey="searchForOrder"> |
91 |
| - <argument name="keyword" value="{$orderId}"/> |
| 93 | + <actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="filterOrdersGridById"> |
| 94 | + <argument name="entityId" value="{$orderId}"/> |
92 | 95 | </actionGroup>
|
93 |
| - <click selector="{{AdminOrdersGridSection.viewLink('$orderId')}}" stepKey="clickOnViewLink"/> |
94 |
| - <waitForPageLoad stepKey="waitForOrderPageToLoad"/> |
95 |
| - <!-- Generate invoice --> |
96 |
| - <click selector="{{AdminOrderFormItemsSection.tab_invoice}}" stepKey="clickOnInvoiceBtn"/> |
97 |
| - <click selector="{{AdminOrderFormItemsSection.invoice_submit}}" stepKey="submitInvoice"/> |
98 |
| - <waitForElementVisible selector="{{AdminMessagesSection.successMsg}}" stepKey="waitForSuccessMessage"/> |
| 96 | + <actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickOnInvoiceBtn"/> |
| 97 | + <actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/> |
| 98 | + |
| 99 | + <waitForElementVisible selector="{{AdminMessagesSection.successMessage}}" stepKey="waitForSuccessMessage"/> |
99 | 100 | <!-- Click 'Credit Memo' button and create new memo -->
|
100 |
| - <click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreateCreditMemo"/> |
101 |
| - <seeInCurrentUrl url="{{AdminCreditMemoNewPage.url}}" stepKey="seeNewCreditMemoPage"/> |
102 |
| - <see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Memo" stepKey="seeNewMemoInPageTitle"/> |
| 101 | + <actionGroup ref="AdminStartToCreateCreditMemoFromOrderPageActionGroup" stepKey="createCreditMemo"/> |
103 | 102 | <actionGroup ref="AssertAdminCreditMemoNewPageTotalsActionGroup" stepKey="assertCreditMemoRefundTotals">
|
104 | 103 | <argument name="refundShipping" value="5.00"/>
|
105 | 104 | <argument name="adjustmentRefund" value="0.00"/>
|
106 | 105 | <argument name="adjustmentFee" value="0.00"/>
|
107 | 106 | <argument name="subtotalRow" value="$100.00"/>
|
108 | 107 | <argument name="grandTotal" value="$105.00"/>
|
109 | 108 | </actionGroup>
|
110 |
| - <seeElement selector="{{AdminCreditMemoTotalSection.orderTotalPrices('Grand Total','€74.20')}}" stepKey="seeGrandTotalValueEURO"/> |
111 |
| - <seeElement selector="{{AdminCreditMemoTotalSection.subtotalAndShipping('Subtotal','€70.67')}}" stepKey="seeSubTotalValueEURO"/> |
112 |
| - <click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickSubmitCreditMemo"/> |
113 |
| - <waitForElementVisible selector="{{AdminMessagesSection.successMsg}}" stepKey="waitForMessageAppears"/> |
114 |
| - <see selector="{{AdminMessagesSection.successMsg}}" userInput="You created the credit memo." stepKey="seeCreditMemoCreateSuccess"/> |
| 109 | + <waitForElementVisible selector="{{AdminCreditMemoTotalSection.orderTotalPrices('Grand Total','€74.20')}}" stepKey="seeGrandTotalValueEURO"/> |
| 110 | + <waitForElementVisible selector="{{AdminCreditMemoTotalSection.subtotalAndShipping('Subtotal','€70.67')}}" stepKey="seeSubTotalValueEURO"/> |
| 111 | + <actionGroup ref="AdminClickRefundOfflineOnCreditMemoDetailPageActionGroup" stepKey="clickRefundOffline"/> |
115 | 112 | <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPageAgain"/>
|
116 | 113 | <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
|
117 | 114 | <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsdropDown"/>
|
118 | 115 | <checkOption selector="{{AdminProductGridFilterSection.viewColumnOption('Total Refunded')}}" stepKey="showRefundedColumn"/>
|
119 | 116 | <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="closeColumnsdropDown"/>
|
120 |
| - <seeElement selector="{{AdminGridHeaders.headerNameandValueUSD('Grand Total (Base)','105.00')}}" stepKey="seeGrandTotalBase"/> |
121 |
| - <seeElement selector="{{AdminGridHeaders.headerNameandValueOtherCurrency('Grand Total (Purchased)','€74.20')}}" stepKey="seeGrandTotalPurchased"/> |
122 |
| - <seeElement selector="{{AdminGridHeaders.headerNameandValueOtherCurrency('Total Refunded','€74.20')}}" stepKey="seeTotalRefunded"/> |
| 117 | + <waitForElement selector="{{AdminGridHeaders.headerNameandValueOtherCurrency('Grand Total (Base)','105.00')}}" stepKey="waitForGrandTotalBaseValue"/> |
| 118 | + <grabTextFrom selector="{{AdminGridHeaders.headerNameandValueOtherCurrency('Grand Total (Base)','105.00')}}" stepKey="grabGrandTotalBaseValue"/> |
| 119 | + <assertEquals stepKey="seeGrandTotalBase"> |
| 120 | + <actualResult type="const">$grabGrandTotalBaseValue</actualResult> |
| 121 | + <expectedResult type="string">$105.00</expectedResult> |
| 122 | + </assertEquals> |
| 123 | + <waitForElementVisible selector="{{AdminGridHeaders.headerNameandValueOtherCurrency('Grand Total (Purchased)','€74.20')}}" stepKey="seeGrandTotalPurchased"/> |
| 124 | + <waitForElementVisible selector="{{AdminGridHeaders.headerNameandValueOtherCurrency('Total Refunded','€74.20')}}" stepKey="seeTotalRefunded"/> |
123 | 125 | </test>
|
124 | 126 | </tests>
|
0 commit comments