Skip to content

Commit 3be1dc4

Browse files
shashikant.kumarshanthi
authored andcommitted
AC-4267:Multishipping checkout with different product's types
1 parent 83b7f30 commit 3be1dc4

8 files changed

+543
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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="AdminCreateThreeConfigurationsForConfigurableProductActionGroup">
12+
<arguments>
13+
<argument name="blueColor" type="string"/>
14+
<argument name="whiteColor" type="string"/>
15+
<argument name="redColor" type="string"/>
16+
</arguments>
17+
<conditionalClick selector="{{AdminProductGridSection.productCollapsibleColumns('closed','Product in Websites')}}" dependentSelector="{{AdminProductGridSection.productCollapsibleColumns('closed','Product in Websites')}}" visible="true" stepKey="expandProductInWebsites"/>
18+
<checkOption selector="{{AdminProductGridSection.checkMainWebsite}}" stepKey="checkMainWebsite"/>
19+
<scrollTo selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" x="-200" y="-200" stepKey="scrollToCreateConfigurationsButton"/>
20+
<click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnTheCreateConfigurationsButton"/>
21+
<waitForLoadingMaskToDisappear stepKey="waitPostClickingCreateConfigButton"/>
22+
<click selector="{{AdminGridRow.checkboxByValue('color')}}" stepKey="selectColorAttributeCheckbox"/>
23+
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="navigateToAttributeValues"/>
24+
25+
<click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="addNewColorWhite"/>
26+
<fillField userInput="{{whiteColor}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="setNameWhite"/>
27+
<click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="saveWhiteColor"/>
28+
<click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="addNewColorBlue"/>
29+
<fillField userInput="{{blueColor}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="setNameBlue"/>
30+
<click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="saveBlueColor"/>
31+
<click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="addNewColorRed"/>
32+
<fillField userInput="{{redColor}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="setNameRed"/>
33+
<click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="saveRedColor"/>
34+
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="navigateToBulkPricesAndImages"/>
35+
36+
<click selector="{{AdminCreateProductConfigurationsPanel.applyUniquePricesByAttributeToEachSku}}" stepKey="clickOnApplyUniquePricesByAttributeToEachSku"/>
37+
<selectOption selector="{{AdminCreateProductConfigurationsPanel.selectAttribute}}" userInput="Color" stepKey="selectColorAsAttribute"/>
38+
<fillField selector="{{AdminCreateProductConfigurationsPanel.qtyForColorAttribute(whiteColor)}}" userInput="30" stepKey="setQtyForWhiteProduct"/>
39+
<fillField selector="{{AdminCreateProductConfigurationsPanel.qtyForColorAttribute(redColor)}}" userInput="10" stepKey="setQtyForRedProduct"/>
40+
<fillField selector="{{AdminCreateProductConfigurationsPanel.qtyForColorAttribute(blueColor)}}" userInput="20" stepKey="setQtyForBlueProduct"/>
41+
<click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/>
42+
<fillField selector="{{AdminConfigurableProductAssignSourcesSlideOut.quantityPerSourceForSingleMode}}" userInput="100" stepKey="fillQuantityForCustomSource"/>
43+
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="navigateToSummaryStep"/>
44+
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnGenerateProducts"/>
45+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveConfigurableProduct"/>
46+
<conditionalClick selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" dependentSelector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" visible="true" stepKey="confirmDefaultAttributeSetForConfigurableProduct"/>
47+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="checkProductSavedMessage"/>
48+
</actionGroup>
49+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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="AssertStorefrontMultishippingAddressAndItemUKGEActionGroup">
12+
<annotations>
13+
<description>Verify item information on Ship to Multiple Addresses page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productSequenceNumber" type="string" defaultValue="1"/>
17+
<argument name="addressQtySequenceNumber" type="string" defaultValue="1"/>
18+
<argument name="productName" type="string" defaultValue="{{SimpleProduct.name}}"/>
19+
<argument name="quantity" type="string" defaultValue="1"/>
20+
<argument name="firstName" type="string" defaultValue="{{US_Address_CA.firstname}}"/>
21+
<argument name="lastName" type="string" defaultValue="{{US_Address_CA.lastname}}"/>
22+
<argument name="city" type="string" defaultValue="{{US_Address_CA.city}}"/>
23+
<argument name="postCode" type="string" defaultValue="{{US_Address_CA.postcode}}"/>
24+
<argument name="country" type="string" defaultValue="{{US_Address_CA.country}}"/>
25+
<argument name="addressStreetLine1" type="string" defaultValue="{{US_Address_CA.street[0]}}"/>
26+
</arguments>
27+
28+
<seeElement selector="{{MultishippingSection.productLink(productName, productSequenceNumber)}}" stepKey="verifyProductName"/>
29+
<seeInField selector="{{MultishippingSection.productQty(addressQtySequenceNumber)}}" userInput="{{quantity}}" stepKey="verifyQuantity"/>
30+
<seeInField selector="{{MultishippingSection.shippingAddressSelector(addressQtySequenceNumber)}}" userInput="{{firstName}} {{lastName}}, {{addressStreetLine1}}, {{city}}, {{postCode}}, {{country}}" stepKey="verifyAddress"/>
31+
</actionGroup>
32+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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="StorefrontAddConfigurableProductOfSpecificColorToTheCartActionGroup">
12+
<annotations>
13+
<description>Goes to the provided Storefront URL. Selects the provided Product Option under the Product Attribute. Fills in the provided Quantity. Clicks Add to Cart. Validates that the Success Message is present.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="urlKey" type="string"/>
17+
<argument name="color" type="string"/>
18+
<argument name="qty" type="string"/>
19+
</arguments>
20+
21+
<amOnPage url="{{urlKey}}.html" stepKey="goToStorefrontPage"/>
22+
<waitForPageLoad stepKey="waitForProductFrontPageToLoad"/>
23+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.productOptionSelectByColor}}" stepKey="waitForOptions"/>
24+
<selectOption selector="{{StorefrontProductInfoMainSection.productOptionSelectByColor}}" userInput="{{color}}" stepKey="selectOption1"/>
25+
<fillField selector="{{StorefrontProductPageSection.qtyInput}}" userInput="{{qty}}" stepKey="fillProductQuantity"/>
26+
<waitForElementNotVisible selector="{{StorefrontProductActionSection.addToCartDisabled}}" stepKey="waitForAddToCartButtonToRemoveDisabledState"/>
27+
<waitForElementClickable selector="{{StorefrontProductActionSection.addToCart}}" stepKey="waitForAddToCartButton"/>
28+
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="clickOnAddToCartButton"/>
29+
<waitForPageLoad stepKey="waitForProductToAddInCart"/>
30+
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
31+
<seeElement selector="{{StorefrontProductPageSection.successMsg}}" stepKey="seeSuccessSaveMessage"/>
32+
</actionGroup>
33+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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="StorefrontAssertBillingAddressInBillingInfoStepGEActionGroup">
12+
<annotations>
13+
<description>Assert that Billing Address block contains provided Address data.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="address" type="entity" defaultValue="DE_Address_Berlin_Not_Default_Address"/>
17+
</arguments>
18+
19+
<see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.firstname}}" stepKey="seeFirstname"/>
20+
<see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.lastname}}" stepKey="seeLastname"/>
21+
<see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.company}}" stepKey="seeCompany"/>
22+
<see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.street[0]}}" stepKey="seeStreet"/>
23+
<see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.city}}" stepKey="seeCity"/>
24+
<see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.postcode}}" stepKey="seePostcode"/>
25+
<see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.country}}" stepKey="seeCountry"/>
26+
<see selector="{{PaymentMethodSection.billingAddressBlock}}" userInput="{{address.telephone}}" stepKey="seeTelephone"/>
27+
</actionGroup>
28+
</actionGroups>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@
1818
<element name="productLink" type="button" selector="(//form[@id='checkout_multishipping_form']//a[contains(text(),'{{productName}}')])[{{sequenceNumber}}]" parameterized="true"/>
1919
<element name="removeItemButton" type="button" selector="//a[contains(@title, 'Remove Item')][{{var}}]" parameterized="true"/>
2020
<element name="back" type="button" selector=".action.back"/>
21+
<element name="addressSection" type="text" selector="//div[@class='block-title']/strong[text()='Address {{var}} ']" parameterized="true"/>
22+
<element name="firstFlatRateCharge" type="text" selector="//span[@class='price' and text()='$10.00']/../../label[contains(text(),'Fixed')]"/>
23+
<element name="secondFlatRateCharge" type="text" selector="//span[@class='price' and text()='$15.00']/../../label[contains(text(),'Fixed')]"/>
24+
<element name="thirdFlatRateCharge" type="text" selector="//span[@class='price' and text()='$30.00']/../../label[contains(text(),'Fixed')]"/>
2125
</section>
2226
</sections>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<element name="checkmoneyorderonOverViewPage" type="text" selector="//dt[contains(text() , 'Check / Money order')]"/>
1818
<element name="othershippingitems" type="text" selector="//div[@class='block block-other']//div/strong[contains(text(),'Other items in your order')]/../..//div[2]//td/strong/a[contains(text(),'{{var}}')]" parameterized="true" />
1919
<element name="shippingaddresstext" type="text" selector="//div[@class='box box-order-shipping-address']//span[contains(text(),'Shipping Address')]" />
20+
<element name="grandTotalAmount" type="text" selector="//div[@id='checkout-review-submit']/div[@class='grand totals']"/>
2021
</section>
2122
</sections>
2223

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontMultishippingCheckoutBillingToolbarSection">
1212
<element name="goToReviewOrder" type="button" selector="button.action.primary.continue"/>
13+
<element name="changeBillingAddress" type="button" selector="//span[text()='Change']"/>
14+
<element name="selectBillingAddress" type="button" selector="//a[text()='333-33-333-33']/../../..//span[text()='Select Address']"/>
1315
</section>
1416
</sections>

0 commit comments

Comments
 (0)