@financial-times/n-conversion-forms 23.0.4 → 23.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/__mocks__/@financial-times/o-expander.js +9 -0
  2. package/__mocks__/@financial-times/o-forms-input.js +11 -0
  3. package/__mocks__/@financial-times/o-forms.js +40 -0
  4. package/build-state/npm-shrinkwrap.json +74 -167
  5. package/components/__snapshots__/payment-type.spec.js.snap +18 -0
  6. package/components/delivery-security-instructions.spec.js +3 -3
  7. package/components/graduation-date.spec.js +8 -8
  8. package/components/payment-term.spec.js +3 -3
  9. package/components/payment-type.jsx +2 -1
  10. package/components/responsibility.jsx +1 -1
  11. package/dist/payment-type.js +3 -1
  12. package/dist/responsibility.js +1 -1
  13. package/helpers/index.spec.js +11 -0
  14. package/helpers/ncf-common-data.spec.js +34 -0
  15. package/helpers/ncf-countries.spec.js +136 -0
  16. package/jest.config.js +3 -0
  17. package/package.json +2 -1
  18. package/utils/app-banner.spec.js +68 -0
  19. package/utils/apple-pay.spec.js +177 -0
  20. package/utils/billing-country.spec.js +87 -0
  21. package/utils/billing-postcode.spec.js +138 -0
  22. package/utils/company-name.spec.js +3 -7
  23. package/utils/country.spec.js +87 -0
  24. package/utils/delivery-address-type.spec.js +24 -11
  25. package/utils/delivery-option-messages.spec.js +3 -3
  26. package/utils/delivery-option.spec.js +100 -15
  27. package/utils/delivery-postcode.spec.js +138 -0
  28. package/utils/delivery-start-date.spec.js +177 -0
  29. package/utils/email.spec.js +210 -0
  30. package/utils/event-notifier.spec.js +116 -0
  31. package/utils/form-element.spec.js +71 -0
  32. package/utils/loader.spec.js +161 -0
  33. package/utils/password.spec.js +65 -0
  34. package/utils/payment-term.spec.js +198 -0
  35. package/utils/payment-type.spec.js +136 -0
  36. package/utils/postcode.spec.js +122 -0
  37. package/utils/salesforce.spec.js +30 -0
  38. package/utils/submit.spec.js +81 -0
  39. package/utils/tracking.spec.js +174 -0
  40. package/utils/validation.spec.js +234 -0
  41. package/utils/zuora.spec.js +249 -0
