Skip to content

Commit d72a178

Browse files
committed
Merge branch 'ACQE-6584' into ACQE-5920-ver1
2 parents 6b8b96f + 9fc0c7c commit d72a178

File tree

4 files changed

+191
-2
lines changed

4 files changed

+191
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
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"/>
3939
<element name="smartPostShippingMethod" type="radio" selector="#checkout-shipping-method-load input[value='fedex_SMART_POST']"/>
40+
<element name="shippingMethodDhlExpressEasyLabel" type="text" selector="#label_method_8_dhl"/>
4041
<element name="shippingMethodFedexLabel" type="text" selector="#label_carrier_null_fedex"/>
4142
<element name="smartPostFedexPrice" type="text" selector="//tr[td[@id='label_carrier_SMART_POST_fedex']]//td[contains(@class, 'col-price')]//span[contains(@class, 'price') and contains(@data-bind, 'price_excl_tax')]"/>
4243
<element name="groundFedexPrice" type="text" selector="//tr[td[@id='label_method_FEDEX_GROUND_fedex']]//td[contains(@class, 'col-price')]//span[contains(@class, 'price') and contains(@data-bind, 'price_excl_tax')]"/>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="AdminEnableDHLEUConfigurationActionGroup">
12+
<annotations>
13+
<description>Enables DHL EU shipping method on configuration page.</description>
14+
</annotations>
15+
<magentoCLI command="config:set {{AdminDHLEnableConfigData.path}} {{AdminDHLEnableConfigData.value}}" stepKey="enableDHL"/>
16+
<magentoCLI command="config:set {{AdminCarriersDHLId.path}} {{AdminCarriersDHLEUId.value}}" stepKey="CarrierDHLID"/>
17+
<magentoCLI command="config:set {{AdminCarriersDHLPassword.path}} {{AdminCarriersDHLEUPassword.value}}" stepKey="DHLPassword"/>
18+
<magentoCLI command="config:set {{AdminCarriersDHLAccount.path}} {{AdminCarriersDHLEUAccount.value}}" stepKey="DHLAccount"/>
19+
<magentoCLI command="config:set {{AdminEnableDHLShowMethod.path}} {{AdminEnableDHLShowMethod.value}}" stepKey="enableDHLShowMethod"/>
20+
<magentoCLI command="config:set {{AdminEnableDHLDebug.path}} {{AdminEnableDHLDebug.value}}" stepKey="enableDHLDebug"/>
21+
<magentoCLI command="config:set {{AdminEnableSandboxMode.path}} {{AdminEnableSandboxMode.value}}" stepKey="enableSandboxMode"/>
22+
</actionGroup>
23+
</actionGroups>

app/code/Magento/Config/Test/Mftf/Data/DHLConfigData.xml

Lines changed: 17 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

@@ -94,4 +94,19 @@
9494
<data key="label">Pounds</data>
9595
<data key="value">L</data>
9696
</entity>
97+
<entity name="AdminCarriersDHLEUId">
98+
<data key="path">carriers/dhl/id</data>
99+
<data key="scope_id">1</data>
100+
<data key="value">EvgeniyDE</data>
101+
</entity>
102+
<entity name="AdminCarriersDHLEUPassword">
103+
<data key="path">carriers/dhl/password</data>
104+
<data key="scope_id">1</data>
105+
<data key="value">aplNb6Rop</data>
106+
</entity>
107+
<entity name="AdminCarriersDHLEUAccount">
108+
<data key="path">carriers/dhl/account</data>
109+
<data key="scope_id">1</data>
110+
<data key="value">130000279</data>
111+
</entity>
97112
</entities>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
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="StorefrontRegisteredCustomerUsesDHLEUOnlineShippingCarrierOnCheckoutTest">
12+
<annotations>
13+
<stories value="DHL Shipping Carrier On Checkout"/>
14+
<title value="Customer Uses DHL EU Online Shipping Carrier On Checkout"/>
15+
<description value="Testcase verifies On storefront customer successfully place an order using DHL(EU) shipping carrier"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-6128"/>
18+
<group value="3rd_party_integration"/>
19+
<group value="pr_exclude"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
<createData entity="Customer_US_UK_DE" stepKey="createCustomer"/>
24+
<actionGroup ref="AdminSetShippingOriginConfigForStateFieldActionGroup" stepKey="setShippingOriginConfiguration">
25+
<argument name="country" value="United Kingdom"/>
26+
<argument name="postcode" value="IP16 4HD"/>
27+
<argument name="stateField" value="Suffolk"/>
28+
</actionGroup>
29+
<actionGroup ref="AdminNavigateToCurrencySetupPageActionGroup" stepKey="goToCurrencySetupPage"/>
30+
<!--Open currency options and select british pound as allowed currency-->
31+
<conditionalClick selector="{{AdminConfigSection.currencyOptionsTab}}" dependentSelector="{{AdminConfigSection.defaultCurrencySelect}}" visible="false" stepKey="openCurrencyOptionsTab"/>
32+
<selectOption selector="{{AdminConfigSection.allowedCurrencies}}" parameterArray="['British Pound', 'US Dollar']" stepKey="selectAllowedCurrency"/>
33+
<actionGroup ref="SaveStoreConfigurationActionGroup" stepKey="saveStoreConfiguration"/>
34+
<!-- go to currency rate page and fill currency rate -->
35+
<actionGroup ref="AdminOpenCurrencyRatesPageActionGroup" stepKey="naviagteToCurrencyRatesPage"/>
36+
<actionGroup ref="AdminSetCurrencyRatesActionGroup" stepKey="setCurrencyRates">
37+
<argument name="firstCurrency" value="USD"/>
38+
<argument name="secondCurrency" value="GBP"/>
39+
<argument name="rate" value="0.9"/>
40+
</actionGroup>
41+
<!--Create simple product-->
42+
<createData entity="SimpleProduct" stepKey="createSimpleProduct"/>
43+
<!-- Create configurable product with two options -->
44+
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"/>
45+
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
46+
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption">
47+
<requiredEntity createDataKey="createConfigProductAttribute"/>
48+
</createData>
49+
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet">
50+
<requiredEntity createDataKey="createConfigProductAttribute"/>
51+
</createData>
52+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption">
53+
<requiredEntity createDataKey="createConfigProductAttribute"/>
54+
</getData>
55+
<createData entity="ApiSimpleOne" stepKey="createConfigChildProduct">
56+
<requiredEntity createDataKey="createConfigProductAttribute"/>
57+
<requiredEntity createDataKey="getConfigAttributeOption"/>
58+
</createData>
59+
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption">
60+
<requiredEntity createDataKey="createConfigProduct"/>
61+
<requiredEntity createDataKey="createConfigProductAttribute"/>
62+
<requiredEntity createDataKey="getConfigAttributeOption"/>
63+
</createData>
64+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChildOne">
65+
<requiredEntity createDataKey="createConfigProduct"/>
66+
<requiredEntity createDataKey="createConfigChildProduct"/>
67+
</createData>
68+
<!--Create Bundle product with multi select option-->
69+
<createData entity="BundleProductPriceViewRange" stepKey="createBundleProduct"/>
70+
<createData entity="MultipleSelectOption" stepKey="createBundleOption1_1">
71+
<requiredEntity createDataKey="createBundleProduct"/>
72+
<field key="required">True</field>
73+
</createData>
74+
<createData entity="ApiBundleLink" stepKey="linkOptionToProduct">
75+
<requiredEntity createDataKey="createBundleProduct"/>
76+
<requiredEntity createDataKey="createBundleOption1_1"/>
77+
<requiredEntity createDataKey="createSimpleProduct"/>
78+
</createData>
79+
<actionGroup ref="AdminEnableDHLEUConfigurationActionGroup" stepKey="enableDHL"/>
80+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
81+
<argument name="indices" value=""/>
82+
</actionGroup>
83+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
84+
<argument name="tags" value="config full_page"/>
85+
</actionGroup>
86+
</before>
87+
<after>
88+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer" />
89+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
90+
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
91+
<deleteData createDataKey="createConfigChildProduct" stepKey="deleteConfigChildProduct"/>
92+
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
93+
<deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/>
94+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
95+
<!-- Reset shipping origin -->
96+
<actionGroup ref="AdminResetShippingOriginConfigurationActionGroup" stepKey="resetCaliforniaShippingOrigin"/>
97+
<actionGroup ref="AdminDisableDHLConfigurationActionGroup" stepKey="resetDhlConfig"/>
98+
<!-- unselect sgd as a allowed currency -->
99+
<actionGroup ref="AdminNavigateToCurrencySetupPageActionGroup" stepKey="againGoToCurrencySetupPage"/>
100+
<!--Open currency options and select singapore dollar as allowed currency-->
101+
<conditionalClick selector="{{AdminConfigSection.currencyOptionsTab}}" dependentSelector="{{AdminConfigSection.defaultCurrencySelect}}" visible="false" stepKey="openCurrencyOptions"/>
102+
<selectOption selector="{{AdminConfigSection.allowedCurrencies}}" parameterArray="['US Dollar']" stepKey="UnselectAllowedCurrency"/>
103+
<actionGroup ref="SaveStoreConfigurationActionGroup" stepKey="saveConfiguration"/>
104+
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
105+
</after>
106+
<!--Login to storefront from customer-->
107+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCustomer">
108+
<argument name="Customer" value="$$createCustomer$$"/>
109+
</actionGroup>
110+
<!-- Add bundle product to cart -->
111+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openBundleProductPage">
112+
<argument name="productUrl" value="$$createBundleProduct.custom_attributes[url_key]$$" />
113+
</actionGroup>
114+
<actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addBundleProductToCart">
115+
<argument name="productName" value="$createBundleProduct.name$"/>
116+
</actionGroup>
117+
<!-- Add simple product to cart -->
118+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
119+
<argument name="product" value="$$createSimpleProduct$$"/>
120+
</actionGroup>
121+
<!-- Add Configurable Product to cart -->
122+
<actionGroup ref="StorefrontAddConfigurableProductToTheCartActionGroup" stepKey="addConfigurableProductToCart">
123+
<argument name="urlKey" value="$$createConfigProduct.custom_attributes[url_key]$$" />
124+
<argument name="productAttribute" value="$$createConfigProductAttribute.default_value$$"/>
125+
<argument name="productOption" value="$$getConfigAttributeOption.value$$"/>
126+
<argument name="qty" value="1"/>
127+
</actionGroup>
128+
<!-- Go to Shopping Cart -->
129+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckoutCartIndexPage"/>
130+
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.estimateShippingAndTaxSummary}}" visible="false" stepKey="openEstimateShippingAndTaxSection"/>
131+
<actionGroup ref="CheckoutFillEstimateShippingAndTaxActionGroup" stepKey="fillEstimateShippingAndTaxFields">
132+
<argument name="address" value="DE_Address_Berlin_Not_Default_Address"/>
133+
</actionGroup>
134+
<waitForElement selector="{{CheckoutCartSummarySection.shippingMethods('Express 12:00')}}" stepKey="verifyExpress12IsAvailable"/>
135+
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="goToCheckout"/>
136+
<waitForElementClickable selector="{{CheckoutShippingMethodsSection.shippingMethodDhlExpressEasyLabel}}" stepKey="waitForShippingDhlExpressEasyLabelVisible"/>
137+
<click selector="{{CheckoutShippingMethodsSection.shippingMethodDhlExpressEasyLabel}}" stepKey="clickOnExpressEasy"/>
138+
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/>
139+
<!-- Checkout select Check/Money Order payment -->
140+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
141+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/>
142+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
143+
<!--navigate to orders grid-->
144+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="goToAdminSalesOrders"/>
145+
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGridById">
146+
<argument name="orderId" value="{$grabOrderNumber}"/>
147+
</actionGroup>
148+
<waitForText selector="{{AdminOrdersGridSection.firstRow}}" userInput="$grabOrderNumber" stepKey="seeOrderIdInGrid"/>
149+
</test>
150+
</tests>

0 commit comments

Comments
 (0)