Skip to content

Commit f2db492

Browse files
ACQE-6125: Create Shipping Label with 2 packages when Creating Shipment for FedEx
1 parent a98a64a commit f2db492

16 files changed

+482
-39
lines changed

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,4 +1519,12 @@
15191519
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
15201520
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
15211521
</entity>
1522+
<entity name="ApiSimpleProductWithPrice1" type="product2" extends="ApiSimpleOne">
1523+
<data key="price">1</data>
1524+
<data key="weight">1</data>
1525+
</entity>
1526+
<entity name="SimpleProductWithWeight" extends="SimpleProduct50" type="product">
1527+
<data key="weight">1</data>
1528+
<data key="price">10</data>
1529+
</entity>
15221530
</entities>
Lines changed: 45 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,45 @@
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-
9-
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11-
<entity name="Countries" type="countryArray">
12-
<array key="country">
13-
<item>Bahamas</item>
14-
</array>
15-
</entity>
16-
<entity name="DefaultCountriesWithRequiredRegions" type="countryArray">
17-
<array key="country">
18-
<item>Australia</item>
19-
<item>Brazil</item>
20-
<item>Canada</item>
21-
<item>Croatia</item>
22-
<item>Estonia</item>
23-
<item>India</item>
24-
<item>Latvia</item>
25-
<item>Lithuania</item>
26-
<item>Romania</item>
27-
<item>Spain</item>
28-
<item>Switzerland</item>
29-
<item>United States</item>
30-
<item>Australia</item>
31-
</array>
32-
</entity>
33-
<entity name="CustomCountryWithRequiredRegion" type="countryArray">
34-
<array key="country">
35-
<item>United Kingdom</item>
36-
</array>
37-
</entity>
38-
</entities>
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+
9+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="Countries" type="countryArray">
12+
<array key="country">
13+
<item>Bahamas</item>
14+
</array>
15+
</entity>
16+
<entity name="DefaultCountriesWithRequiredRegions" type="countryArray">
17+
<array key="country">
18+
<item>Australia</item>
19+
<item>Brazil</item>
20+
<item>Canada</item>
21+
<item>Croatia</item>
22+
<item>Estonia</item>
23+
<item>India</item>
24+
<item>Latvia</item>
25+
<item>Lithuania</item>
26+
<item>Romania</item>
27+
<item>Spain</item>
28+
<item>Switzerland</item>
29+
<item>United States</item>
30+
<item>Australia</item>
31+
</array>
32+
</entity>
33+
<entity name="CustomCountryWithRequiredRegion" type="countryArray">
34+
<array key="country">
35+
<item>United Kingdom</item>
36+
</array>
37+
</entity>
38+
<entity name="EuropeanCountry" type="countryArray">
39+
<array key="country">
40+
<item>France</item>
41+
<item>Germany</item>
42+
<item>United Kingdom</item>
43+
</array>
44+
</entity>
45+
</entities>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingMethodsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@
3636
<element name="shippingMethodDhlMedicalExpress" type="radio" selector="#checkout-shipping-method-load input[value='dhl_Q']"/>
3737
<element name="shippingMethodFreeShippingLabel" type="text" selector="#label_carrier_freeshipping_freeshipping"/>
3838
<element name="shippingDHLErrorMessage" type="text" selector="#checkout-shipping-method-load .table-checkout-shipping-method tr.row-error .error div"/>
39+
<element name="smartPostShippingMethod" type="radio" selector="#checkout-shipping-method-load input[value='fedex_SMART_POST']"/>
3940
</section>
4041
</sections>

app/code/Magento/Config/Test/Mftf/Section/StoreConfigSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
<element name="Country" type="select" selector="#general_store_information_country_id"/>
1717
<element name="fillVATNumber" type="input" selector="#general_store_information_merchant_vat_number"/>
1818
<element name="validateVATNumber" type="button" selector="#general_store_information_validate_vat_number" timeout="30"/>
19+
<element name="storeName" type="input" selector="#general_store_information_name"/>
20+
<element name="storePhoneNumber" type="input" selector="#general_store_information_phone"/>
1921
</section>
2022
</sections>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminCreateShipmentPackageActionGroup">
12+
<arguments>
13+
<argument name="bundleProductName" type="string"/>
14+
<argument name="configurableProductName" type="string"/>
15+
</arguments>
16+
<waitForElementClickable selector="{{AdminShipmentCreatePackageMainSection.addPackage}}" stepKey="waitForAddPackageButtonVisible"/>
17+
<click selector="{{AdminShipmentCreatePackageMainSection.addPackage}}" stepKey="clickOnAddPackageButton"/>
18+
<waitForElementClickable selector="{{AdminShipmentCreatePackageMainSection.addProductsToSecondPackage}}" stepKey="waitForAddProductsToPackageVisible"/>
19+
<click selector="{{AdminShipmentCreatePackageMainSection.addProductsToSecondPackage}}" stepKey="clickAddProducts"/>
20+
<waitForElementVisible selector="{{AdminShipmentCreatePackageProductGridSection.concreteProductCheckbox('bundleProductName')}}" stepKey="waitForProductBeVisible"/>
21+
<checkOption selector="{{AdminShipmentCreatePackageProductGridSection.concreteProductCheckbox('bundleProductName')}}" stepKey="selectBundleProductCheckbox"/>
22+
<checkOption selector="{{AdminShipmentCreatePackageProductGridSection.concreteProductCheckbox('configurableProductName')}}" stepKey="selectConfigurableProductCheckbox"/>
23+
<click selector="{{AdminShipmentCreatePackageMainSection.addSelectedProductToSecondPackage}}" stepKey="addingSecondPackageForMultipleProduct"/>
24+
<waitForElementNotVisible selector="{{AdminShipmentCreatePackageMainSection.saveButtonDisabled}}" stepKey="waitForBeEnabled"/>
25+
<click selector="{{AdminShipmentCreatePackageMainSection.save}}" stepKey="clickSave"/>
26+
<waitForPageLoad stepKey="waitForSaving"/>
27+
<waitForText selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The shipment has been created. You created the shipping label." stepKey="seeShipmentCreateSuccess"/>
28+
</actionGroup>
29+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminEnableFedExConfigurationActionGroup">
12+
<magentoCLI command="config:set {{AdminFedexEnableForCheckoutConfigData.path}} {{AdminFedexEnableForCheckoutConfigData.value}}" stepKey="enableCheckout"/>
13+
<magentoCLI command="config:set {{AdminFedexEnableSandboxModeConfigData.path}} {{AdminFedexEnableSandboxModeConfigData.value}}" stepKey="enableSandbox"/>
14+
<magentoCLI command="config:set {{AdminFedexEnableDebugConfigData.path}} {{AdminFedexEnableDebugConfigData.value}}" stepKey="enableDebug"/>
15+
<magentoCLI command="config:set {{AdminFedexEnableShowMethodConfigData.path}} {{AdminFedexEnableShowMethodConfigData.value}}" stepKey="enableShowMethod"/>
16+
<magentoCLI command="config:set {{AdminFedexAccount.path}} {{_CREDS.magento/carriers_fedex_account}}" stepKey="accountSetting"/>
17+
<magentoCLI command="config:set {{AdminFedexHubId.path}} {{_CREDS.magento/carriers_fedex_smartpost_hubid}}" stepKey="accountHub"/>
18+
<magentoCLI command="config:set {{AdminFedexApiKey.path}} {{_CREDS.magento/carriers_fedex_api_key}}" stepKey="accountApiKey"/>
19+
<magentoCLI command="config:set {{AdminFedexSecretKey.path}} {{_CREDS.magento/carriers_fedex_secret_key}}" stepKey="accountSecretKey"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminSetShippingOriginOtherConfigActionGroup">
12+
<magentoCLI command="config:set {{AdminShippingSettingsOriginCityConfigData.path}} '{{US_Address_CA.city}}'" stepKey="setOriginCity"/>
13+
<magentoCLI command="config:set {{AdminShippingSettingsOriginZipCodeConfigData.path}} {{US_Address_CA.postcode}}" stepKey="setOriginZipCode"/>
14+
<magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddressConfigData.path}} '{{US_Address_CA.street[0]}}'" stepKey="setOriginStreetAddress"/>
15+
<magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddress2ConfigData.path}} '{{US_Address_CA.street[1]}}'" stepKey="setOriginStreetAddress2"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 18 additions & 0 deletions
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminShipmentCreateMultipleShippingLabelActionGroup" extends="AdminShipmentCreateShippingLabelActionGroup">
12+
<remove keyForRemoval="waitForBeEnabled"/>
13+
<remove keyForRemoval="clickSave"/>
14+
<remove keyForRemoval="waitForLoadingMaskDisappear"/>
15+
<remove keyForRemoval="waitForSaving"/>
16+
<remove keyForRemoval="seeShipmentCreateSuccess"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CheckShipmentPackageActionGroup">
12+
<arguments>
13+
<argument name="packageNumber" type="string"/>
14+
</arguments>
15+
<waitForElementVisible selector="{{AdminShipmentTrackingInformationShippingSection.getPackage(packageNumber)}}" stepKey="waitForPackageName"/>
16+
<grabTextFrom selector="{{AdminShipmentTrackingInformationShippingSection.getPackage(packageNumber)}}" stepKey="grabPackageName"/>
17+
<assertEquals message="ExpectedPackageName" stepKey="assertPackage">
18+
<actualResult type="variable">grabPackageName</actualResult>
19+
<expectedResult type="string">Package {{packageNumber}}</expectedResult>
20+
</assertEquals>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="SelectEuropeanUnionCountryActionGroup">
12+
<annotations>
13+
<description>Selects the provided Countries under 'European Union Countries' on the 'General' section of the 'Configuration' page. Clicks on the Save button.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="countries" type="entity"/>
17+
</arguments>
18+
<!--Open country options section-->
19+
<waitForElementClickable selector="{{CountryOptionsSection.countryOptions}}" stepKey="waitForCountryOptionClickable"/>
20+
<conditionalClick selector="{{CountryOptionsSection.countryOptions}}" dependentSelector="{{CountryOptionsSection.countryOptionsOpen}}" visible="false" stepKey="clickOnStoreInformation"/>
21+
<waitForElementVisible selector="{{CountryOptionsConfigSection.checkboxEuropeanUnion}}" stepKey="waitMessagesDropdownAppears"/>
22+
<uncheckOption selector="{{CountryOptionsConfigSection.checkboxEuropeanUnion}}" stepKey="uncheckEuropeanUnionCountry"/>
23+
<selectOption selector="{{CountryOptionsConfigSection.selectEuropeanUnion}}" parameterArray="[{{countries.country}}]" stepKey="selectEuropeanUnionCountry"/>
24+
<click selector="{{AdminMainActionsSection.save}}" stepKey="saveConfig"/>
25+
<waitForPageLoad stepKey="waitForSavingConfig"/>
26+
</actionGroup>
27+
</actionGroups>

0 commit comments

Comments
 (0)