mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-09-03 23:12:15 -07:00
Change map legend color key (#732)
* Change map legend color key - make legend key a circle - remove blue border in legend - remove blue border in color key of side panel * Add space in CBG sub-headings - update snaphots * Add state to the AreaDetail component - add useState to track the community of focus - add useEffect to control rendering - remove getCategorization() - clean up all SASS around 'prioritization' - add snapshots
This commit is contained in:
parent
77a5f179a9
commit
94095ff4c2
6 changed files with 67 additions and 104 deletions
|
@ -1,10 +1,9 @@
|
|||
import * as React from 'react';
|
||||
import {render} from '@testing-library/react';
|
||||
import AreaDetail, {getCategorization, readablePercentile} from '..';
|
||||
import AreaDetail, {readablePercentile} from '..';
|
||||
import {LocalizedComponent} from '../../../test/testHelpers';
|
||||
|
||||
import * as constants from '../../../data/constants';
|
||||
import * as EXPLORE_COPY from '../../../data/copy/explore';
|
||||
|
||||
describe('rendering of the AreaDetail', () => {
|
||||
const properties = {
|
||||
|
@ -22,8 +21,7 @@ describe('rendering of the AreaDetail', () => {
|
|||
<LocalizedComponent>
|
||||
<AreaDetail properties={properties}/>
|
||||
</LocalizedComponent>,
|
||||
)
|
||||
;
|
||||
);
|
||||
|
||||
it('checks if various text fields are visible', () => {
|
||||
expect(asFragment()).toMatchSnapshot();
|
||||
|
@ -36,17 +34,3 @@ describe('tests the readablePercentile function', () => {
|
|||
expect(readablePercentile(.123)).toEqual(12);
|
||||
expect(readablePercentile(.789)).toEqual(79);
|
||||
});
|
||||
|
||||
describe('tests the getCategorization function', () => {
|
||||
it(`should equal Community of focus for value >= ${constants.SCORE_BOUNDARY_LOW}`, () => {
|
||||
expect(getCategorization(.756)).toEqual([EXPLORE_COPY.COMMUNITY.OF_FOCUS, undefined]);
|
||||
});
|
||||
|
||||
it(`should equal Threshold for .60 <= value < ${constants.SCORE_BOUNDARY_THRESHOLD}`, () => {
|
||||
expect(getCategorization(.65)).toEqual([EXPLORE_COPY.COMMUNITY.NOT_OF_FOCUS, undefined]);
|
||||
});
|
||||
|
||||
it(`should equal Non-prioritized for value < ${constants.SCORE_BOUNDARY_PRIORITIZED}`, () => {
|
||||
expect(getCategorization(.53)).toEqual([EXPLORE_COPY.COMMUNITY.NOT_OF_FOCUS, undefined]);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue