Skip to content

Commit c1ab6db

Browse files
author
Joan He
committed
Merge remote-tracking branch 'trigger/MAGETWO-95798' into BugFixPR
2 parents 22b0047 + 2aa4c39 commit c1ab6db

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@
3333
<element name="defaultShipping" type="button" selector=".billing-address-details"/>
3434
<element name="state" type="button" selector="//*[text()='Alabama']"/>
3535
<element name="stateInput" type="input" selector="input[name=region]"/>
36+
<element name="regionOptions" type="select" selector="select[name=region_id] option"/>
3637
</section>
3738
</sections>

app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<data key="vat_id">vatData</data>
3333
<data key="default_shipping">true</data>
3434
<data key="default_billing">true</data>
35+
<data key="region_qty">66</data>
3536
</entity>
3637
<entity name="US_Address_TX" type="address">
3738
<data key="firstname">John</data>

app/code/Magento/Ui/view/base/web/js/form/element/region.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,12 @@ define([
7878
* @param {String} field
7979
*/
8080
filter: function (value, field) {
81-
var country = registry.get(this.parentName + '.' + 'country_id'),
82-
option;
81+
var superFn = this._super;
8382

84-
if (country) {
85-
option = country.indexedOptions[value];
83+
registry.get(this.parentName + '.' + 'country_id', function (country) {
84+
var option = country.indexedOptions[value];
8685

87-
this._super(value, field);
86+
superFn.call(this, value, field);
8887

8988
if (option && option['is_region_visible'] === false) {
9089
// hide select and corresponding text input field if region must not be shown for selected country
@@ -94,7 +93,7 @@ define([
9493
this.toggleInput(false);
9594
}
9695
}
97-
}
96+
}.bind(this));
9897
}
9998
});
10099
});

0 commit comments

Comments
 (0)