Skip to content

Commit 75e6531

Browse files
ACQE-6372: Multishipping checkout flow with online shipping methods
added few actiongroup
1 parent edc518a commit 75e6531

6 files changed

+91
-16
lines changed

app/code/Magento/Config/Test/Mftf/ActionGroup/AdminEnableDHLWithoutSpecificCountryConfigurationActionGroup.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="AdminEnableDHLWithoutSpecificCountryConfigurationActionGroup" extends="AdminEnableDHLConfigurationActionGroup">
12+
<annotations>
13+
<description>Enable DHL shipping method without specific country and their configuration</description>
14+
</annotations>
1215
<remove keyForRemoval="DHLSpecificCountries"/>
1316
<remove keyForRemoval="DHLSelectSpecificCountry"/>
1417
</actionGroup>
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="StorefrontSelectShippingMethodBasedOnAddressActionGroup">
12+
<annotations>
13+
<description>Select shipping method based on the address and shipping method.</description>
14+
</annotations>
15+
<waitForElementClickable selector="{{AdminShipmentAddressInformationSection.selectShippingMethodBasedOnAddress('Culver City', 'Federal Express', 'Ground')}}" stepKey="waitForSelectShippingMethodBasedOnAddress"/>
16+
<click selector="{{AdminShipmentAddressInformationSection.selectShippingMethodBasedOnAddress('Culver City', 'Federal Express', 'Ground')}}" stepKey="clickToSelectFederalExpressMethod"/>
17+
<click selector="{{AdminShipmentAddressInformationSection.selectShippingMethodBasedOnAddress('Germany', 'DHL', 'Express easy')}}" stepKey="clickToSelectDHLMethod"/>
18+
<click selector="{{AdminShipmentAddressInformationSection.selectShippingMethodBasedOnAddress('London', 'United Parcel Service', 'UPS Worldwide Expedited')}}" stepKey="clickToSelectUPSMethod"/>
19+
<click selector="{{AdminShipmentAddressInformationSection.selectShippingMethodBasedOnAddress('New York', 'United States Postal Service', 'Library Mail Parcel')}}" stepKey="clickToSelectUSPSMethod"/>
20+
</actionGroup>
21+
</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="StorefrontUpdateShippingAddressActionGroup">
12+
<annotations>
13+
<description>Update Shipping address after selecting from drop-down and go to shipping information page.</description>
14+
</annotations>
15+
<waitForElementClickable selector="{{SingleShippingSection.updateAddress}}" stepKey="waitForUpdateAddress"/>
16+
<click selector="{{SingleShippingSection.updateAddress}}" after="waitForUpdateAddress" stepKey="clickUpdateAddress"/>
17+
<waitForPageLoad after="clickUpdateAddress" stepKey="waitForClickOnUpdateAddress"/>
18+
<waitForElementClickable selector="{{AdminShipmentAddressInformationSection.goToShippingInformation}}" stepKey="waitForClickGoToShippingInformation"/>
19+
<click selector="{{AdminShipmentAddressInformationSection.goToShippingInformation}}" stepKey="clickGoToShippingInformation"/>
20+
<waitForPageLoad after="clickGoToShippingInformation" stepKey="waitForShippingInformation"/>
21+
</actionGroup>
22+
</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="StorefrontVerifyOrderInformationActionGroup">
12+
<annotations>
13+
<description>Verify order information before placing order</description>
14+
</annotations>
15+
<waitForElementVisible selector="{{AdminShipmentAddressInformationSection.reviewOrderInfo('Culver City', 'Ground')}}" stepKey="waitForFirstProductReviewOrderInformation"/>
16+
<waitForElementVisible selector="{{AdminShipmentAddressInformationSection.reviewOrderInfo('Germany', 'Express easy')}}" stepKey="waitForSecondProductReviewOrderInformation"/>
17+
<waitForElementVisible selector="{{AdminShipmentAddressInformationSection.reviewOrderInfo('London', 'UPS Worldwide Expedited')}}" stepKey="waitForThirdProductReviewOrderInformation"/>
18+
<waitForElementVisible selector="{{AdminShipmentAddressInformationSection.reviewOrderInfo('New York', 'Library Mail Parcel')}}" stepKey="waitForFourthProductReviewOrderInformation"/>
19+
<waitForElementClickable selector="{{AdminShipmentAddressInformationSection.placeOrder}}" stepKey="waitForPlaceOrder"/>
20+
</actionGroup>
21+
</actionGroups>
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="StorefrontVerifyOrderInformationBeforePlacingOrderActionGroup">
12+
<annotations>
13+
<description>Before placing order verifying the shipping method is selected correct with respect to address.</description>
14+
</annotations>
15+
<waitForElementVisible selector="{{AdminShipmentAddressInformationSection.reviewOrderInfo('Culver City', 'Ground')}}" stepKey="waitForFirstProductReviewOrderInformation"/>
16+
<waitForElementVisible selector="{{AdminShipmentAddressInformationSection.reviewOrderInfo('Germany', 'Express easy')}}" stepKey="waitForSecondProductReviewOrderInformation"/>
17+
<waitForElementVisible selector="{{AdminShipmentAddressInformationSection.reviewOrderInfo('London', 'UPS Worldwide Expedited')}}" stepKey="waitForThirdProductReviewOrderInformation"/>
18+
<waitForElementVisible selector="{{AdminShipmentAddressInformationSection.reviewOrderInfo('New York', 'Library Mail Parcel')}}" stepKey="waitForFourthProductReviewOrderInformation"/>
19+
<waitForElementClickable selector="{{AdminShipmentAddressInformationSection.placeOrder}}" stepKey="waitForPlaceOrder"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/Shipping/Test/Mftf/Test/StorefrontMultishippingCheckoutWithOnlineShippingMethodTest.xml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,9 @@
7676
<argument name="selectOption" value="4"/>
7777
</actionGroup>
7878
<!-- Updating the address for shipping section -->
79-
<waitForElementClickable selector="{{SingleShippingSection.updateAddress}}" stepKey="waitForUpdateAddress"/>
80-
<click selector="{{SingleShippingSection.updateAddress}}" after="waitForUpdateAddress" stepKey="clickUpdateAddress"/>
81-
<waitForPageLoad after="clickUpdateAddress" stepKey="waitForClickOnUpdateAddress"/>
82-
<waitForElementClickable selector="{{AdminShipmentAddressInformationSection.goToShippingInformation}}" stepKey="waitForClickGoToShippingInformation"/>
83-
<click selector="{{AdminShipmentAddressInformationSection.goToShippingInformation}}" stepKey="clickGoToShippingInformation"/>
84-
<waitForPageLoad after="clickGoToShippingInformation" stepKey="waitForShippingInformation"/>
79+
<actionGroup ref="StorefrontUpdateShippingAddressActionGroup" stepKey="updateShippingAddressActionGroup"/>
8580
<!-- Selecting shipping method based on the address -->
86-
<waitForElementClickable selector="{{AdminShipmentAddressInformationSection.selectShippingMethodBasedOnAddress('Culver City', 'Federal Express', 'Ground')}}" stepKey="waitForSelectShippingMethodBasedOnAddress"/>
87-
<click selector="{{AdminShipmentAddressInformationSection.selectShippingMethodBasedOnAddress('Culver City', 'Federal Express', 'Ground')}}" stepKey="clickToSelectFederalExpressMethod"/>
88-
<click selector="{{AdminShipmentAddressInformationSection.selectShippingMethodBasedOnAddress('Germany', 'DHL', 'Express easy')}}" stepKey="clickToSelectDHLMethod"/>
89-
<click selector="{{AdminShipmentAddressInformationSection.selectShippingMethodBasedOnAddress('London', 'United Parcel Service', 'UPS Worldwide Expedited')}}" stepKey="clickToSelectUPSMethod"/>
90-
<click selector="{{AdminShipmentAddressInformationSection.selectShippingMethodBasedOnAddress('New York', 'United States Postal Service', 'Library Mail Parcel')}}" stepKey="clickToSelectUSPSMethod"/>
81+
<actionGroup ref="StorefrontSelectShippingMethodBasedOnAddressActionGroup" stepKey="selectShippingMethodBasedOnAddressActionGroup"/>
9182
<!-- Click on the billing information button to save selected data -->
9283
<waitForElementClickable selector="{{AdminShipmentAddressInformationSection.goToBillingInfo}}" stepKey="waitForGoToBillingInfoButton"/>
9384
<click selector="{{AdminShipmentAddressInformationSection.goToBillingInfo}}" stepKey="goToBillingInformation"/>
@@ -97,11 +88,7 @@
9788
<waitForElementClickable selector="{{AdminShipmentAddressInformationSection.goToReviewOrder}}" stepKey="waitForGoToReviewOrder"/>
9889
<click selector="{{AdminShipmentAddressInformationSection.goToReviewOrder}}" stepKey="goToReviewOrder"/>
9990
<!-- Verify the address/shipping data before place order -->
100-
<waitForElementVisible selector="{{AdminShipmentAddressInformationSection.reviewOrderInfo('Culver City', 'Ground')}}" stepKey="waitForFirstProductReviewOrderInformation"/>
101-
<waitForElementVisible selector="{{AdminShipmentAddressInformationSection.reviewOrderInfo('Germany', 'Express easy')}}" stepKey="waitForSecondProductReviewOrderInformation"/>
102-
<waitForElementVisible selector="{{AdminShipmentAddressInformationSection.reviewOrderInfo('London', 'UPS Worldwide Expedited')}}" stepKey="waitForThirdProductReviewOrderInformation"/>
103-
<waitForElementVisible selector="{{AdminShipmentAddressInformationSection.reviewOrderInfo('New York', 'Library Mail Parcel')}}" stepKey="waitForFourthProductReviewOrderInformation"/>
104-
<waitForElementClickable selector="{{AdminShipmentAddressInformationSection.placeOrder}}" stepKey="waitForPlaceOrder"/>
91+
<actionGroup ref="StorefrontVerifyOrderInformationBeforePlacingOrderActionGroup" stepKey="verifyOrderInformationBeforePlacingOrderActionGroup"/>
10592
<!-- Place order and verify success message -->
10693
<click selector="{{AdminShipmentAddressInformationSection.placeOrder}}" stepKey="placeOrder"/>
10794
<waitForText selector="{{AdminShipmentAddressInformationSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/>

0 commit comments

Comments
 (0)