@@ -0,0 +1,177 @@
1
+ const ApplePay = require('./apple-pay');
2
+
3
+ describe('Apple Pay', () => {
4
+ let request;
5
+ let window;
6
+ let event;
7
+ let applePay;
8
+
9
+ beforeEach(() => {
10
+ request = { canMakePayment: function () {}, show: function () {} };
11
+ window = {
12
+ PaymentRequest: function () {
13
+ return request;
14
+ },
15
+ fetch: function () {
16
+ return Promise.resolve({ json: function () {} });
17
+ },
18
+ };
19
+ event = { complete: function () {} };
20
+
21
+ jest.spyOn(request, 'canMakePayment');
22
+ jest.spyOn(request, 'show');
23
+ jest.spyOn(window, 'PaymentRequest');
24
+ jest.spyOn(window, 'fetch');
25
+ jest.spyOn(event, 'complete');
26
+ });
27
+
28
+ afterEach(() => {
29
+ jest.clearAllMocks();
30
+ });
31
+
32
+ describe('public methods', () => {
33
+ describe('constructor', () => {
34
+ it('throws an error if PaymentRequest not available', () => {
35
+ window.PaymentRequest = null;
36
+ expect(() => {
37
+ new ApplePay(window);
38
+ }).toThrow();
39
+ });
40
+
41
+ it('creates the PaymentRequest with the defaults', () => {
42
+ new ApplePay(window);
43
+ expect(window.PaymentRequest).toHaveBeenCalledWith(
44
+ ApplePay.PAYMENT_METHODS,
45
+ ApplePay.PAYMENT_DETAILS,
46
+ ApplePay.PAYMENT_OPTIONS
47
+ );
48
+ });
49
+ });
50
+
51
+ describe('canMakePayment', () => {
52
+ it('proxies canMakePayment to the request', () => {
53
+ applePay = new ApplePay(window);
54
+ applePay.canMakePayment();
55
+ expect(request.canMakePayment).toHaveBeenCalled();
56
+ });
57
+ });
58
+
59
+ describe('show', () => {
60
+ it('proxies show to the request', () => {
61
+ applePay = new ApplePay(window);
62
+ applePay.show();
63
+ expect(request.show).toHaveBeenCalled();
64
+ });
65
+
66
+ it('does not create new request if no details passed', () => {
67
+ applePay = new ApplePay(window);
68
+ applePay.show();
69
+ expect(window.PaymentRequest).toHaveBeenCalledTimes(1);
70
+ });
71
+
72
+ it('creates new request if new details passed', () => {
73
+ applePay = new ApplePay(window);
74
+ applePay.show({ total: { label: 'new' } });
75
+ expect(window.PaymentRequest).toHaveBeenCalledTimes(2);
76
+ });
77
+
78
+ it('creates new request with right parameters', () => {
79
+ applePay = new ApplePay(window);
80
+ applePay.show({ total: { label: 'new' } });
81
+ expect(window.PaymentRequest).toHaveBeenCalledWith(
82
+ applePay.methods,
83
+ applePay.details,
84
+ applePay.options
85
+ );
86
+ });
87
+
88
+ it('setup onmerchantvalidation method', () => {
89
+ delete request.onmerchantvalidation;
90
+ applePay = new ApplePay(window);
91
+ applePay.show();
92
+ expect(request.onmerchantvalidation).toBeInstanceOf(Function);
93
+ });
94
+ });
95
+
96
+ describe('handleMerchantValidation', () => {
97
+ it('uses the production merchant validation URL by default', () => {
98
+ applePay = new ApplePay(window);
99
+ applePay.handleMerchantValidation(event);
100
+ expect(window.fetch).toHaveBeenCalledWith(
101
+ ApplePay.MERCHANT_VALIDATION_URL,
102
+ expect.anything()
103
+ );
104
+ });
105
+
106
+ it('uses the test merchant validation URL', () => {
107
+ applePay = new ApplePay(window, ApplePay.TEST_PAYMENT_METHODS);
108
+ applePay.handleMerchantValidation(event);
109
+ expect(window.fetch).toHaveBeenCalledWith(
110
+ ApplePay.TEST_MERCHANT_VALIDATION_URL,
111
+ expect.anything()
112
+ );
113
+ });
114
+
115
+ it('calls event.complete with response', async () => {
116
+ applePay = new ApplePay(window);
117
+ await applePay.handleMerchantValidation(event);
118
+ expect(event.complete).toHaveBeenCalled();
119
+ });
120
+ });
121
+ });
122
+
123
+ describe('static methods', () => {
124
+ describe('getMerchantId', () => {
125
+ it('returns default merchant id', () => {
126
+ expect(ApplePay.getMerchantId()).toEqual(expect.any(String));
127
+ });
128
+
129
+ it('returns default merchant id if methods has no data', () => {
130
+ const methods = [{}];
131
+ expect(ApplePay.getMerchantId(methods)).toEqual(expect.any(String));
132
+ });
133
+
134
+ it('returns default merchant id if methods data has not got one', () => {
135
+ const methods = [{ data: {} }];
136
+ expect(ApplePay.getMerchantId(methods)).toEqual(expect.any(String));
137
+ });
138
+
139
+ it('returns merchant id from methods data', () => {
140
+ const methods = [{ data: { merchantIdentifier: 'test' } }];
141
+ expect(ApplePay.getMerchantId(methods)).toEqual('test');
142
+ });
143
+ });
144
+
145
+ describe('getMerchantValidationUrl', () => {
146
+ it('returns production merchant validation url', () => {
147
+ expect(ApplePay.getMerchantValidationUrl(ApplePay.MERCHANT_ID)).toEqual(
148
+ ApplePay.MERCHANT_VALIDATION_URL
149
+ );
150
+ });
151
+
152
+ it('returns a differnt merchant validation url for test merchant', () => {
153
+ expect(
154
+ ApplePay.getMerchantValidationUrl(ApplePay.TEST_MERCHANT_ID)
155
+ ).toEqual(ApplePay.TEST_MERCHANT_VALIDATION_URL);
156
+ });
157
+
158
+ it('defaults to the production merchant validation url', () => {
159
+ expect(ApplePay.getMerchantValidationUrl()).toEqual(
160
+ ApplePay.MERCHANT_VALIDATION_URL
161
+ );
162
+ });
163
+ });
164
+
165
+ describe('getPaymentDetails', () => {
166
+ it('formats given values in payment details object', () => {
167
+ const label = 'test';
168
+ const value = 1.01;
169
+ const currency = 'GBP';
170
+ const details = ApplePay.getPaymentDetails(value, currency, label);
171
+
172
+ expect(details.total.label).toEqual(label);
173
+ expect(details.total.amount).toEqual({ value, currency });
174
+ });
175
+ });
176
+ });
177
+ });
@@ -0,0 +1,87 @@
1
+ const BillingCountry = require('./billing-country');
2
+
3
+ describe('BillingCountry', () => {
4
+ let billingCountry;
5
+ let documentStub;
6
+ let elementStub;
7
+
8
+ beforeEach(() => {
9
+ elementStub = {
10
+ addEventListener: jest.fn(),
11
+ selectedIndex: 1,
12
+ options: [{ value: 0 }, { value: 1 }, { value: 2 }],
13
+ };
14
+ documentStub = {
15
+ querySelector: jest.fn(),
16
+ };
17
+ });
18
+
19
+ afterEach(() => {
20
+ jest.clearAllMocks();
21
+ });
22
+
23
+ describe('constructor', () => {
24
+ it('throws an error if nothing passed', () => {
25
+ expect(() => {
26
+ new BillingCountry();
27
+ }).toThrow();
28
+ });
29
+
30
+ it('throws an error if field not present', () => {
31
+ expect(() => {
32
+ documentStub.querySelector.mockReturnValue(false);
33
+ new BillingCountry(documentStub);
34
+ }).toThrow();
35
+ });
36
+ });
37
+
38
+ describe('constructed', () => {
39
+ beforeEach(() => {
40
+ documentStub.querySelector.mockReturnValue(elementStub);
41
+ billingCountry = new BillingCountry(documentStub);
42
+ });
43
+
44
+ describe('onChange', () => {
45
+ it('adds an event listener on change', () => {
46
+ billingCountry.onChange();
47
+ expect(elementStub.addEventListener).toHaveBeenCalledWith(
48
+ 'change',
49
+ expect.anything()
50
+ );
51
+ });
52
+
53
+ it('calls the callback', () => {
54
+ const callback = jest.fn();
55
+ elementStub.addEventListener = (type, callback) => callback();
56
+ billingCountry.onChange(callback);
57
+ expect(callback).toHaveBeenCalled();
58
+ });
59
+ });
60
+
61
+ describe('getSelected', () => {
62
+ it('throws an error if nothing selected', () => {
63
+ elementStub.options = [];
64
+ elementStub.selectedIndex = 0;
65
+ expect(() => {
66
+ billingCountry.getSelected();
67
+ }).toThrow();
68
+ });
69
+
70
+ it('throws an error if something selected that is not there', () => {
71
+ elementStub.selectedIndex = 4;
72
+ expect(() => {
73
+ billingCountry.getSelected();
74
+ }).toThrow();
75
+ });
76
+
77
+ it('returns the selected option', () => {
78
+ expect(billingCountry.getSelected()).toBe(1);
79
+ });
80
+
81
+ it('returns the changed selected option', () => {
82
+ elementStub.selectedIndex = 0;
83
+ expect(billingCountry.getSelected()).toBe(0);
84
+ });
85
+ });
86
+ });
87
+ });
@@ -0,0 +1,138 @@
1
+ const BillingPostcode = require('./billing-postcode');
2
+
3
+ describe('BillingPostcode', () => {
4
+ let billingPostcode;
5
+ let querySelectorStub;
6
+ let querySelectorAllStub;
7
+
8
+ beforeEach(() => {
9
+ const document = {
10
+ querySelector: () => {
11
+ return {
12
+ querySelectorAll: () => {},
13
+ querySelector: () => {},
14
+ };
15
+ },
16
+ };
17
+ billingPostcode = new BillingPostcode(
18
+ document,
19
+ '.ncf #billingPostcodeField'
20
+ );
21
+ querySelectorStub = jest.spyOn(billingPostcode.$el, 'querySelector');
22
+ querySelectorAllStub = jest.spyOn(billingPostcode.$el, 'querySelectorAll');
23
+ });
24
+
25
+ afterEach(() => {
26
+ jest.clearAllMocks();
27
+ });
28
+
29
+ it('returns an element', () => {
30
+ expect(billingPostcode.$el).toBeDefined();
31
+ });
32
+
33
+ describe('changePostcodeReferenceForCountry', () => {
34
+ beforeEach(() => {
35
+ querySelectorStub.mockReturnValue({ innerHTML: '' });
36
+ querySelectorAllStub.mockReturnValue([
37
+ { innerHTML: '' },
38
+ { innerHTML: '' },
39
+ ]);
40
+ });
41
+
42
+ describe('postcode reference name', () => {
43
+ it('calls querySelector with [data-reference]', () => {
44
+ billingPostcode.changePostcodeReferenceForCountry = 'GBR';
45
+ expect(querySelectorAllStub).toHaveBeenCalledWith(
46
+ '[data-reference=postcode]'
47
+ );
48
+ });
49
+
50
+ it('sets postcodeReference to post code by default', () => {
51
+ const expectedResponse = [
52
+ { innerHTML: 'postcode' },
53
+ { innerHTML: 'postcode' },
54
+ ];
55
+ billingPostcode.changePostcodeReferenceForCountry = 'GBR';
56
+ expect(billingPostcode.reference).toEqual(expectedResponse);
57
+ });
58
+
59
+ it('sets postcodeReference to zip code when country code is USA', () => {
60
+ const expectedResponse = [
61
+ { innerHTML: 'zip code' },
62
+ { innerHTML: 'zip code' },
63
+ ];
64
+ billingPostcode.changePostcodeReferenceForCountry = 'USA';
65
+ expect(billingPostcode.reference).toEqual(expectedResponse);
66
+ });
67
+
68
+ it('sets postcodeReference to postal code when country code is Canada', () => {
69
+ const expectedResponse = [
70
+ { innerHTML: 'postal code' },
71
+ { innerHTML: 'postal code' },
72
+ ];
73
+ billingPostcode.changePostcodeReferenceForCountry = 'CAN';
74
+ expect(billingPostcode.reference).toEqual(expectedResponse);
75
+ });
76
+ });
77
+
78
+ describe('placeholder', () => {
79
+ it('calls querySelector with span input', () => {
80
+ querySelectorStub.mockReturnValue({
81
+ placeholder: 'Enter your postcode',
82
+ });
83
+ billingPostcode.changePostcodeReferenceForCountry = 'GBR';
84
+ expect(querySelectorStub).toBeCalledWith('input');
85
+ });
86
+
87
+ it('sets postcode placeholder to `Enter your postcode` by default', () => {
88
+ querySelectorStub.mockReturnValue({
89
+ placeholder: 'Enter your zip code',
90
+ });
91
+ billingPostcode.changePostcodeReferenceForCountry = 'GBR';
92
+ expect(billingPostcode.postcodeInput.placeholder).toEqual(
93
+ 'Enter your postcode'
94
+ );
95
+ });
96
+
97
+ it('sets postcode placeholder to `Enter your zip code` when country code is USA', () => {
98
+ querySelectorStub.mockReturnValue({
99
+ placeholder: 'Enter your postcode',
100
+ });
101
+ billingPostcode.changePostcodeReferenceForCountry = 'USA';
102
+ expect(billingPostcode.postcodeInput.placeholder).toEqual(
103
+ 'Enter your zip code'
104
+ );
105
+ });
106
+
107
+ it('sets postcode placeholder to `Enter your postal code` when country code is Canada', () => {
108
+ querySelectorStub.mockReturnValue({
109
+ placeholder: 'Enter your zip code',
110
+ });
111
+ billingPostcode.changePostcodeReferenceForCountry = 'CAN';
112
+ expect(billingPostcode.postcodeInput.placeholder).toEqual(
113
+ 'Enter your postal code'
114
+ );
115
+ });
116
+ });
117
+ });
118
+
119
+ describe('getPostcodeReferenceByCountry', () => {
120
+ it('returns post code by default ', () => {
121
+ expect(BillingPostcode.getPostcodeReferenceByCountry('ZAR')).toEqual(
122
+ 'postcode'
123
+ );
124
+ });
125
+
126
+ it('returns postal code when country is Canada', () => {
127
+ expect(BillingPostcode.getPostcodeReferenceByCountry('CAN')).toEqual(
128
+ 'postal code'
129
+ );
130
+ });
131
+
132
+ it('returns zip code when country is USA', () => {
133
+ expect(BillingPostcode.getPostcodeReferenceByCountry('USA')).toEqual(
134
+ 'zip code'
135
+ );
136
+ });
137
+ });
138
+ });
@@ -5,25 +5,21 @@ import Enzyme, { mount } from 'enzyme';
5
5
  import Adapter from 'enzyme-adapter-react-16';
