Skip to content

Commit 5f9a707

Browse files
shanthishanthi
authored andcommitted
Update Multishippingsection
2 parents 19c5ea0 + 0b82685 commit 5f9a707

File tree

7 files changed

+227
-0
lines changed

7 files changed

+227
-0
lines changed

:

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Merge branch 'ACQE-4652_1' into bengals-mainline-deployment
2+
# Please enter a commit message to explain why this merge is necessary,
3+
# especially if it merges an updated upstream into a topic branch.
4+
#
5+
# Lines starting with '#' will be ignored, and an empty message aborts
6+
# the commit.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="EnterAddressDetailsActionGroup" extends="EnterCustomerAddressInfoActionGroup">
11+
<annotations>
12+
<description>Removed specific page. Fills in the required details </description>
13+
</annotations>
14+
15+
<remove keyForRemoval="goToAddressPage"/>
16+
<remove keyForRemoval="saveAddress"/>
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="FillNewCustomerAddressFieldsActionGroup" extends="FillNewCustomerAddressRequiredFieldsActionGroup">
12+
<annotations>
13+
<description>Select country before select state </description>
14+
</annotations>
15+
<arguments>
16+
<argument name="address" type="entity"/>
17+
</arguments>
18+
19+
<remove keyForRemoval="selectCountry"/>
20+
<selectOption selector="{{StorefrontCustomerAddressFormSection.country}}" userInput="{{address.country}}" stepKey="selectCountryField" after="fillStreetAddress"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="StorefrontFillCustomerCreateAnAccountActionGroup" extends="StorefrontFillCustomerAccountCreationFormActionGroup">
12+
<annotations>
13+
<description>Fills in the provided Customer details on the Storefront Customer creation page.</description>
14+
</annotations>
15+
16+
<remove keyForRemoval="fillFirstName"/>
17+
<remove keyForRemoval="fillLastName"/>
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020
<element name="back" type="button" selector=".action.back"/>
2121
<element name="addressSection" type="text" selector="//div[@class='block-title']/strong[text()='Address {{var}} ']" parameterized="true"/>
2222
<element name="flatRateCharge" type="text" selector="//span[@class='price' and text()='${{price}}']/../../label[contains(text(),'Fixed')]" parameterized="true"/>
23+
<element name="enterNewAddress" type="button" selector=".action.add"/>
2324
</section>
2425
</sections>

