From 56f87c86d9e9b2a788aaa305e9a49b158333d6f6 Mon Sep 17 00:00:00 2001 From: mbucknell <mbucknell@usgs.gov> Date: Tue, 2 Feb 2021 08:03:06 -0600 Subject: [PATCH] Added back in a basic test for the data table. --- .../monitoring-location/components/hydrograph/data-table.js | 1 + .../monitoring-location/components/hydrograph/index.test.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/data-table.js b/assets/src/scripts/monitoring-location/components/hydrograph/data-table.js index b30a142a5..1d938d226 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/data-table.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/data-table.js @@ -85,6 +85,7 @@ debugger; export const drawDataTables = function(elem, store) { elem.append('div') + .attr('id', 'hydrograph-data-tables') .call(link(store, drawDataTable, createStructuredSelector({ dataKind: () => 'iv', currentData: getCurrentPointData diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/index.test.js b/assets/src/scripts/monitoring-location/components/hydrograph/index.test.js index 83ea4a2be..f10948ce8 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/index.test.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/index.test.js @@ -649,7 +649,10 @@ describe('monitoring-location/components/hydrograph module', () => { // one for each of the two parameters and the WaterAlert links expect(selectAll('table .usa-tooltip').size()).toBe(4); }); - // Removed the data table test which just wasn't working. + + it('should have data tables for hydrograph data', () => { + expect(select('#hydrograph-data-tables').size()).toBe(1); + }) }); describe('hide elements when showOnlyGraph is set to true', () => { -- GitLab