Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FRONTEND: tweaks #3671

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions frontend/playwright-tests/black_men_gun_homicides.ci.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ test('Black Men Homicide Test: Top Half of Cards', async ({ page }) => {
.click()
await page
.locator('#rate-map')
.getByRole('heading', { name: 'Black Men' })
.getByRole('heading', { name: 'Black (NH) Men' })
.click()
await page
.locator('li')
.filter({ hasText: 'Total population of Black Men' })
.filter({ hasText: 'Total population of Black (NH) Men' })
.click()
await page
.getByRole('heading', {
Expand All @@ -25,7 +25,7 @@ test('Black Men Homicide Test: Top Half of Cards', async ({ page }) => {
.click()
await page
.locator('#rates-over-time')
.getByRole('heading', { name: 'Black Men' })
.getByRole('heading', { name: 'Black (NH) Men' })
.click()
})

Expand All @@ -40,7 +40,7 @@ test('Black Men Homicide Test: Bottom Half of Cards', async ({ page }) => {
.click()
await page
.locator('#rate-chart')
.getByRole('heading', { name: 'Black Men' })
.getByRole('heading', { name: 'Black (NH) Men' })
.click()
await page
.getByRole('button', { name: 'Inequities over time', exact: true })
Expand All @@ -50,7 +50,7 @@ test('Black Men Homicide Test: Bottom Half of Cards', async ({ page }) => {
.click()
await page
.locator('#inequities-over-time')
.getByRole('heading', { name: 'Black Men' })
.getByRole('heading', { name: 'Black (NH) Men' })
.click()
await page
.locator('#inequities-over-time')
Expand All @@ -61,7 +61,7 @@ test('Black Men Homicide Test: Bottom Half of Cards', async ({ page }) => {
.click()
await page
.locator('#population-vs-distribution')
.getByRole('heading', { name: 'Black Men' })
.getByRole('heading', { name: 'Black (NH) Men' })
.click()
await page.getByLabel('Comparison bar chart showing').getByRole('img').click()
await page.getByRole('button', { name: 'Data table' }).click()
Expand Down
28 changes: 18 additions & 10 deletions frontend/playwright-tests/incarceration.ci.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,27 @@ import { test } from '@playwright/test'
test('Prison by Race', async ({ page }) => {
await page.goto('/exploredata?mls=1.incarceration-3.00&group1=All')
await page
.getByLabel(
'Launch multiple maps view with side-by-side maps of each race and ethnicity group'
)
.locator('#rate-map')
.getByRole('heading', { name: 'Prison incarceration in the' })
.click()
await page.getByRole('button', { name: 'Close' }).click()
await page.getByLabel('open the topic info modal').click()
await page.getByRole('heading', { name: 'People in prison' }).click()
await page.getByLabel('Click for more info on people').click()
await page.getByLabel('close topic info modal').click()
await page.locator('li').filter({ hasText: 'United States' }).click()
await page
.getByRole('heading', { name: 'Graph unavailable: Rates of' })
.click()
await page.getByText('Our data sources do not have').click()
await page
.locator('#rate-chart')
.getByText(
'3,232 children confined in adult facilities in the United States. Learn more.'
)
.getByRole('heading', { name: 'Prison incarceration in the' })
.click()

await page.locator('#rate-chart').getByText('children').click()
await page.getByRole('button', { name: 'Unknown demographic map' }).click()
await page
.locator('#unknown-demographic-map')
.getByText('0.4% of prison pop. reported')
.click()
await page.getByRole('button', { name: 'Data table' }).click()
await page.getByRole('columnheader', { name: 'Race and Ethnicity' }).click()
await page.getByRole('button', { name: 'Prison', exact: true }).click()
await page.getByRole('button', { name: 'Jail' }).click()
Expand All @@ -34,6 +40,8 @@ test('Jail by Age', async ({ page }) => {
await page.getByLabel('Click for more info on people in jail').click()
await page.getByRole('heading', { name: 'People in jail' }).click()
await page.getByLabel('close topic info modal').click()
await page.getByRole('button', { name: 'Data table' }).click()

await page.getByRole('columnheader', { name: 'Age' }).click()
await page
.getByRole('columnheader', { name: 'People in jail per 100k' })
Expand Down
1 change: 0 additions & 1 deletion frontend/src/cards/ui/MultiMapDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ export default function MultiMapDialog(props: MultiMapDialogProps) {
id='modalTitle'
>
{title}
{props?.subtitle && ` (${props.subtitle})`}
</h2>
</div>

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/data/config/MetricConfigCommunitySafety.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,6 @@ export const GUN_DEATHS_BLACK_MEN_METRICS: DataTypeConfig[] = [
},
},
},
otherSubPopulationLabel: 'Black Men',
otherSubPopulationLabel: 'Black (NH) Men',
},
]
2 changes: 1 addition & 1 deletion frontend/src/reports/ui/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const Banner: React.FC = () => {
</p>
<HetTextArrowLink
link={`${METHODOLOGY_PAGE_LINK}/limitations#missing-data`}
linkText='Learn more'
linkText='Learn more about the data limitations'
containerClassName='block md:mx-2 md:my-0 mx-0 my-4'
linkClassName='text-black'
/>
Expand Down
Loading