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

tests for layout

parent 73d7ef9b
No related branches found
No related tags found
1 merge request!388WDFN-732 Plot Secondary Time Series - graph the time series
......@@ -73,5 +73,5 @@ export const getLayout = memoize(kind => createSelector(
}
));
export const getMainLayout = getLayout();
export const getMainLayout = getLayout('MAIN');
export const getBrushLayout = getLayout('BRUSH');
\ No newline at end of file
......@@ -16,5 +16,24 @@ describe('monitoring-location/components/hydrograph/layout module', () => {
expect(layout.width).toEqual(200);
expect(layout.height).toEqual(200 * ASPECT_RATIO);
expect(layout.windowWidth).toEqual(600);
expect(layout.margin.bottom).toEqual(5);
expect(layout.margin.top).toEqual(25);
expect(layout.margin.left).toEqual(45);
expect(layout.margin.right).toEqual(25);
});
it('expects that margins will adjust for secondary y-axis', () => {
const layout = getMainLayout.resultFunc(200, 600, {
tickValues: [5, 10, 15],
tickFormat: format('d')
}, '00065');
expect(layout.width).toEqual(200);
expect(layout.height).toEqual(200 * ASPECT_RATIO);
expect(layout.windowWidth).toEqual(600);
expect(layout.margin.bottom).toEqual(5);
expect(layout.margin.top).toEqual(25);
expect(layout.margin.left).toEqual(45);
expect(layout.margin.right).toEqual(45);
});
});
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