Skip to content

Commit

Permalink
ENGCOM-5842: Bugfix/22964 #24597
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov committed Oct 2, 2019
2 parents 882ea8f + da46ff4 commit 03d0363
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="StorefrontRegionUpdatesAfterChangingCountryAndLeavingRegionSelectUnselectedTest">
<annotations>
<features value="Checkout"/>
<stories value="Region updates after changing country "/>
<title value="Region updates after changing country "/>
<description value="Region dupdates after changing country and leaving region select unselected"/>
<severity value="CRITICAL"/>
<testCaseId value="https://github.com/magento/magento2/issues/23460"/>
<group value="checkout"/>
</annotations>
<before>
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
</before>
<after>
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
</after>

<!-- Login to storefront from customer -->
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCustomer">
<argument name="Customer" value="$$createCustomer$$"/>
</actionGroup>

<actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToMyAccountPage"/>

<actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToAddressBookPage">
<argument name="menu" value="Address Book"/>
</actionGroup>
<actionGroup ref="StoreFrontClickEditDefaultShippingAddressActionGroup" stepKey="clickEditAddress"/>
<selectOption selector="{{StorefrontCustomerAddressFormSection.country}}" userInput="{{updateCustomerFranceAddress.country}}" stepKey="selectCountry"/>
<actionGroup ref="AdminSaveCustomerAddressActionGroup" stepKey="saveAddress"/>

<see selector="{{StorefrontCustomerAddressesSection.defaultShippingAddress}}" userInput="{{updateCustomerFranceAddress.country}}" stepKey="seeAssertCustomerDefaultShippingAddressCountry"/>
</test>
</tests>
Expand Up @@ -162,6 +162,9 @@ define([
this._clearError();
this._checkRegionRequired(country);

$(regionList).find('option:selected').removeAttr('selected');
regionInput.val('');

// Populate state/province dropdown list if available or use input box
if (this.options.regionJson[country]) {
this._removeSelectOptions(regionList);
Expand Down
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StoreFrontClickEditDefaultShippingAddressActionGroup">
<annotations>
<description>Click on the edit default shipping address link.</description>
</annotations>

<click stepKey="ClickEditDefaultShippingAddress" selector="{{StorefrontCustomerAddressesSection.editDefaultShippingAddress}}"/>
<waitForPageLoad stepKey="waitForStorefrontSignInPageLoad"/>
</actionGroup>
</actionGroups>

0 comments on commit 03d0363

Please sign in to comment.