diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/method-picker.test.js b/assets/src/scripts/monitoring-location/components/hydrograph/method-picker.test.js index 5dfb46d2c996b34597e29755cca138a8fc56c09d..c40241b4b11e5fbe52784b9e8aee3860034a212d 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/method-picker.test.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/method-picker.test.js @@ -30,7 +30,7 @@ describe('monitoring-location/components/hydrograph/method-picker', () => { it('Creates a picker and sets the currentMethodID to preferred method id', () => { let store = configureStore(TEST_STATE); - div.call(drawMethodPicker, getSortedIVMethods(store.getState()), store); + div.call(drawMethodPicker, getSortedIVMethods('primary')(store.getState()), store); expect(div.select('select').property('value')).toEqual('90649'); }); @@ -49,7 +49,7 @@ describe('monitoring-location/components/hydrograph/method-picker', () => { } } }); - div.call(drawMethodPicker, getSortedIVMethods(store.getState()), store); + div.call(drawMethodPicker, getSortedIVMethods('primary')(store.getState()), store); expect(div.select('#primary-sampling-method-row').size()).toBe(0); }); @@ -58,7 +58,7 @@ describe('monitoring-location/components/hydrograph/method-picker', () => { let store = configureStore({ ...TEST_STATE }); - div.call(drawMethodPicker, getSortedIVMethods(store.getState()), store); + div.call(drawMethodPicker, getSortedIVMethods('primary')(store.getState()), store); const allOptionElements = div.selectAll('option'); expect(allOptionElements['_groups'][0][0].getAttribute('value')).toBe('90649'); expect(allOptionElements['_groups'][0][1].getAttribute('value')).toBe('252055'); @@ -68,7 +68,7 @@ describe('monitoring-location/components/hydrograph/method-picker', () => { let store = configureStore({ ...TEST_STATE }); - div.call(drawMethodPicker, getSortedIVMethods(store.getState()), store); + div.call(drawMethodPicker, getSortedIVMethods('primary')(store.getState()), store); expect(div.select('#no-data-points-note')['_groups'][0][0].innerHTML).toContain('some methods/sub-locations are disabled'); }); @@ -77,7 +77,7 @@ describe('monitoring-location/components/hydrograph/method-picker', () => { let store = configureStore({ ...TEST_STATE }); - div.call(drawMethodPicker, getSortedIVMethods(store.getState()), store); + div.call(drawMethodPicker, getSortedIVMethods('primary')(store.getState()), store); expect(div.select('.usa-tooltip__body')['_groups'][0][0].innerHTML).toContain('The names used in ' + 'dropdown menu are often specific to a particular monitoring location and describe sampling ' + @@ -110,7 +110,7 @@ describe('monitoring-location/components/hydrograph/method-picker', () => { } } }); - div.call(drawMethodPicker, getSortedIVMethods(store.getState()), store); + div.call(drawMethodPicker, getSortedIVMethods('primary')(store.getState()), store); expect(div.select('#no-data-points-note').size()).toBe(0); }); diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/selectors/time-series-data.test.js b/assets/src/scripts/monitoring-location/components/hydrograph/selectors/time-series-data.test.js index 787667bf4b56b016c83f1460a30c8dddf4e3ee01..4466684197a52f2061c1d348b98774a92646cbce 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/selectors/time-series-data.test.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/selectors/time-series-data.test.js @@ -544,7 +544,7 @@ describe('monitoring-location/components/hydrograph/selectors/time-series-data m describe('getSortedIVMethods', () => { it('The first object in the array will have the most data points', () => { - const result = getSortedIVMethods({ + const result = getSortedIVMethods('primary')({ hydrographData: { ...TEST_STATE.hydrographData, primaryIVData: { @@ -576,7 +576,7 @@ describe('monitoring-location/components/hydrograph/selectors/time-series-data m expect(result.methods[2].methodID).toBe('69937'); }); it('If there is not a sampling method description, the method id will be used', () => { - const result = getSortedIVMethods({ + const result = getSortedIVMethods('primary')({ hydrographData: { ...TEST_STATE.hydrographData, primaryIVData: { diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/vue-components/data-table.test.js b/assets/src/scripts/monitoring-location/components/hydrograph/vue-components/data-table.test.js index e092e4d5bde75d3be08b13c1962de9ec1bfcea19..a9b0174639519751cbaaf2228a0f27808686f058 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/vue-components/data-table.test.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/vue-components/data-table.test.js @@ -147,7 +147,8 @@ describe('monitoring-location/components/hydrograph/components/data-table.vue', hydrographState: { showSecondaryIVData: true, selectedParameterCode: '72019', - selectedIVMethodID: '90649' + selectedIVMethodID: '90649', + selectedSecondaryIVMethodID: '57465' } });