Skip to content

Commit bdbf070

Browse files
committed
MC-40013: Payment Methods radio-buttons disappear after a "Create New Order" page in Admin panel is reload
1 parent 23eea09 commit bdbf070

File tree

3 files changed

+80
-0
lines changed

3 files changed

+80
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AssertAdminPaymentMethodRadioButtonExistsOnCreateOrderPageActionGroup">
11+
<annotations>
12+
<description>Checks the payment method radio button presents on the Admin Create Order page.</description>
13+
</annotations>
14+
<conditionalClick selector="{{AdminOrderFormPaymentSection.linkPaymentOptions}}" dependentSelector="{{AdminOrderFormPaymentSection.linkPaymentOptions}}" visible="true" stepKey="clickGetAvailablePaymentMethods"/>
15+
<waitForElementVisible selector="{{AdminOrderFormPaymentSection.paymentBlock}}" stepKey="waitForPaymentOptions"/>
16+
<seeElement selector="{{AdminOrderFormPaymentSection.paymentLabelWithRadioButton}}" stepKey="seeLabelWithRadioButton"/>
17+
</actionGroup>
18+
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
<element name="purchaseOrderOption" type="radio" selector="#p_method_purchaseorder" timeout="30"/>
3030
<element name="purchaseOrderNumber" type="input" selector="#po_number"/>
3131
<element name="freePaymentLabel" type="text" selector="#order-billing_method_form label[for='p_method_free']"/>
32+
<element name="paymentLabelWithRadioButton" type="text" selector="#order-billing_method_form .admin__control-radio+label"/>
3233
</section>
3334
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminCheckingPaymentMethodRadioButtonPresentAfterReloadOrderPageTest">
11+
<annotations>
12+
<features value="Sales"/>
13+
<stories value="Create order in Admin"/>
14+
<title value="Checking payment method radio button is presented after reloading the order page"/>
15+
<description value="Checking payment method radio button is presented after reloading the order page"/>
16+
<severity value="AVERAGE"/>
17+
<testCaseId value="MC-40878"/>
18+
<useCaseId value="MC-40013"/>
19+
<group value="sales"/>
20+
</annotations>
21+
<before>
22+
<!-- Enable Check/Money order payment method -->
23+
<magentoCLI command="config:set {{EnablePaymentCheckMOConfigData.path}} {{EnablePaymentCheckMOConfigData.value}}" stepKey="enableCheckMoneyOrderPayment"/>
24+
<!-- Enable Bank Transfer Payment method -->
25+
<magentoCLI command="config:set {{EnablePaymentBankTransferConfigData.path}} {{EnablePaymentBankTransferConfigData.value}}" stepKey="enableBankTransferPayment"/>
26+
<!-- Create simple product -->
27+
<createData entity="SimpleProduct2" stepKey="createProduct"/>
28+
<!-- Create customer -->
29+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
30+
<!-- Login to Admin page -->
31+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
32+
</before>
33+
<after>
34+
<!-- Disable Bank Transfer Payment method -->
35+
<magentoCLI command="config:set {{DisablePaymentBankTransferConfigData.path}} {{DisablePaymentBankTransferConfigData.value}}" stepKey="disableBankTransferPayment"/>
36+
<!-- Delete entities -->
37+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
38+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
39+
<!-- Logout from Admin page -->
40+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
41+
</after>
42+
43+
<!-- Create new order -->
44+
<actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer">
45+
<argument name="customer" value="$createCustomer$"/>
46+
</actionGroup>
47+
48+
<!-- Add Simple product to order -->
49+
<actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addSimpleProductToTheOrder">
50+
<argument name="product" value="$createProduct$"/>
51+
</actionGroup>
52+
53+
<!-- Assert label with radio button presents on the page -->
54+
<actionGroup ref="AssertAdminPaymentMethodRadioButtonExistsOnCreateOrderPageActionGroup" stepKey="assertPaymentRadioButtonIsPresent"/>
55+
56+
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
57+
58+
<!-- Assert label with radio button presents after reload the page -->
59+
<actionGroup ref="AssertAdminPaymentMethodRadioButtonExistsOnCreateOrderPageActionGroup" stepKey="assertPaymentRadioButtonIsPresentAfterReload"/>
60+
</test>
61+
</tests>

0 commit comments

Comments
 (0)