Skip to content

Commit 303f06b

Browse files
committed
MAGETWO-82400: Credit Memo - Wrong tax calculation! #10982
1 parent 82d78c7 commit 303f06b

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

app/code/Magento/Braintree/Test/Mftf/ActionGroup/AdminOrderFillBraintreeCreditCardActionGroup.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,18 @@
1818
<!--Fill card number-->
1919
<switchToIFrame selector="{{AdminOrderFormPaymentSection.braintreeCcFrame}}" stepKey="switchToCcIFrame"/>
2020
<fillField selector="{{AdminOrderFormPaymentSection.braintreeCardNumber}}" userInput="{{cardData.card_number}}" stepKey="fillCardNumber"/>
21-
<waitForPageLoad stepKey="waitForFillCardNumber" time="1"/>
2221
<switchToIFrame stepKey="switchToDefaultContext1"/>
2322
<!--Fill card expiration month-->
2423
<switchToIFrame selector="{{AdminOrderFormPaymentSection.braintreeCcExpMonthFrame}}" stepKey="switchToCcExpMonthIFrame"/>
2524
<fillField selector="{{AdminOrderFormPaymentSection.braintreeExpMonth}}" userInput="{{cardData.exp_month}}" stepKey="fillExpMonth"/>
26-
<waitForPageLoad stepKey="waitForFillCardExpMonth" time="1"/>
2725
<switchToIFrame stepKey="switchToDefaultContext2"/>
2826
<!--Fill card expiration year-->
2927
<switchToIFrame selector="{{AdminOrderFormPaymentSection.braintreeCcExpYear}}" stepKey="switchToCcExpYearIFrame"/>
3028
<fillField selector="{{AdminOrderFormPaymentSection.braintreeExpYear}}" userInput="{{cardData.exp_year}}" stepKey="fillExpYear"/>
31-
<waitForPageLoad stepKey="waitForFillCardExpYear" time="1"/>
3229
<switchToIFrame stepKey="switchToDefaultContext3"/>
3330
<!--Fill card CVV-->
3431
<switchToIFrame selector="{{AdminOrderFormPaymentSection.braintreeCvvFrame}}" stepKey="switchToCvvIFrame"/>
3532
<fillField selector="{{AdminOrderFormPaymentSection.braintreeCvv}}" userInput="{{cardData.cvv}}" stepKey="fillCvv"/>
36-
<waitForPageLoad stepKey="waitForFillCardCvv" time="1"/>
3733
<switchToIFrame stepKey="switchToDefaultContext4"/>
3834
</actionGroup>
3935
</actionGroups>

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,24 @@
6060
<actionGroup name="navigateToNewOrderPageExistingCustomer">
6161
<arguments>
6262
<argument name="customer"/>
63+
<argument name="storeView" defaultValue="_defaultStore"/>
6364
</arguments>
6465
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/>
6566
<waitForPageLoad stepKey="waitForIndexPageLoad"/>
6667
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/>
6768
<click selector="{{AdminMainActionsSection.add}}" stepKey="clickCreateNewOrder"/>
6869
<waitForPageLoad stepKey="waitForCustomerGridLoad"/>
70+
<!--Clear grid filters-->
71+
<conditionalClick selector="{{AdminOrderCustomersGridSection.resetButton}}" dependentSelector="{{AdminOrderCustomersGridSection.resetButton}}" visible="true" stepKey="clearExistingCustomerFilters"/>
72+
<waitForPageLoad stepKey="waitPageLoadAfterFilterReset"/>
6973
<fillField userInput="{{customer.email}}" selector="{{AdminOrderCustomersGridSection.emailFilter}}" stepKey="filterEmail"/>
7074
<click selector="{{AdminOrderCustomersGridSection.searchButton}}" stepKey="applyFilter"/>
7175
<waitForPageLoad stepKey="waitForFilteredCustomerGridLoad"/>
7276
<click selector="{{AdminOrderCustomersGridSection.firstRow}}" stepKey="clickOnCustomer"/>
73-
<waitForPageLoad stepKey="waitForCreateOrderPageLoad" />
77+
<waitForPageLoad stepKey="waitForCreateOrderPageLoad"/>
78+
<!-- Select store view if appears -->
79+
<conditionalClick selector="{{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" dependentSelector="{{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" visible="true" stepKey="selectStoreViewIfAppears"/>
80+
<waitForPageLoad stepKey="waitForCreateOrderPageLoadAfterStoreSelect"/>
7481
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/>
7582
</actionGroup>
7683
<!--Add a simple product to order-->

app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoTotalSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<section name="AdminCreditMemoTotalSection">
1212
<element name="total" type="text" selector="//table[contains(@class,'order-subtotal-table')]/tbody/tr/td[contains(text(), '{{total}}')]/following-sibling::td/span/span[contains(@class, 'price')]" parameterized="true"/>
1313
<element name="refundShipping" type="input" selector=".order-subtotal-table tbody input[name='creditmemo[shipping_amount]']"/>
14-
<element name="updateTotals" type="button" selector=".update-totals-button"/>
14+
<element name="updateTotals" type="button" selector=".update-totals-button" timeout="30"/>
1515
<element name="submitRefundOffline" type="button" selector=".order-totals-actions button[title='Refund Offline']" timeout="30"/>
1616
</section>
1717
</sections>

app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingCreditMemoTotalsTest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<actionGroup ref="AdminOrderFillBraintreeCreditCardActionGroup" stepKey="fillBraintreeCreditCard"/>
7070
<!--Submit order-->
7171
<click selector="{{AdminOrderFormActionSection.submitOrder}}" stepKey="submitOrder"/>
72+
<waitForPageLoad stepKey="waitForSubmitOrder"/>
7273
<see selector="{{AdminMessagesSection.success}}" userInput="You created the order."
7374
stepKey="seeSuccessMessage"/>
7475

@@ -88,7 +89,7 @@
8889
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Memo" stepKey="seeNewMemoPageTitle"/>
8990
<fillField selector="{{AdminCreditMemoTotalSection.refundShipping}}" userInput="0" stepKey="setRefundShipping"/>
9091
<click selector="{{AdminCreditMemoTotalSection.updateTotals}}" stepKey="clickUpdateTotals"/>
91-
<waitForPageLoad stepKey="waitForUpdateTotals"/>
92+
<waitForLoadingMaskToDisappear stepKey="waitForUpdateTotals"/>
9293
<click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickRefundOffline"/>
9394
<see selector="{{AdminMessagesSection.success}}" userInput="You created the credit memo."
9495
stepKey="seeCreatedCreditMemoSuccessMessage"/>

0 commit comments

Comments
 (0)