Skip to content
Snippets Groups Projects
Commit 47c6734b authored by Briggs, Aaron Shane's avatar Briggs, Aaron Shane
Browse files

added test

parent 8c416356
No related branches found
No related tags found
1 merge request!407Wdfn 791 title info icon does not have text
......@@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Parameter codes with multiple methods will now show statistical data for each method available.
- The hydrograph legend and time span shortcuts will now correctly display for calculated temperature parameter codes.
- The DV graph will now have an inverted y-axis for only certain parameter codes.
- When there is no data, title info icon will display appropriate text, rather than being blank.
## [1.2.0](https://github.com/usgs/waterdataui/compare/waterdataui-1.1.0...waterdataui-1.2.0) - 2022-06-10
### Added
......
......@@ -5,7 +5,8 @@ import * as utils from 'ui/utils';
import {configureStore} from 'ml/store';
import {setMedianDataVisibility} from 'ml/store/hydrograph-state';
import {TEST_PRIMARY_IV_DATA, TEST_GW_LEVELS, TEST_STATS_DATA,
import {
TEST_PRIMARY_IV_DATA, TEST_GW_LEVELS, TEST_STATS_DATA,
TEST_CURRENT_TIME_RANGE
} from './mock-hydrograph-state';
import {drawTimeSeriesGraphData, initializeTimeSeriesGraph} from './time-series-graph';
......@@ -114,4 +115,32 @@ describe('monitoring-location/components/hydrograph/time-series-graph', () => {
expect(div.selectAll('.iv-graph-gw-levels-group').html()).not.toEqual('');
expect(div.selectAll('.median-stats-group').size()).toBe(2);
});
it('expects the correct tooltip text when the description is available', () => {
initializeTimeSeriesGraph(div, store, '11112222', 'USGS', 'This site', true, true);
const titleDiv = div.select('.time-series-graph-title');
expect(titleDiv.select('.usa-tooltip').text()).toBe('Depth to water level, feet');
});
it('expects the correct tooltip text when the description is NOT available', () => {
const NO_PARAMETER_DATA = {
parameter: {
parameterCode: '00065'
},
values: {}
};
store = configureStore({
...TEST_STATE,
hydrographData: {
primaryIVData: NO_PARAMETER_DATA
}
});
initializeTimeSeriesGraph(div, store, '11112222', 'USGS', 'This site', true, true);
const titleDiv = div.select('.time-series-graph-title');
expect(titleDiv.select('.usa-tooltip').text()).toBe('No description available');
});
});
......@@ -153,7 +153,7 @@
}
#hydrograph-no-data-overlay {
color: red;
pointer-events: none;
position: absolute;
top: 0;
left: 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment