Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
benhammondmusic committed May 2, 2024
2 parents fc627b8 + fbf38b8 commit 00bf9fc
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 10 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/runFrontendTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,15 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Waiting for Netlify Preview
uses: josephduffy/wait-for-netlify-action@v1
id: wait-for-netlify-preview
# - name: Waiting for Netlify Preview
# uses: josephduffy/wait-for-netlify-action@v1
# id: wait-for-netlify-preview
# with:
# site_name: ${{env.NETLIFY_SITE_NAME}}
# max_timeout: 90
- name: Waiting for "Success" from Netlify Preview
uses: jakepartusch/wait-for-netlify-action@v1.4
id: waitFor200
with:
site_name: ${{env.NETLIFY_SITE_NAME}}
max_timeout: 90
Expand All @@ -85,7 +91,7 @@ jobs:
run: npx playwright install --with-deps chromium
- name: run E2E on DEPLOY_PREVIEW
run: npx playwright test --project=E2E_NIGHTLY --workers 4
# base url based on the GITHUB_PR_NUMBER + NETLIFY_SITE_NAME
# base url based on the GITHUB_PR_NUMBER + NETLIFY_SITE_NAME
env:
E2E_BASE_URL: 'https://deploy-preview-${{env.GITHUB_PR_NUMBER}}--${{env.NETLIFY_SITE_NAME}}.netlify.app'
# store test run reports if they fail
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/cards/ui/GeoContext.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
getSubPopulationPhrase,
getTotalACSPopulationPhrase,
} from './GeoContext'
import { describe, test, expect } from 'vitest'

describe('test getTotalACSPopulationPhrase()', () => {
const nationalACSPopData: Row[] = [
Expand All @@ -18,7 +19,7 @@ describe('test getTotalACSPopulationPhrase()', () => {
const normalPopPhrase = getTotalACSPopulationPhrase(
/* data */ nationalACSPopData
)
expect(normalPopPhrase).toEqual('Total Population: 328,016,242')
expect(normalPopPhrase).toEqual('Total Population (from 2022 ACS): 328,016,242')
})
})

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/cards/ui/GeoContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const POP_MISSING_VALUE = 'unavailable'

export function getTotalACSPopulationPhrase(populationData: Row[]): string {
const popAllCount: string = populationData[0].population.toLocaleString()
return `Total Population: ${popAllCount ?? POP_MISSING_VALUE}`
return `Total Population (from 2022 ACS): ${popAllCount ?? POP_MISSING_VALUE}`
}

export function getSubPopulationPhrase(
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/data/config/MetricConfigCovidCategory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export type CovidCategoryMetricId =
| 'vaccinated_per_100k'
| 'vaccinated_pop_pct'
| 'vaccinated_share_of_known'
| 'vaccinated_estimated_total'

export const COVID_DISEASE_METRICS: DataTypeConfig[] = [
{
Expand Down Expand Up @@ -234,6 +235,12 @@ export const COVID_VACCINATION_METRICS: DataTypeConfig[] = [
columnTitleHeader: 'COVID-19 vaccinations per 100k people',
shortLabel: 'COVID-19 vaccinations per 100k',
type: 'per100k',
rateNumeratorMetric: {
metricId: 'vaccinated_estimated_total',
shortLabel: 'vaccinated',
chartTitle: '',
type: 'count',
}
},
pct_share: {
chartTitle: 'Share of total COVID-19 vaccinations',
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/data/config/MetricConfigPDOH.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export const INCARCERATION_METRICS: DataTypeConfig[] = [
sub_population_count: {
chartTitle: '',
metricId: 'incarceration_population_estimated_total',
shortLabel: 'Total Population (Ages 15-64)',
shortLabel: 'Total Population (from rate data)',
type: 'count',
},
per100k: {
Expand All @@ -258,7 +258,7 @@ export const INCARCERATION_METRICS: DataTypeConfig[] = [
},
rateDenominatorMetric: {
metricId: 'incarceration_population_estimated_total',
shortLabel: 'Total population (Ages 15-64)',
shortLabel: 'Total population',
chartTitle: '',
type: 'count',
},
Expand Down Expand Up @@ -314,7 +314,7 @@ export const INCARCERATION_METRICS: DataTypeConfig[] = [
sub_population_count: {
chartTitle: '',
metricId: 'incarceration_population_estimated_total',
shortLabel: 'Total Population (Ages 15-64)',
shortLabel: 'Total Population (from rate data)',
type: 'count',
},
per100k: {
Expand All @@ -332,7 +332,7 @@ export const INCARCERATION_METRICS: DataTypeConfig[] = [
},
rateDenominatorMetric: {
metricId: 'incarceration_population_estimated_total',
shortLabel: 'Total population (Ages 15-64)',
shortLabel: 'Total population',
chartTitle: '',
type: 'count',
},
Expand Down
1 change: 1 addition & 0 deletions frontend/src/data/providers/VaccineProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class VaccineProvider extends VariableProvider {
'vaccinated_pct_share',
'vaccinated_per_100k',
'vaccinated_pop_pct',
'vaccinated_estimated_total'
])
this.acsProvider = acsProvider
}
Expand Down

0 comments on commit 00bf9fc

Please sign in to comment.