Skip to content

Commit 0a1d758

Browse files
MC-16254: [2.3] Flaky Unit Test: Magento_Ui/js/form/form.encountered a declaration exception
1 parent 675d313 commit 0a1d758

File tree

1 file changed

+19
-9
lines changed
  • dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/view

1 file changed

+19
-9
lines changed

dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/view/shipping.test.js

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ define(['squire', 'ko', 'jquery', 'jquery/validate'], function (Squire, ko, $) {
2121
closeModal: jasmine.createSpy()
2222
},
2323
country = {
24-
/** Stub */
25-
on: function () {},
26-
27-
/** Stub */
28-
get: function () {},
29-
30-
/** Stub */
31-
set: function () {}
24+
indexedOptions: {
25+
'AD': {
26+
label: 'Andorra',
27+
labeltitle: 'Andorra',
28+
value: 'AD'
29+
}
30+
}
3231
},
3332
mocks = {
3433
'Magento_Customer/js/model/customer': {
@@ -38,7 +37,17 @@ define(['squire', 'ko', 'jquery', 'jquery/validate'], function (Squire, ko, $) {
3837
'Magento_Checkout/js/model/address-converter': jasmine.createSpy(),
3938
'Magento_Checkout/js/model/quote': {
4039
isVirtual: jasmine.createSpy(),
41-
shippingMethod: ko.observable()
40+
shippingMethod: ko.observable(),
41+
42+
/**
43+
* Stub
44+
*/
45+
shippingAddress: function () {
46+
47+
return {
48+
'countryId': 'AD'
49+
};
50+
}
4251
},
4352
'Magento_Checkout/js/action/create-shipping-address': jasmine.createSpy().and.returnValue(
4453
jasmine.createSpyObj('newShippingAddress', ['getKey'])
@@ -85,6 +94,7 @@ define(['squire', 'ko', 'jquery', 'jquery/validate'], function (Squire, ko, $) {
8594
provider: 'provName',
8695
name: '',
8796
index: '',
97+
parentName: 'test',
8898
popUpForm: {
8999
options: {
90100
buttons: {

0 commit comments

Comments
 (0)