app/code/Magento/Multishipping/Test/Mftf/Section/ShippingMethodSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
<element name="selectShippingMethod" type="radio" selector="//div[@class='block block-shipping'][position()={{shippingBlockPosition}}]//dd[position()={{shippingMethodPosition}}]//input[@class='radio']" parameterized="true" timeout="5"/>
1414
<element name="shippingMethod" type="radio" selector="//div[@class='block block-shipping'][position()={{shippingBlockPosition}}]//dd[position()={{shippingMethodPosition}}]" parameterized="true" timeout="5"/>
1515
<element name="goToBillingInfo" type="button" selector=".action.primary.continue"/>
16+
<element name="productDetails" type="text" selector="//a[text()='{{var1}}']/../../..//td[@class='col qty' and text()='{{var2}}']" parameterized="true"/>
1617
</section>
1718
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="MultiShippingWithCreationNewCustomerAndAddressesDuringCheckoutTest">
11+
<annotations>
12+
<stories value="Multi shipping with creation new customer and addresses during checkout"/>
13+
<title value="Verify Multi shipping with creation new customer and addresses during checkout"/>
14+
<description value="Verify Multi shipping with creation new customer and addresses during checkout"/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="AC-4685" />
17+
</annotations>
18+
<before>
19+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminArea"/>
20+
<!-- remove the Filter From the page-->
21+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/>
22+
<actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearFilterFromProductIndex"/>
23+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
24+
<createData entity="SimpleProduct" stepKey="createSimpleProduct">
25+
<requiredEntity createDataKey="createCategory"/>
26+
<field key="name">simple product</field>
27+
</createData>
28+
<!-- Create configurable product -->
29+
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
30+
<requiredEntity createDataKey="createCategory"/>
31+
<field key="name">config product</field>
32+
</createData>
33+
<!-- Search for the Created Configurable Product -->
34+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openConfigurableProductEditPage">
35+
<argument name="productId" value="$createConfigProduct.id$"/>
36+
</actionGroup>
37+
<click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnCreateConfigurations"/>
38+
<waitForPageLoad stepKey="waitForSelectAttributesPage"/>
39+
<actionGroup ref="CreateOptionsForAttributeActionGroup" stepKey="createOptions">
40+
<argument name="attributeName" value="Color"/>
41+
<argument name="firstOptionName" value="Red"/>
42+
<argument name="secondOptionName" value="Green"/>
43+
</actionGroup>
44+
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton"/>
45+
<click selector="{{AdminCreateProductConfigurationsPanel.applySinglePriceToAllSkus}}" stepKey="clickOnApplySinglePriceToAllSkus"/>
46+
<fillField selector="{{AdminCreateProductConfigurationsPanel.singlePrice}}" userInput="10" stepKey="enterAttributePrice"/>
47+
<click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/>
48+
<fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="100" stepKey="enterAttributeQuantity"/>
49+
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextStep"/>
50+
<waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="waitForNextPageOpened"/>
51+
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="generateProducts"/>
52+
<waitForElementVisible selector="{{AdminProductFormActionSection.saveButton}}" stepKey="waitForSaveButtonVisible"/>
53+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="saveProduct"/>
54+
<conditionalClick selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" dependentSelector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" visible="true" stepKey="clickOnConfirmInPopup"/>
55+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessage"/>
56+
</before>
57+
<after>
58+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/>
59+
<actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearGridFilters"/>
60+
<actionGroup ref="AdminDeleteAllProductsFromGridActionGroup" stepKey="deleteAllProducts"/>
61+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
62+
<!-- Delete customer -->
63+
<actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteCustomer">
64+
<argument name="email" value="{{CustomerEntityOne.email}}"/>
65+
</actionGroup>
66+
<actionGroup ref="AdminDeleteCreatedColorAttributeActionGroup" stepKey="deleteRedColorAttribute">
67+
<argument name="Color" value="Red"/>
68+
</actionGroup>
69+
<actionGroup ref="AdminDeleteCreatedColorAttributeActionGroup" stepKey="deleteBlueColorAttribute">
70+
<argument name="Color" value="Green"/>
71+
</actionGroup>
72+
<!-- reindex and flush cache -->
73+
<magentoCron groups="index" stepKey="reindex"/>
74+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache">
75+
<argument name="tags" value="full_page"/>
76+
</actionGroup>
77+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
78+
</after>
79+
<actionGroup ref="StorefrontNavigateToCategoryUrlActionGroup" stepKey="openCategoryPage">
80+
<argument name="categoryUrl" value="$$createCategory.custom_attributes[url_key]$$"/>
81+
</actionGroup>
82+
<waitForPageLoad stepKey="waitForProductPage"/>
83+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart">
84+
<argument name="product" value="$createSimpleProduct$"/>
85+
</actionGroup>
86+
<!-- Add configurable product to the cart -->
87+
<actionGroup ref="StorefrontAddConfigurableProductToTheCartActionGroup" stepKey="addConfigurableProductToCart1">
88+
<argument name="urlKey" value="$$createConfigProduct.custom_attributes[url_key]$$" />
89+
<argument name="productAttribute" value="Color"/>
90+
<argument name="productOption" value="Red"/>
91+
<argument name="qty" value="1"/>
92+
</actionGroup>
93+
<actionGroup ref="StorefrontAddConfigurableProductToTheCartActionGroup" stepKey="addConfigurableProductToCart2">
94+
<argument name="urlKey" value="$$createConfigProduct.custom_attributes[url_key]$$" />
95+
<argument name="productAttribute" value="Color"/>
96+
<argument name="productOption" value="Green"/>
97+
<argument name="qty" value="1"/>
98+
</actionGroup>
99+
<!-- Check Out with Multiple Addresses -->
100+
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/>
101+
<waitForElementVisible selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="waitMultipleAddressShippingButton"/>
102+
<click selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="clickToMultipleAddressShippingButton"/>
103+
<!--Create an account-->
104+
<waitForElementVisible selector="{{AdminCreateUserSection.createAnAccountButtonForCustomer}}" stepKey="waitCreateAnAccountButton"/>
105+
<click selector="{{AdminCreateUserSection.createAnAccountButtonForCustomer}}" stepKey="clickOnCreateAnAccountButton"/>
106+
<waitForPageLoad stepKey="waitForCreateAccountPageToLoad"/>
107+
<actionGroup ref="EnterAddressDetailsActionGroup" stepKey="enterAddressInfo">
108+
<argument name="Address" value="US_Address_CA"/>
109+
</actionGroup>
110+
<actionGroup ref="StorefrontFillCustomerCreateAnAccountActionGroup" stepKey="fillDetails">
111+
<argument name="customer" value="CustomerEntityOne"/>
112+
</actionGroup>
113+
<actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/>
114+
<click selector="{{MultishippingSection.enterNewAddress}}" stepKey="clickOnAddress"/>
115+
<waitForPageLoad stepKey="waitForAddressFieldsPageOpen"/>
116+
<actionGroup ref="FillNewCustomerAddressFieldsActionGroup" stepKey="editAddressFields">
117+
<argument name="address" value="DE_Address_Berlin_Not_Default_Address"/>
118+
<argument name="address" value="DE_Address_Berlin_Not_Default_Address"/>
119+
</actionGroup>
120+
<actionGroup ref="StorefrontSaveCustomerAddressActionGroup" stepKey="saveAddress"/>
121+
<waitForPageLoad stepKey="waitForShippingPageToOpen"/>
122+
<actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectCAAddress">
123+
<argument name="sequenceNumber" value="1"/>
124+
<argument name="option" value="John Doe, 7700 West Parmer Lane 113, Los Angeles, California 90001, United States"/>
125+
</actionGroup>
126+
<actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectCAAddressForSecondProduct">
127+
<argument name="sequenceNumber" value="2"/>
128+
<argument name="option" value="John Doe, 7700 West Parmer Lane 113, Los Angeles, California 90001, United States"/>
129+
</actionGroup>
130+
<actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectGEAddress">
131+
<argument name="sequenceNumber" value="3"/>
132+
<argument name="option" value="John Doe, Augsburger Strabe 41, Berlin, Berlin 10789, Germany"/>
133+
</actionGroup>
134+
<actionGroup ref="StorefrontChangeMultishippingItemQtyActionGroup" stepKey="setProductQuantity">
135+
<argument name="sequenceNumber" value="3"/>
136+
<argument name="quantity" value="10"/>
137+
</actionGroup>
138+
<actionGroup ref="StorefrontSaveAddressActionGroup" stepKey="saveAddresses"/>
139+
<waitForPageLoad stepKey="waitForPageToLoadProperly"/>
140+
<seeElement selector="{{ShippingMethodSection.productDetails('simple product','1')}}" stepKey="assertSimpleProductDetails"/>
141+
<seeElement selector="{{ShippingMethodSection.productDetails('config product','1')}}" stepKey="assertConfigProductRedDetails"/>
142+
<seeElement selector="{{ShippingMethodSection.productDetails('config product','10')}}" stepKey="assertConfigProductGreenDetails"/>
143+
<!-- Click 'Continue to Billing Information' -->
144+
<actionGroup ref="StorefrontLeaveDefaultShippingMethodsAndGoToBillingInfoActionGroup" stepKey="useDefaultShippingMethod"/>
145+
<!-- Click 'Go to Review Your Order' -->
146+
<actionGroup ref="SelectBillingInfoActionGroup" stepKey="useDefaultBillingMethod"/>
147+
<!-- Click 'Place Order' -->
148+
<actionGroup ref="PlaceOrderActionGroup" stepKey="placeOrder"/>
149+
<waitForPageLoad stepKey="waitForOrderPlace"/>
150+
<grabTextFrom selector="{{StorefrontMultipleShippingMethodSection.orderId('1')}}" stepKey="grabFirstOrderId"/>
151+
<grabTextFrom selector="{{StorefrontMultipleShippingMethodSection.orderId('2')}}" stepKey="grabSecondOrderId"/>
152+
<!-- Go to My Account > My Orders and verify orderId-->
153+
<amOnPage url="{{StorefrontCustomerOrdersHistoryPage.url}}" stepKey="goToMyOrdersPage"/>
154+
<waitForPageLoad stepKey="waitForMyOrdersPageLoad"/>
155+
<seeElement selector="{{StorefrontCustomerOrdersGridSection.orderView({$grabFirstOrderId})}}" stepKey="seeFirstOrder"/>
156+
<seeElement selector="{{StorefrontCustomerOrdersGridSection.orderView({$grabSecondOrderId})}}" stepKey="seeSecondOrder"/>
157+
<!-- Logout customer -->
158+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
159+
</test>
160+
</tests>

0 commit comments

Comments
 (0)