Skip to content

Commit 0be8207

Browse files
committed
Merge branch 'ACEQ-6377' into ACQE-7152-mainline-functional-tests-deployment
2 parents cbce811 + f5ca537 commit 0be8207

File tree

2 files changed

+96
-2
lines changed

2 files changed

+96
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -34,5 +34,6 @@
3434
<element name="storedCard" type="radio" selector="#p_method_payflowpro_cc_vault" timeout="30"/>
3535
<element name="selectPaymentMethod" type="radio" selector="//div[@id='order-billing_method_form']//input[@title='Check / Money order']"/>
3636
<element name="checkMoneyOrderText" type="text" selector="//div[@id='order-billing_method_form']//dl//dt//label[contains(text(),'Check / Money order')]"/>
37+
<element name="upsOption" type="radio" selector="//label[contains(text(),'UPS Worldwide Expedited -')]//ancestor::label[@class='admin__field-label']"/>
3738
</section>
3839
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminPlaceOrderUsingUPSOnlineShippingCarrierForRegisteredCustomerTest">
12+
<annotations>
13+
<stories value="Place order using UPS Shipping carrier"/>
14+
<title value="Use UPS online shipping carrier during order placement in admin for registered customer Test"/>
15+
<description value="Select UPS online shipping method while order placement from backend for a registered customer"/>
16+
<testCaseId value="AC-4884"/>
17+
<severity value="MAJOR"/>
18+
<features value="Shipping"/>
19+
<group value="3rd_party_integration"/>
20+
<group value="pr_exclude"/>
21+
</annotations>
22+
<before>
23+
<!--Login as Admin-->
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdminToConfig"/>
25+
<!-- Create product -->
26+
<createData entity="SimpleProduct" stepKey="createSimpleProduct">
27+
<field key="price">100.00</field>
28+
</createData>
29+
<!--Create UK customer-->
30+
<createData entity="UKCustomer" stepKey="createUKCustomer"/>
31+
<!-- Enabling Check/Money Order Payment Method -->
32+
<magentoCLI command="config:set {{EnableCheckMoneyOrderPaymentMethod.path}} {{EnableCheckMoneyOrderPaymentMethod.value}}" stepKey="enableCheckMoneyOrderPaymentMethod"/>
33+
<!--Set Shipping settings origin data-->
34+
<actionGroup ref="AdminSetShippingOriginConfigActionGroup" stepKey="setShippingOriginConfigurationData">
35+
<argument name="country" value="United States"/>
36+
<argument name="state" value="California"/>
37+
<argument name="postcode" value="90034"/>
38+
</actionGroup>
39+
<!--Navigate to shipping method configuration for enabling UPS-->
40+
<actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPageForEnablingUPS"/>
41+
<!--Configure UPS shipping method with enable for checkout = Yes-->
42+
<actionGroup ref="AdminEnableUPSActionGroup" stepKey="enableUPSShippingMethod">
43+
<argument name="shipping" value="UPSShippingMethod"/>
44+
</actionGroup>
45+
<!--Cache flush-->
46+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCachePostConfiguring">
47+
<argument name="tags" value="config full_page"/>
48+
</actionGroup>
49+
</before>
50+
<after>
51+
<!--Reset Shipping Origin configurations to default | default address - US California-->
52+
<actionGroup ref="AdminResetShippingOriginConfigurationActionGroup" stepKey="resetShippingOriginConfig"/>
53+
<!--delete UK customer-->
54+
<deleteData createDataKey="createUKCustomer" stepKey="deleteCustomer"/>
55+
<!--delete product-->
56+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
57+
<!--Configure UPS shipping method with enable for checkout = No-->
58+
<actionGroup ref="AdminUPSDisableActionGroup" stepKey="disableUPSShippingMethod"/>
59+
<!--Logout Admin-->
60+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminToRollBackConfig"/>
61+
</after>
62+
<!--Navigate to create new order with existing customer-->
63+
<actionGroup ref="AdminNavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer">
64+
<argument name="customer" value="$$createUKCustomer$$"/>
65+
</actionGroup>
66+
<!--Admin add simple product to order-->
67+
<actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addSimpleProductToOrder">
68+
<argument name="product" value="$$createSimpleProduct$$"/>
69+
</actionGroup>
70+
<!--Admin add new UK billing address while creating order-->
71+
<selectOption userInput="Add New Address" selector="{{AdminOrderFormBillingAddressSection.selectAddress}}" stepKey="addNewBillingAddress" />
72+
<actionGroup ref="AdminFillAddressInformationInOrderActionGroup" stepKey="FillOrderNewShippingAddress">
73+
<argument name="customer" value="$$createUKCustomer$$"/>
74+
<argument name="address" value="UK_Not_Default_Address"/>
75+
</actionGroup>
76+
<!--Scroll to element & click to reflect details as per defined address & customer-->
77+
<scrollTo selector="{{AdminOrderFormBillingAddressSection.Phone}}" stepKey="scrollToElementInteractable"/>
78+
<click selector="{{AdminOrderFormPaymentSection.linkPaymentOptions}}" stepKey="clickToReflectDetailsAccordingToInputData"/>
79+
<!--Checkout select Check/Money Order payment-->
80+
<actionGroup ref="SelectCheckMoneyPaymentMethodActionGroup" stepKey="selectCheckMoneyPayment"/>
81+
<!--click on get shipping methods link-->
82+
<click selector="{{AdminOrderFormPaymentSection.header}}" stepKey="unfocus"/>
83+
<waitForLoadingMaskToDisappear stepKey="waitForJavascriptToFinish"/>
84+
<click selector="{{AdminOrderFormPaymentSection.getShippingMethods}}" stepKey="clickShippingMethods"/>
85+
<waitForElementVisible selector="{{AdminOrderFormPaymentSection.upsOption}}" stepKey="waitForShippingOptions"/>
86+
<click selector="{{AdminOrderFormPaymentSection.upsOption}}" stepKey="selectUPSMethod"/>
87+
<waitForAjaxLoad stepKey="waitForAjaxLoadPostSelectingUPSShippingMethod"/>
88+
<!--Submit Order and verify information-->
89+
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/>
90+
<!--Assert order created-->
91+
<actionGroup ref="VerifyCreatedOrderInformationActionGroup" stepKey="checkOrderSuccessfullyCreated"/>
92+
</test>
93+
</tests>

0 commit comments

Comments
 (0)