Skip to content

Commit 1b21f6f

Browse files
author
Mariana Lashch
committed
MAGETWO-94472: [2.3] Unable to create credit memo for order placed via online payment with taxes and discounts
- change test according to specific of B2B elements
1 parent 86f0ce2 commit 1b21f6f

File tree

2 files changed

+18
-24
lines changed

2 files changed

+18
-24
lines changed

app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscount.xml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,21 @@
7070
<actionGroup ref="logout" stepKey="logout"/>
7171
</after>
7272

73-
<!-- Create a cart price rule for Fixed amount discount for whole cart -->
74-
<actionGroup ref="AdminCreateCartPriceRuleForRetailerActionGroup" stepKey="createCartPriceRule"/>
73+
<!-- Create a cart price rule with 10% discount for whole cart -->
74+
<click selector="{{AdminMenuSection.marketing}}" stepKey="clickOnMarketing" />
75+
<waitForPageLoad stepKey="waitForMarketing" time="3"/>
76+
<click selector="{{CartPriceRulesSubmenuSection.cartPriceRules}}" stepKey="clickOnCartPriceRules"/>
77+
<waitForPageLoad stepKey="waitForCartPriceRules" time="3"/>
78+
<click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/>
79+
<fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{SimpleSalesRule.name}}" stepKey="fillRuleName"/>
80+
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsites"/>
81+
<actionGroup ref="selectRetailerCustomerGroup" stepKey="selectRetailerCustomerGroup"/>
82+
<click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/>
83+
<selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="Percent of product price discount" stepKey="selectActionType"/>
84+
<fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="10" stepKey="fillDiscountAmount"/>
85+
<click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/>
86+
<waitForPageLoad stepKey="waitForCartRuleLoad" time="3"/>
87+
<see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>
7588

7689
<!--Set Taxable Goods for Shipping Tax Class-->
7790
<actionGroup ref="changeShippingTaxClass" stepKey="changeShippingTaxClass"/>
@@ -100,15 +113,14 @@
100113
<!--Submit Order-->
101114
<click stepKey="submitOrder" selector="{{NewOrderSection.submitOrder}}"/>
102115
<waitForPageLoad stepKey="waitForSubmitOrder" time="5"/>
103-
<see selector="{{NewOrderSection.successMessage}}" userInput="You created the order." stepKey="seeNewOrder" after="waitForSubmitOrder"/>
104-
116+
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the order." stepKey="seeOrderSuccessMessage" after="waitForSubmitOrder"/>
105117

106118
<!-- Create New invoice-->
107119
<actionGroup ref="adminFastCreateInvoice" stepKey="createInvoice"/>
108120

109-
<!--Get access to Credit Memo page from Invocie page-->
121+
<!--Get access to Credit Memo page from Invoice page-->
110122
<click selector="{{AdminInvoiceMainActionsSection.openNewCreditMemoFromInvoice}}" stepKey="clickCreateNewCreditMemo"/>
111123
<waitForPageLoad stepKey="waitForLoadNewCreditMemoPage" time="5"/>
112-
<see selector="{{AdminCreditMemoOrderInformationSection.orderId}}" userInput="New Memo for" stepKey="seeNewCreditMemo" after="waitForLoadNewCreditMemoPage"/>
124+
<see selector="{{AdminCreditMemoOrderInformationSection.orderStatus}}" userInput="Processing" stepKey="seeNewCreditMemo"/>
113125
</test>
114126
</tests>

app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCreateCartPriceRuleActionGroup.xml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,6 @@
2424
<see selector="{{AdminCartPriceRulesFormSection.successMessage}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>
2525
</actionGroup>
2626

27-
<!--Create Cart price Rule for Retailer customer-->
28-
<actionGroup name="AdminCreateCartPriceRuleForRetailerActionGroup">
29-
<click selector="{{AdminMenuSection.marketing}}" stepKey="clickOnMarketing" />
30-
<waitForPageLoad stepKey="waitForMarketing" time="3"/>
31-
<click selector="{{CartPriceRulesSubmenuSection.cartPriceRules}}" stepKey="clickOnCartPriceRules"/>
32-
<waitForPageLoad stepKey="waitForCartPriceRules" time="5"/>
33-
<click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/>
34-
<fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{SimpleSalesRule.name}}" stepKey="fillRuleName"/>
35-
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsites"/>
36-
<selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" userInput="Retailer" stepKey="selectCustomerGroup"/>
37-
<click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/>
38-
<selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="Percent of product price discount" stepKey="selectActionType"/>
39-
<fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="10" stepKey="fillDiscountAmount"/>
40-
<click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/>
41-
<waitForPageLoad stepKey="waitForCartRuleLoad" time="5"/>
42-
<see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>
43-
</actionGroup>
44-
4527
<!--Delete Cart price Rule for Retailer customer-->
4628
<actionGroup name="AdminDeleteCartPriceRuleForRetailerActionGroup">
4729
<click selector="{{AdminMenuSection.marketing}}" stepKey="clickOnMarketing" />

0 commit comments

Comments
 (0)