Skip to content

Commit 0a85713

Browse files
Manjusha.SManjusha.S
authored andcommitted
Merge branch 'MQE-3316_' into functional--test--automation
update commits
2 parents ecea284 + cb7f1a7 commit 0a85713

File tree

3 files changed

+101
-0
lines changed

3 files changed

+101
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="MultishippingAdminConfigPage" url="/admin/system_config/edit/section/multishipping" module="Magento_Multishipping" area="admin">
12+
<section name="MultipleshippingConfigurationSection"/>
13+
</page>
14+
</pages>
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="MultipleshippingConfigurationSection">
12+
<element name="AllowMultipleShippingCheckbox" type="checkbox" selector="//input[@id='multishipping_options_checkout_multiple_inherit']"/>
13+
<element name="AllowMultipleShippingDropdown" type="select" selector="//select[@id='multishipping_options_checkout_multiple']"/>
14+
15+
16+
</section>
17+
</sections>
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminDisablesMultishippingFunctionalityTest">
11+
<annotations>
12+
<features value="Multishipping"/>
13+
<stories value="Multishipping"/>
14+
<title value="Disable multishipping functionality in configuration page"/>
15+
<description value="Admin Should be able to disable multishipping functionality."/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MC-26572"/>
18+
<useCaseId value="MC-26572"/>
19+
<group value="multishipping"/>
20+
</annotations>
21+
<before>
22+
<createData entity="ApiCategory" stepKey="createCategory"/>
23+
<createData entity="_defaultProduct" stepKey="createSimpleProduct">
24+
<requiredEntity createDataKey="createCategory"/>
25+
</createData>
26+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
27+
</before>
28+
<after>
29+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
30+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
31+
<wait stepKey="k1" time="10"/>
32+
<!-- Go to Admin > Store > Configuration > Sales > Multishipping, Choose YES to mutishipping which is the default state-->
33+
<amOnPage url="{{MultishippingAdminConfigPage.url}}" stepKey="NavigateToMultishippingOptions"/>
34+
<waitForPageLoad time="10" stepKey="waitForSectionDisplay"/>
35+
<selectOption selector="{{MultipleshippingConfigurationSection.AllowMultipleShippingDropdown}}" userInput="Yes" stepKey="SelectAllowMultipleShippingAddress"/>
36+
<waitForPageLoad time="10" stepKey="waitForSectionDisplayss"/>
37+
<click selector="{{MultipleshippingConfigurationSection.AllowMultipleShippingCheckbox}}" stepKey="ClickOnCheckbox"/>
38+
<waitForPageLoad time="10" stepKey="waitForSectionDisplaysss"/>
39+
<click selector="{{CatalogSection.save}}" stepKey="clickSaveConfigBtn"/>
40+
<magentoCLI command="cache:flush config" stepKey="flushCacheAfterTestRun"/>
41+
</after>
42+
43+
<!-- Login to admin -->
44+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAdmin"/>
45+
<!-- Go to Admin > Store > Configuration > Sales > Multishipping, Choose No to mutishipping -->
46+
<amOnPage url="{{MultishippingAdminConfigPage.url}}" stepKey="NavigateToMultishippingOptions"/>
47+
<waitForPageLoad stepKey="waitForSectionDisplay"/>
48+
<click selector="{{MultipleshippingConfigurationSection.AllowMultipleShippingCheckbox}}" stepKey="ClickOnCheckbox"/>
49+
<selectOption selector="{{MultipleshippingConfigurationSection.AllowMultipleShippingDropdown}}" userInput="No" stepKey="SelectAllowMultipleShippingAddress"/>
50+
<click selector="{{CatalogSection.save}}" stepKey="clickSaveConfigBtn"/>
51+
<!-- Flushing all the config data -->
52+
<magentoCLI command="cache:flush config" stepKey="flushCacheAfterTestRun"/>
53+
<!-- Go to Storefront as Guest -->
54+
<amOnPage url="{{StorefrontCategoryPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="onCategoryPage"/>
55+
<waitForPageLoad time="5" stepKey="waitForPageLoad"/>
56+
<click selector="{{StorefrontBundleProductActionSection.addToCartButton}}" stepKey="AddToCart"/>
57+
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="CheckoutPage"/>
58+
<!-- Assert text "Check Out with Multiple Addresses" is NOT present -->
59+
<actionGroup ref="AssertStorefrontMultiShippingOptionIsNotPresentOnShoppingCartPageActionGroup" stepKey="MultipleAddressCheckoutIsNotPresent"/>
60+
<!-- Login as Customer -->
61+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer">
62+
<argument name="Customer" value="$$createCustomer$$"/>
63+
</actionGroup>
64+
65+
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="CheckoutPage2"/>
66+
<!-- Assert text "Check Out with Multiple Addresses" is NOT present -->
67+
<actionGroup ref="AssertStorefrontMultiShippingOptionIsNotPresentOnShoppingCartPageActionGroup" stepKey="MultipleAddressCheckoutIsNotPresents"/>
68+
69+
</test>
70+
</tests>

0 commit comments

Comments
 (0)