Update side panel to 3-state design (#1276)

* Update field name to follow constant standard

* Add table to ETL commands to README

* Update Generate Map Tiles run time

* Add a comma to copy

* Add 3 state UI experience

- PR will only show workforce dev
- IA will only show workforce dev w/o linguistic iso
- update tests to tests 3 states
- change state to territory for Island Areas

* Modify PR and IA threshold counts

* Update tile_data_expected.pkl file
This commit is contained in:
Vim 2022-02-16 17:24:35 -05:00 committed by GitHub
commit f90125d1b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 634 additions and 48 deletions

View file

@ -8,23 +8,56 @@ import * as constants from '../../../data/constants';
describe('rendering of the AreaDetail', () => {
const properties = {
[constants.POVERTY_PROPERTY_PERCENTILE]: .12,
[constants.EDUCATION_PROPERTY_PERCENTILE]: .98,
[constants.HIGH_SCHOOL_PROPERTY_PERCENTILE]: .98,
[constants.LINGUISTIC_ISOLATION_PROPERTY_PERCENTILE]: .97,
[constants.UNEMPLOYMENT_PROPERTY_PERCENTILE]: .96,
[constants.HOUSING_BURDEN_PROPERTY_PERCENTILE]: .95,
[constants.SCORE_PROPERTY_HIGH]: .95,
[constants.GEOID_PROPERTY]: 98729374234,
[constants.TOTAL_POPULATION]: 3435435,
[constants.AREA_MEDIAN_INCOME_PERCENTILE]: .19,
[constants.POVERTY_PROPERTY_PERCENTILE]: .19,
[constants.SIDE_PANEL_STATE]: constants.SIDE_PANEL_STATE_VALUES.NATION,
};
const {asFragment} = render(
<LocalizedComponent>
<AreaDetail properties={properties}/>
</LocalizedComponent>,
);
it('checks if various text fields are visible', () => {
it('checks if indicators for NATION is present', () => {
const {asFragment} = render(
<LocalizedComponent>
<AreaDetail properties={properties}/>
</LocalizedComponent>,
);
expect(asFragment()).toMatchSnapshot();
});
it('checks if indicators for PUERTO RICO are present', () => {
const propertiesPR = {
...properties,
[constants.SIDE_PANEL_STATE]: constants.SIDE_PANEL_STATE_VALUES.PUERTO_RICO,
};
const {asFragment} = render(
<LocalizedComponent>
<AreaDetail properties={propertiesPR}/>
</LocalizedComponent>,
);
expect(asFragment()).toMatchSnapshot();
});
it('checks if indicators for ISLAND AREAS are present', () => {
const propertiesIA = {
...properties,
[constants.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDU_PERCENTILE_FIELD]: .9,
[constants.ISLAND_AREAS_POVERTY_LOW_HS_EDU_PERCENTILE_FIELD]: .8,
[constants.ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDU_PERCENTILE_FIELD]: .6,
[constants.ISLAND_AREAS_LOW_HS_EDU_PERCENTILE_FIELD]: .5,
[constants.SIDE_PANEL_STATE]: constants.SIDE_PANEL_STATE_VALUES.ISLAND_AREAS,
};
const {asFragment} = render(
<LocalizedComponent>
<AreaDetail properties={propertiesIA}/>
</LocalizedComponent>,
);
expect(asFragment()).toMatchSnapshot();
});
});