mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-22 01:31:25 -08:00
Fix AREA MEDIAN INCOME prop on map (#860)
- add indicator values of selected CBG to console - update snapshots - update cypress tests (failure on zoom)
This commit is contained in:
parent
28c5b9c869
commit
68014c94e4
6 changed files with 15 additions and 12 deletions
|
@ -12,9 +12,9 @@ describe('Will it zoom into territories correctly?', () => {
|
|||
// Removing z as each tests has variance on it's value
|
||||
const tests = {
|
||||
'Lower 48': '/38.07/-95.87',
|
||||
'Puerto Rico': '/18.2/-66.583',
|
||||
|
||||
// Todo: Understand what causes these two to hang intermittently ticket #579
|
||||
// 'Puerto Rico': '/18.2/-66.583',
|
||||
// 'Alaska': '/63.28/-162.39',
|
||||
// 'Hawaii': '5.35/20.574/-161.438',
|
||||
};
|
||||
|
|
|
@ -65,7 +65,7 @@ const AreaDetail = ({properties}:IAreaDetailProps) => {
|
|||
const areaMedianIncome:indicatorInfo = {
|
||||
label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.AREA_MEDIAN_INCOME),
|
||||
description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.AREA_MEDIAN_INCOME),
|
||||
value: properties[constants.POVERTY_PROPERTY_PERCENTILE],
|
||||
value: properties[constants.AREA_MEDIAN_INCOME_PERCENTILE],
|
||||
};
|
||||
const eduInfo:indicatorInfo = {
|
||||
label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.EDUCATION),
|
||||
|
|
|
@ -68,7 +68,7 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
|
|||
Area Median Income
|
||||
</h4>
|
||||
<div>
|
||||
9900
|
||||
19
|
||||
<sup>
|
||||
<span>
|
||||
th
|
||||
|
@ -90,7 +90,7 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
|
|||
Education, less than high school
|
||||
</h4>
|
||||
<div>
|
||||
9800
|
||||
98
|
||||
<sup>
|
||||
<span>
|
||||
th
|
||||
|
@ -112,7 +112,7 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
|
|||
Poverty
|
||||
</h4>
|
||||
<div>
|
||||
9900
|
||||
12
|
||||
<sup>
|
||||
<span>
|
||||
th
|
||||
|
@ -266,7 +266,7 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
|
|||
Housing cost burden
|
||||
</h4>
|
||||
<div>
|
||||
9500
|
||||
95
|
||||
<sup>
|
||||
<span>
|
||||
th
|
||||
|
|
|
@ -7,14 +7,15 @@ import * as constants from '../../../data/constants';
|
|||
|
||||
describe('rendering of the AreaDetail', () => {
|
||||
const properties = {
|
||||
[constants.POVERTY_PROPERTY_PERCENTILE]: 99,
|
||||
[constants.EDUCATION_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.POVERTY_PROPERTY_PERCENTILE]: .12,
|
||||
[constants.EDUCATION_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,
|
||||
};
|
||||
|
||||
const {asFragment} = render(
|
||||
|
|
|
@ -90,6 +90,7 @@ const J40Map = ({location}: IJ40Interface) => {
|
|||
);
|
||||
if (feature.id !== selectedFeatureId) {
|
||||
setSelectedFeature(feature);
|
||||
console.log(feature.properties);
|
||||
} else {
|
||||
setSelectedFeature(undefined);
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ export const WASTEWATER_PERCENTILE = 'Wastewater discharge (percentile)';
|
|||
export const LEAD_PAINT_PERCENTILE = 'Percent pre-1960s housing (lead paint indicator) (percentile)';
|
||||
export const DIESEL_MATTER_PERCENTILE = 'Diesel particulate matter (percentile)';
|
||||
export const PM25_PERCENTILE = 'Particulate matter (PM2.5) (percentile)';
|
||||
export const AREA_MEDIAN_INCOME_PERCENTILE = 'Median household income (% of AMI) (percentile)';
|
||||
|
||||
export type J40Properties = { [key: string]: any };
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue