From 719ed5012fc6a4761e9a6fc7924f101b94be0251 Mon Sep 17 00:00:00 2001 From: Aaron Briggs <abriggs@contractor.usgs.gov> Date: Fri, 19 Feb 2021 09:12:21 -0600 Subject: [PATCH] clean up tests --- .../components/hydrograph/legend.test.js | 50 +------------------ .../hydrograph/selectors/legend-data.test.js | 4 +- 2 files changed, 3 insertions(+), 51 deletions(-) diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/legend.test.js b/assets/src/scripts/monitoring-location/components/hydrograph/legend.test.js index a01b6bcfa..5330ff2e6 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/legend.test.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/legend.test.js @@ -17,8 +17,6 @@ describe('monitoring-location/components/hydrograph/legend module', () => { timeSeries: { '00060:current': { tsKey: 'current:P7D', - startTime: new Date('2018-03-06T15:45:00.000Z'), - endTime: new Date('2018-03-13T13:45:00.000Z'), variable: '45807197', points: [{ value: 10, @@ -36,55 +34,19 @@ describe('monitoring-location/components/hydrograph/legend module', () => { approved: false, estimated: false }] - }, - '00060:compare': { - tsKey: 'compare:P7D', - startTime: new Date('2018-03-06T15:45:00.000Z'), - endTime: new Date('2018-03-06T15:45:00.000Z'), - variable: '45807202', - points: [{ - value: 1, - qualifiers: ['A'], - approved: false, - estimated: false - }, { - value: 2, - qualifiers: ['A'], - approved: false, - estimated: false - }, { - value: 3, - qualifiers: ['E'], - approved: false, - estimated: false - }] } }, variables: { '45807197': { variableCode: {value: '00060'}, - variableName: 'Streamflow', - variableDescription: 'Discharge, cubic feet per second', oid: '45807197' - }, - '45807202': { - variableCode: {value: '00065'}, - variableName: 'Gage height', - oid: '45807202' } } }, statisticsData: { median: { '00060': { - '1': [{ - month_nu: '2', - day_nu: '25', - p50_va: '43', - begin_yr: '1970', - end_yr: '2017', - loc_web_ds: 'This method' - }] + '1': [{ }] } } }, @@ -93,18 +55,8 @@ describe('monitoring-location/components/hydrograph/legend module', () => { currentIVDateRange: 'P7D', showIVTimeSeries: { current: true, - compare: true, median: true } - }, - floodData: { - floodLevels: { - site_no: '07144100', - action_stage: null, - flood_stage: '22', - moderate_flood_stage: '25', - major_flood_stage: '26' - } } }; diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/selectors/legend-data.test.js b/assets/src/scripts/monitoring-location/components/hydrograph/selectors/legend-data.test.js index 0b7dbb78f..a30b06d48 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/selectors/legend-data.test.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/selectors/legend-data.test.js @@ -122,7 +122,7 @@ describe('monitoring-location/components/hydrograph/selectors/legend-data', () = floodData: { floodLevels: { site_no: '07144100', - action_stage: '20', + action_stage: null, flood_stage: '22', moderate_flood_stage: '25', major_flood_stage: '26' @@ -172,7 +172,7 @@ describe('monitoring-location/components/hydrograph/selectors/legend-data', () = }; const result = getLegendMarkerRows(newData); - expect(result).toHaveLength(5); + expect(result).toHaveLength(4); expect(result[0]).toHaveLength(3); expect(result[0][0].type).toEqual(textOnlyMarker); expect(result[0][1].type).toEqual(lineMarker); -- GitLab