From 8943739ec92d958c64aa4ccb2f660f9b65260949 Mon Sep 17 00:00:00 2001
From: mbucknell <mbucknell@usgs.gov>
Date: Fri, 12 Mar 2021 11:06:22 -0600
Subject: [PATCH] Fixed tests as the hydrograph state is now set regardless of
 whether the showOnlyGraph is set to true.

---
 .../components/hydrograph/index.test.js                   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

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 f4e38842e..5ca8249fe 100644
--- a/assets/src/scripts/monitoring-location/components/hydrograph/index.test.js
+++ b/assets/src/scripts/monitoring-location/components/hydrograph/index.test.js
@@ -211,7 +211,7 @@ describe('monitoring-location/components/hydrograph module', () => {
             expect(retrieveWaterwatchDataSpy).toHaveBeenCalledWith('11112222');
         });
 
-        it('Should fetch the data but not set the hydrograph state or fetch hydrograph parameters when showOnlyGraph is true', () => {
+        it('Should fetch the data and set the hydrograph state but not does not fetch hydrograph parameters when showOnlyGraph is true', () => {
             attachToNode(store, graphNode, {
                 ...INITIAL_PARAMETERS,
                 showOnlyGraph: true
@@ -225,7 +225,11 @@ describe('monitoring-location/components/hydrograph module', () => {
                 loadCompare: false,
                 loadMedian: false
             });
-            expect(store.getState().hydrographState).toEqual({});
+            expect(store.getState().hydrographState).toEqual({
+                selectedParameterCode: '72019',
+                selectedDateRange: 'P7D',
+                showCompareIVData: false
+            });
             expect(retrieveWaterwatchDataSpy).toHaveBeenCalled();
             expect(retrieveHydrographParametersSpy).not.toHaveBeenCalled();
         });
-- 
GitLab