6
6
  Enzyme.configure({ adapter: new Adapter() });
7
7
 
8
- const { JSDOM } = require('jsdom');
9
-
10
8
  describe('Company Name - Util', () => {
11
9
  describe('Make Optional/Required using the methods inherited from FormElements', () => {
12
- it('should switch between required and optional the input by adding and removing the related classes', () => {
10
+ it('switches between required and optional the input by adding and removing the related classes', () => {
13
11
  const props = {};
14
12
  const component = mount(
15
13
  <Form>
16
14
  <CompanyName {...props} />
17
15
  </Form>
18
16
  );
19
- const dom = new JSDOM(`
17
+ document.body.innerHTML = `
20
18
  <!DOCTYPE html>
21
19
  <html>
22
20
  <head></head>
23
21
  <body>${component.html()}</body>
24
- </html>
25
- `);
26
- const document = dom.window.document;
22
+ </html>`;
27
23
 
28
24
  const companyNameUtilInstance = new CompanyNameUtil(document);
29
25
  expect(companyNameUtilInstance).toBeDefined();
@@ -0,0 +1,87 @@
1
+ const Country = require('./country');
2
+
3
+ describe('Country', () => {
4
+ let country;
5
+ let documentStub;
6
+ let elementStub;
7
+
8
+ beforeEach(() => {
9
+ elementStub = {
10
+ addEventListener: jest.fn(),
11
+ selectedIndex: 1,
12
+ options: [{ value: 0 }, { value: 1 }, { value: 2 }],
13
+ };
14
+ documentStub = {
15
+ querySelector: jest.fn(),
16
+ };
17
+ });
18
+
19
+ afterEach(() => {
20
+ jest.clearAllMocks();
21
+ });
22
+
23
+ describe('constructor', () => {
24
+ it('throws an error if nothing passed', () => {
25
+ expect(() => {
26
+ new Country();
27
+ }).toThrow();
28
+ });
29
+
30
+ it('throws an error if field not present', () => {
31
+ expect(() => {
32
+ documentStub.querySelector.mockReturnValue(false);
33
+ new Country(documentStub);
34
+ }).toThrow();
35
+ });
36
+ });
37
+
38
+ describe('constructed', () => {
39
+ beforeEach(() => {
40
+ documentStub.querySelector.mockReturnValue(elementStub);
41
+ country = new Country(documentStub);
42
+ });
43
+
44
+ describe('onChange', () => {
45
+ it('adds an event listener on change', () => {
46
+ country.onChange();
47
+ expect(elementStub.addEventListener).toHaveBeenCalledWith(
48
+ 'change',
49
+ expect.anything()
50
+ );
51
+ });
52
+
53
+ it('calls the callback', () => {
54
+ const callback = jest.fn();
55
+ elementStub.addEventListener = (type, callback) => callback();
56
+ country.onChange(callback);
57
+ expect(callback).toHaveBeenCalled();
58
+ });
59
+ });
60
+
61
+ describe('getSelected', () => {
62
+ it('throws an error if nothing selected', () => {
63
+ elementStub.options = [];
64
+ elementStub.selectedIndex = 0;
65
+ expect(() => {
66
+ country.getSelected();
67
+ }).toThrow();
68
+ });
69
+
70
+ it('throws an error if something selected that is not there', () => {
71
+ elementStub.selectedIndex = 4;
72
+ expect(() => {
73
+ country.getSelected();
74
+ }).toThrow();
75
+ });
76
+
77
+ it('returns the selected option', () => {
78
+ expect(country.getSelected()).toBe(1);
79
+ });
80
+
81
+ it('returns the changed selected option', () => {
82
+ elementStub.selectedIndex = 0;
83
+ expect(country.getSelected()).toBe(0);
84
+ });
85
+ });
86
+ });
87
+ });
@@ -5,43 +5,56 @@ import Enzyme, { mount } from 'enzyme';
5
5
  import Adapter from 'enzyme-adapter-react-16';
6
6
  Enzyme.configure({ adapter: new Adapter() });
7
7
 
8
- const { JSDOM } = require('jsdom');
9
-
10
8
  describe('Delivery Address Type - Util', () => {
11
9
  describe('Get an instance of the util class', () => {
12
- it('should throw an error since the component is not found', () => {
10
+ it('throws an error since the component is not found', () => {
13
11
  const component = mount(<Form></Form>);
14
- const jsdom = JSDOM.fragment(component.html());
12
+ document.body.innerHTML = `
13
+ <!DOCTYPE html>
14
+ <html>
15
+ <head></head>
16
+ <body>${component.html()}</body>
17
+ </html>`;
15
18
 
16
19
  expect(() => {
17
- new DeliveryAdressTypeUtil(jsdom);
20
+ new DeliveryAdressTypeUtil(document);
18
21
  }).toThrow();
19
22
  });
20
23
  });
21
24
  describe('Get option selected', () => {
22
- it('should return the default option', () => {
25
+ it('returns the default option', () => {
23
26
  const props = {};
24
27
  const component = mount(
25
28
  <Form>
26
29
  <DeliveryAddressType {...props} />
27
30
  </Form>
28
31
  );
29
- const jsdom = JSDOM.fragment(component.html());
32
+ document.body.innerHTML = `
33
+ <!DOCTYPE html>
34
+ <html>
35
+ <head></head>
36
+ <body>${component.html()}</body>
37
+ </html>`;
30
38
 
31
- const deliveryAdressTypeUtilInstance = new DeliveryAdressTypeUtil(jsdom);
39
+ const deliveryAdressTypeUtilInstance = new DeliveryAdressTypeUtil(document);
32
40
  expect(deliveryAdressTypeUtilInstance.getSelected()).toEqual('home');
33
41
  });
34
42
 
35
- it('should return the option selected different than the default', () => {
43
+ it('returns the option selected different than the default', () => {
36
44
  const props = { value: 'pobox' };
37
45
  const component = mount(
38
46
  <Form>
39
47
  <DeliveryAddressType {...props} />
40
48
  </Form>
41
49
  );
42
- const jsdom = JSDOM.fragment(component.html());
50
+ document.body.innerHTML = `
51
+ <!DOCTYPE html>
52
+ <html>
53
+ <head></head>
54
+ <body>${component.html()}</body>
55
+ </html>`;
43
56
 
44
- const deliveryAdressTypeUtilInstance = new DeliveryAdressTypeUtil(jsdom);
57
+ const deliveryAdressTypeUtilInstance = new DeliveryAdressTypeUtil(document);
45
58
  expect(deliveryAdressTypeUtilInstance.getSelected()).toEqual(props.value);
46
59
  });
47
60
  });
@@ -12,20 +12,20 @@ describe('Find Custom Delivery Option', () => {
12
12
  stubOption.mailDelivery = false;
13
13
  });
14
14
 
15
- it('should return undefined when other country than custom messages', () => {
15
+ it('returns undefined when other country than custom messages', () => {
16
16
  expect(
17
17
  getDeliveryOption(sixDaysProductCode, stubOption, 'AAA')
18
18
  ).toBeUndefined();
19
19
  });
20
20
 
21
- it('should return undefined when invalid distributor type code', () => {
21
+ it('returns undefined when invalid distributor type code', () => {
22
22
  const option = { ...stubOption, value: 'ZZ' };
23
23
  expect(
24
24
  getDeliveryOption(sixDaysProductCode, option, 'USA')
25
25
  ).toBeUndefined();
26
26
  });
27
27
 
28
- it('should return undefined when mailDelivery is false and not other required props are setup', () => {
28
+ it('returns undefined when mailDelivery is false and not other required props are setup', () => {
29
29
  stubOption.deliveryOnPublicationDate = undefined;
30
30
  stubOption.flightMarket = undefined;
31
31
  expect(