|
5 | 5 | * See COPYING.txt for license details.
|
6 | 6 | */
|
7 | 7 | -->
|
8 |
| - |
9 | 8 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
10 | 9 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
|
11 | 10 | <test name="CreateCreditMemowithBaseCurrencyUSDandDisplayCurrencyEuroTest">
|
|
17 | 16 | <severity value="MAJOR"/>
|
18 | 17 | <testCaseId value="AC-4521"/>
|
19 | 18 | </annotations>
|
20 |
| - |
21 | 19 | <before>
|
22 | 20 | <!-- Create customer -->
|
23 | 21 | <createData entity="Simple_US_Customer" stepKey="createCustomer"/>
|
|
40 | 38 | <magentoCLI stepKey="reindex" command="indexer:reindex"/>
|
41 | 39 | <magentoCLI stepKey="flushCache" command="cache:flush"/>
|
42 | 40 | </before>
|
43 |
| - |
44 | 41 | <after>
|
45 |
| - <!-- Admin log out --> |
46 |
| - <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
47 |
| - <!-- Customer log out --> |
48 |
| - <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> |
| 42 | + <magentoCLI command="config:set {{SetCurrencyUSDBaseConfig.path}} {{SetCurrencyUSDBaseConfig.value}}" stepKey="resetCurrencyBaseBackToUSD"/> |
| 43 | + <magentoCLI command="config:set {{SetDefaultCurrencyUSDConfig.path}} {{SetDefaultCurrencyUSDConfig.value}}" stepKey="resetDefaultCurrencyBaseBackToUSD"/> |
| 44 | + <magentoCLI command="config:set {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}}" stepKey="resetAllowedCurrencyBaseBackToUSD"/> |
49 | 45 | <!-- Delete customer -->
|
50 | 46 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
|
51 | 47 | <!-- Delete product -->
|
52 | 48 | <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
|
| 49 | + <!-- Admin log out --> |
| 50 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 51 | + <!-- Customer log out --> |
| 52 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> |
53 | 53 | </after>
|
54 |
| - |
55 | 54 | <!--Login as customer -->
|
56 | 55 | <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
|
57 | 56 | <argument name="Customer" value="$$createCustomer$$"/>
|
58 | 57 | </actionGroup>
|
59 |
| - <!--Navigate To Simple Product Page --> |
| 58 | + <!--Navigate To Simple Product Page --> |
60 | 59 | <comment userInput="Add product to the shopping cart" stepKey="addSimpleProductToCart"/>
|
61 | 60 | <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToSimpleProductPage"/>
|
62 | 61 | <waitForPageLoad stepKey="waitForProductPageLoad"/>
|
63 |
| - |
64 | 62 | <!-- Verify price for simple product with attribute option €70.67 -->
|
65 | 63 | <actionGroup ref="AssertStorefrontProductPricesActionGroup" stepKey="assertFirstSimpleProductPrices">
|
66 | 64 | <argument name="productPrice" value="€70.67"/>
|
67 | 65 | <argument name="productFinalPrice" value="€70.67"/>
|
68 | 66 | </actionGroup>
|
69 |
| - |
70 | 67 | <!-- Customer placed order from storefront with payment method -->
|
71 | 68 | <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
|
72 | 69 | <argument name="product" value="$$createProduct$$"/>
|
|
88 | 85 | <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/>
|
89 | 86 | <grabTextFrom selector="{{CheckoutSuccessMainSection.orderLink}}" stepKey="orderId"/>
|
90 | 87 | <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/>
|
| 88 | + <!-- 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}"/> |
| 92 | + </actionGroup> |
91 | 93 | <click selector="{{AdminOrdersGridSection.viewLink('$orderId')}}" stepKey="clickOnViewLink"/>
|
92 |
| - |
93 | 94 | <waitForPageLoad stepKey="waitForOrderPageToLoad"/>
|
94 | 95 | <!-- Generate invoice -->
|
95 | 96 | <click selector="{{AdminOrderFormItemsSection.tab_invoice}}" stepKey="clickOnInvoiceBtn"/>
|
|
99 | 100 | <click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreateCreditMemo"/>
|
100 | 101 | <seeInCurrentUrl url="{{AdminCreditMemoNewPage.url}}" stepKey="seeNewCreditMemoPage"/>
|
101 | 102 | <see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Memo" stepKey="seeNewMemoInPageTitle"/>
|
102 |
| - |
103 | 103 | <actionGroup ref="AssertAdminCreditMemoNewPageTotalsActionGroup" stepKey="assertCreditMemoRefundTotals">
|
104 | 104 | <argument name="refundShipping" value="5.00"/>
|
105 | 105 | <argument name="adjustmentRefund" value="0.00"/>
|
|
112 | 112 | <click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickSubmitCreditMemo"/>
|
113 | 113 | <waitForElementVisible selector="{{AdminMessagesSection.successMsg}}" stepKey="waitForMessageAppears"/>
|
114 | 114 | <see selector="{{AdminMessagesSection.successMsg}}" userInput="You created the credit memo." stepKey="seeCreditMemoCreateSuccess"/>
|
115 |
| - |
116 | 115 | <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPageAgain"/>
|
117 |
| - |
| 116 | + <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> |
118 | 117 | <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsdropDown"/>
|
119 | 118 | <checkOption selector="{{AdminProductGridFilterSection.viewColumnOption('Total Refunded')}}" stepKey="showRefundedColumn"/>
|
120 | 119 | <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="closeColumnsdropDown"/>
|
121 |
| - |
122 | 120 | <seeElement selector="{{AdminGridHeaders.headerNameandValueUSD('Grand Total (Base)','105.00')}}" stepKey="seeGrandTotalBase"/>
|
123 | 121 | <seeElement selector="{{AdminGridHeaders.headerNameandValueOtherCurrency('Grand Total (Purchased)','€74.20')}}" stepKey="seeGrandTotalPurchased"/>
|
124 | 122 | <seeElement selector="{{AdminGridHeaders.headerNameandValueOtherCurrency('Total Refunded','€74.20')}}" stepKey="seeTotalRefunded"/>
|
125 |
| - |
126 | 123 | </test>
|
127 | 124 | </tests>
|
0 commit comments