Skip to content

Commit a9d2dfc

Browse files
committed
MAGETWO-96107: Additional blank option in country dropdown
- Added automation test
1 parent 764f729 commit a9d2dfc

File tree

3 files changed

+107
-0
lines changed

3 files changed

+107
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="EnableAdminAccountAllowCountry" type="admin_account_country_options_config">
12+
<requiredEntity type="admin_account_country_options_value">AdminAccountAllowCountryUS</requiredEntity>
13+
</entity>
14+
<entity name="AdminAccountAllowCountryUS" type="admin_account_country_options_value">
15+
<data key="value">US</data>
16+
</entity>
17+
18+
<entity name="DisableAdminAccountAllowCountry" type="default_admin_account_country_options_config">
19+
<requiredEntity type="checkoutTotalFlagZero">DefaultAdminAccountAllowCountry</requiredEntity>
20+
</entity>
21+
<entity name="DefaultAdminAccountAllowCountry" type="checkoutTotalFlagZero">
22+
<data key="value">0</data>
23+
</entity>
24+
</entities>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
10+
<operation name="AdminAccountCountryOptionConfig" dataType="admin_account_country_options_config" type="create" auth="adminFormKey" url="/admin/system_config/save/section/general/" method="POST">
11+
<object key="groups" dataType="admin_account_country_options_config">
12+
<object key="country" dataType="admin_account_country_options_config">
13+
<object key="fields" dataType="admin_account_country_options_config">
14+
<object key="allow" dataType="admin_account_country_options_value">
15+
<field key="value">string</field>
16+
</object>
17+
</object>
18+
</object>
19+
</object>
20+
</operation>
21+
22+
<operation name="DefaultAdminAccountCountryOptionConfig" dataType="default_admin_account_country_options_config" type="create" auth="adminFormKey" url="/admin/system_config/save/section/general/" method="POST">
23+
<object key="groups" dataType="default_admin_account_country_options_config">
24+
<object key="country" dataType="default_admin_account_country_options_config">
25+
<object key="fields" dataType="default_admin_account_country_options_config">
26+
<object key="allow" dataType="default_admin_account_country_options_config">
27+
<object key="inherit" dataType="checkoutTotalFlagZero">
28+
<field key="value">string</field>
29+
</object>
30+
</object>
31+
</object>
32+
</object>
33+
</object>
34+
</operation>
35+
</operations>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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="CheckingCountryDropDownWithOneAllowedCountryTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Dynamic Media URL"/>
15+
<title value="Verify that Allow Dynamic Media URLs setting is removed from configuration page"/>
16+
<description value="Verify that Allow Dynamic Media URLs setting is removed from configuration page"/>
17+
<severity value="CRITICAL"/>
18+
<useCaseId value="MC-1387564"/>
19+
<testCaseId value="MC-3185678"/>
20+
<group value="configuration"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
<createData entity="EnableAdminAccountAllowCountry" stepKey="setAllowedCountries"/>
25+
26+
</before>
27+
<after>
28+
<createData entity="DisableAdminAccountAllowCountry" stepKey="setDefaultValueForAllowCountries"/>
29+
<actionGroup ref="logout" stepKey="logout"/>
30+
</after>
31+
32+
<!--Flush Magento Cache-->
33+
<magentoCLI stepKey="flushCache" command="cache:flush"/>
34+
35+
<!--Create a customer account from Storefront-->
36+
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="createAnAccount">
37+
<argument name="Customer" value="CustomerEntityOne"/>
38+
</actionGroup>
39+
<click selector="{{CheckoutPaymentSection.addressBook}}" stepKey="goToAddressBook"/>
40+
<wait time="20" stepKey="kk"/>
41+
42+
<click selector="{{StorefrontCustomerAddressSection.country}}" stepKey="clickToExpandCountryDropDown"/>
43+
<see selector="{{StorefrontCustomerAddressSection.country}}" userInput="United States" stepKey="seeSelectedCountry"/>
44+
<dontSee selector="{{StorefrontCustomerAddressSection.country}}" userInput="Brazil" stepKey="canNotSeeSelectedCountry"/>
45+
</test>
46+
</tests>
47+
48+

0 commit comments

Comments
 (0)