Skip to content

Commit a18041b

Browse files
committed
AC-7003: Added mftf test coverage
1 parent 9a0541c commit a18041b

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

app/code/Magento/Shipping/Test/Mftf/Section/AdminShippingSettingsConfigSection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@
1616
<element name="dropdownState" type="checkbox" selector="#row_shipping_origin_region_id select"/>
1717
<element name="systemValuePostcode" type="checkbox" selector="#row_shipping_origin_postcode input[type='checkbox']"/>
1818
<element name="PostcodeValue" type="input" selector="#row_shipping_origin_postcode input[type='text']"/>
19+
<element name="systemValueShippingPolicy" type="checkbox" selector="#row_shipping_shipping_policy_enable_shipping_policy input[type='checkbox']"/>
20+
<element name="shippingPolicy" type="block" selector="#row_shipping_shipping_policy_shipping_policy_content"/>
21+
<element name="dropdownShippingPolicy" type="select" selector="#row_shipping_shipping_policy_enable_shipping_policy select"/>
1922
</section>
2023
</sections>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCheckShippingPolicyParamsInDifferentScopes">
12+
<annotations>
13+
<features value="Shipping"/>
14+
<stories value="Shipping Policy Parameters"/>
15+
<title value="Displaying of Shipping Policy Parameters in different scopes"/>
16+
<description value="Displaying of Shipping Policy Parameters in different scopes"/>
17+
<severity value="AVERAGE"/>
18+
<testCaseId value="AC-7003"/>
19+
<group value="shipping"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
</before>
24+
<after>
25+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
26+
</after>
27+
28+
<amOnPage url="{{AdminShippingSettingsPage.url}}" stepKey="goToAdminShippingPage"/>
29+
<waitForPageLoad stepKey="waitForShippingConfigLoad"/>
30+
31+
<uncheckOption selector="{{AdminShippingSettingsConfigSection.systemValueShippingPolicy}}" stepKey="disableUseDefaultCondition"/>
32+
33+
<selectOption selector="{{AdminShippingSettingsConfigSection.dropdownShippingPolicy}}" userInput="Yes" stepKey="SelectApplyCustomShippingPolicy"/>
34+
35+
<!-- Save the settings -->
36+
<scrollToTopOfPage stepKey="scrollToTop"/>
37+
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveChanges"/>
38+
39+
<!--Switch to Store view 1-->
40+
<actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="SwitchNewStoreView">
41+
<argument name="storeViewName" value="{{_defaultStore.name}}"/>
42+
</actionGroup>
43+
<seeElement selector="{{AdminShippingSettingsConfigSection.ShippingPolicy}}" stepKey="seeShippingPolicy"/>
44+
45+
<!--Switch to Store view 1-->
46+
<actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="SwitchtoDefaultConfig">
47+
<argument name="storeViewName" value="Default Config"/>
48+
</actionGroup>
49+
50+
<selectOption selector="{{AdminShippingSettingsConfigSection.dropdownShippingPolicy}}" userInput="No" stepKey="SelectApplyCustomShippingPolicy1"/>
51+
52+
<checkOption selector="{{AdminShippingSettingsConfigSection.systemValueShippingPolicy}}" stepKey="enableUseDefaultCondition"/>
53+
<!-- Save the settings -->
54+
<scrollToTopOfPage stepKey="scrollToTop1"/>
55+
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveChanges1"/>
56+
57+
<!--Switch to Store view 1-->
58+
<actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="SwitchNewStoreView2">
59+
<argument name="storeViewName" value="{{_defaultStore.name}}"/>
60+
</actionGroup>
61+
<seeElement selector="{{AdminShippingSettingsConfigSection.ShippingPolicy}}" stepKey="seeShippingPolicy2"/>
62+
63+
</test>
64+
</tests>

0 commit comments

Comments
 (0)