Skip to content

Commit bc026a0

Browse files
committed
#AC-9653::UPS SOAP and REST support in 2.4.7-beta3-static and functional tests failure fixes
1 parent 939c70a commit bc026a0

File tree

3 files changed

+58
-3
lines changed

3 files changed

+58
-3
lines changed

app/code/Magento/Ups/Test/Mftf/Section/AdminShippingMethodsUpsSection.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminShippingMethodsUpsSection">
1212
<element name="carriersUpsTab" type="button" selector="#carriers_ups-head"/>
13+
<element name="carriersUpsType" type="select" selector="#carriers_ups_type"/>
14+
<element name="selectedUpsType" type="text" selector="#carriers_ups_type option[selected]"/>
1315
<element name="carriersUPSActive" type="input" selector="#carriers_ups_active_inherit"/>
16+
<element name="carriersUPSTypeSystem" type="input" selector="#carriers_ups_type_inherit"/>
1417
<element name="carriersUPSAccountLive" type="input" selector="#carriers_ups_is_account_live_inherit"/>
18+
<element name="carriersUPSGatewayXMLUrl" type="input" selector="#carriers_ups_gateway_xml_url_inherit"/>
1519
<element name="carriersUPSGatewayUrl" type="input" selector="#carriers_ups_gateway_url_inherit"/>
1620
<element name="carriersUPSModeXML" type="input" selector="#carriers_ups_mode_xml_inherit"/>
1721
<element name="carriersUPSOriginShipment" type="input" selector="#carriers_ups_origin_shipment_inherit"/>
@@ -21,6 +25,7 @@
2125
<element name="carriersUPSShipmentRequestType" type="input" selector="#carriers_ups_shipment_requesttype_inherit"/>
2226
<element name="carriersUPSContainer" type="input" selector="#carriers_ups_container_inherit"/>
2327
<element name="carriersUPSDestType" type="input" selector="#carriers_ups_dest_type_inherit"/>
28+
<element name="carriersUPSTrackingXmlUrl" type="input" selector="#carriers_ups_tracking_xml_url_inherit"/>
2429
<element name="carriersUPSTrackingUrl" type="input" selector="#carriers_ups_tracking_url_inherit"/>
2530
<element name="carriersUPSUnitOfMeasure" type="input" selector="#carriers_ups_unit_of_measure_inherit"/>
2631
<element name="carriersUPSMaxPackageWeight" type="input" selector="#carriers_ups_max_package_weight_inherit"/>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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="DefaultConfigForUPSTypeTest">
11+
<annotations>
12+
<features value="Ups"/>
13+
<stories value="UPS configuration"/>
14+
<title value="Default Configuration for UPS Type"/>
15+
<stories value="UPS"/>
16+
<description value="Default Configuration for UPS Type"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MAGETWO-99012"/>
19+
<useCaseId value="MAGETWO-98947"/>
20+
<group value="ups"/>
21+
<group value="cloud"/>
22+
</annotations>
23+
<before>
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25+
</before>
26+
<after>
27+
<!--Collapse UPS tab and logout-->
28+
<comment userInput="Collapse UPS tab and logout" stepKey="collapseTabAndLogout"/>
29+
<click selector="{{AdminShippingMethodsUpsSection.carriersUpsTab}}" stepKey="collapseTab"/>
30+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
31+
</after>
32+
<!-- Set shipping methods UPS type to default -->
33+
<comment userInput="Set shipping methods UPS type to default" stepKey="setToDefaultShippingMethodsUpsType"/>
34+
<!--<createData entity="ShippingMethodsUpsTypeSetDefault" stepKey="setShippingMethodsUpsTypeToDefault"/>-->
35+
<!-- Navigate to Stores -> Configuration -> Sales -> Shipping Methods Page -->
36+
<comment userInput="Navigate to Stores -> Configuration -> Sales -> Shipping Methods Page" stepKey="goToAdminShippingMethodsPage"/>
37+
<amOnPage url="{{AdminShippingMethodsConfigPage.url}}" stepKey="navigateToAdminShippingMethodsPage"/>
38+
<waitForPageLoad stepKey="waitPageToLoad"/>
39+
<!-- Expand 'UPS' tab -->
40+
<comment userInput="Expand UPS tab" stepKey="expandUpsTab"/>
41+
<conditionalClick selector="{{AdminShippingMethodsUpsSection.carriersUpsTab}}" dependentSelector="{{AdminShippingMethodsUpsSection.carriersUpsType}}" visible="false" stepKey="expandTab"/>
42+
<waitForElementVisible selector="{{AdminShippingMethodsUpsSection.carriersUpsType}}" stepKey="waitTabToExpand"/>
43+
<!-- Assert that selected UPS type is 'United Parcel Service REST' -->
44+
<comment userInput="Check that selected UPS type is 'United Parcel Service REST'" stepKey="assertResUpsType"/>
45+
<uncheckOption selector="{{AdminShippingMethodsUpsSection.carriersUPSTypeSystem}}" stepKey="uncheckDefault" ></uncheckOption>
46+
<selectOption userInput="UPS_REST" selector="{{AdminShippingMethodsUpsSection.carriersUpsType}}" stepKey="selectUpsOption"/>
47+
<grabValueFrom selector="{{AdminShippingMethodsUpsSection.carriersUpsType}}" stepKey="grabSelectedOptionValue"/>
48+
<assertEquals stepKey="assertRestUpsType">
49+
<actualResult type="const">($grabSelectedOptionValue)</actualResult>
50+
<expectedResult type="string">UPS_REST</expectedResult>
51+
</assertEquals>
52+
</test>
53+
</tests>

dev/tests/integration/testsuite/Magento/Ups/Model/CarrierTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ public function testGetShipConfirmUrl()
111111
} else {
112112
$this->assertEquals('https://wwwcie.ups.com/api/shipments/v1/ship', $this->carrier->getShipConfirmUrl());
113113
}
114-
115114
}
116115

117116
/**
@@ -132,7 +131,6 @@ public function testGetShipConfirmUrlLive()
132131
$this->carrier->getShipConfirmUrl()
133132
);
134133
}
135-
136134
}
137135

138136
/**
@@ -416,7 +414,6 @@ public function testRequestToShipment(): void
416414
* @magentoConfigFixture default_store shipping/origin/country_id GB
417415
* @magentoConfigFixture default_store carriers/ups/active 1
418416
* @magentoConfigFixture default_store carriers/ups/type UPS_REST
419-
420417
* @magentoConfigFixture default_store carriers/ups/shipper_number 12345
421418
* @magentoConfigFixture default_store carriers/ups/origin_shipment Shipments Originating in the European Union
422419
* @magentoConfigFixture default_store carriers/ups/username user

0 commit comments

Comments
 (0)