-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description and Motivation <!--- bulleted, high level items. use keywords (eg "closes #144" or "fixes #4323") --> - fixes #3904 - updates e2e tests as needed - adds e2e test coverage for all tabs of methodology and policy hubs, including a11y checks - fixes needed a11y issues on all pages ## Has this been tested? How? updates e2e and passing ## Types of changes (leave all that apply) - Bug fix - Refactor / chore ## New frontend preview link is below in the Netlify comment 😎
- Loading branch information
1 parent
ba90e69
commit 3e239eb
Showing
77 changed files
with
479 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
171 changes: 171 additions & 0 deletions
171
frontend/playwright-tests/internal_methodology_routes.nightly.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
import AxeBuilder from '@axe-core/playwright' | ||
import { expect, test } from '@playwright/test' | ||
|
||
test.describe.configure({ mode: 'parallel' }) | ||
|
||
test('Methodology Introduction Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology', { waitUntil: 'commit' }) | ||
await page.getByRole('heading', { name: 'Methodology Introduction' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Methodology Data Sources Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/data-sources', { waitUntil: 'commit' }) | ||
await page.getByRole('heading', { name: 'Data Sources' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Topic Categories Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/topic-categories', { waitUntil: 'commit' }) | ||
await page.getByRole('heading', { name: 'Topic Categories' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Behavioral Health Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/topic-categories/behavioral-health', { | ||
waitUntil: 'commit', | ||
}) | ||
await page | ||
.getByRole('heading', { name: 'Behavioral Health', exact: true }) | ||
.click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Chronic Diseases Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/topic-categories/chronic-disease', { | ||
waitUntil: 'commit', | ||
}) | ||
await page.getByRole('heading', { name: 'Chronic Diseases' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Community Safety Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/topic-categories/community-safety', { | ||
waitUntil: 'commit', | ||
}) | ||
await page.getByRole('heading', { name: 'Community Safety' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('COVID-19 Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/topic-categories/covid', { | ||
waitUntil: 'commit', | ||
}) | ||
await page.getByRole('heading', { name: 'COVID-19', exact: true }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('HIV Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/topic-categories/hiv', { waitUntil: 'commit' }) | ||
await page.getByRole('heading', { name: 'HIV', exact: true }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Political Determinants Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/topic-categories/pdoh', { waitUntil: 'commit' }) | ||
await page | ||
.getByRole('heading', { | ||
name: 'Political Determinants of Health', | ||
exact: true, | ||
}) | ||
.click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Social Determinants Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/topic-categories/sdoh', { waitUntil: 'commit' }) | ||
await page | ||
.getByRole('heading', { | ||
name: 'Social Determinants of Health', | ||
exact: true, | ||
}) | ||
.click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Medication Utilization Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/topic-categories/medication-utilization', { | ||
waitUntil: 'commit', | ||
}) | ||
await page | ||
.getByRole('heading', { name: 'Medication Utilization', exact: true }) | ||
.click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Data Methods Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/definitions', { waitUntil: 'commit' }) | ||
await page.getByRole('heading', { name: 'Data Methods' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Limitations Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/limitations', { waitUntil: 'commit' }) | ||
await page | ||
.getByRole('heading', { name: 'Limitations and Missing Data' }) | ||
.click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Metrics Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/definitions/metrics', { waitUntil: 'commit' }) | ||
await page.getByRole('heading', { name: 'Metrics' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Topic Definitions Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/definitions/topic-definitions', { | ||
waitUntil: 'commit', | ||
}) | ||
await page.getByRole('heading', { name: 'Topic Definitions' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Races and Ethnicities Definitions Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/definitions/races-and-ethnicities', { | ||
waitUntil: 'commit', | ||
}) | ||
await page.getByRole('heading', { name: 'Races and Ethnicities' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Age-Adjustment Tab Loads', async ({ page }) => { | ||
await page.goto('/ageadjustment', { waitUntil: 'commit' }) | ||
await page | ||
.getByRole('heading', { name: 'Age-Adjustment', exact: true }) | ||
.click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Recommended Citation Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/recommended-citation', { waitUntil: 'commit' }) | ||
await page | ||
.getByRole('heading', { name: 'Recommended Citation', exact: true }) | ||
.click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Glossary Tab Loads', async ({ page }) => { | ||
await page.goto('/methodology/glossary', { waitUntil: 'commit' }) | ||
await page.getByRole('heading', { name: 'Glossary', exact: true }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) |
84 changes: 84 additions & 0 deletions
84
frontend/playwright-tests/internal_policy_routes.nightly.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import AxeBuilder from '@axe-core/playwright' | ||
import { expect, test } from '@playwright/test' | ||
|
||
test.describe.configure({ mode: 'parallel' }) | ||
|
||
// use prefers-reduced-motion to prevent a11y constrast failures on unfinished fade-in animations | ||
test.beforeEach(async ({ page }) => { | ||
await page.emulateMedia({ reducedMotion: 'reduce' }) | ||
}) | ||
|
||
test('Gun Violence Policy Home Link Loads', async ({ page }) => { | ||
await page.goto('/policy/gun-violence', { waitUntil: 'commit' }) | ||
await page | ||
.getByRole('heading', { | ||
name: 'Understanding the Crisis of Gun Violence in Atlanta', | ||
}) | ||
.click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Crisis Overview Tab Loads', async ({ page }) => { | ||
await page.goto('/policy/gun-violence/crisis-overview', { | ||
waitUntil: 'commit', | ||
}) | ||
|
||
await page.getByRole('heading', { name: 'Crisis Overview' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Data Collection Tab Loads', async ({ page }) => { | ||
await page.goto('/policy/gun-violence/data-collection', { | ||
waitUntil: 'commit', | ||
}) | ||
await page.getByRole('heading', { name: 'Data Collection' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Our Findings Tab Loads', async ({ page }) => { | ||
await page.goto('/policy/gun-violence/our-findings', { waitUntil: 'commit' }) | ||
await page | ||
.getByRole('heading', { name: "Georgia's Youth Fatality Rates" }) | ||
.click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Current Efforts Tab Loads', async ({ page }) => { | ||
await page.goto('/policy/gun-violence/current-efforts', { | ||
waitUntil: 'commit', | ||
}) | ||
await page.getByRole('heading', { name: 'Current Efforts' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Reform Opportunities Tab Loads', async ({ page }) => { | ||
await page.goto('/policy/gun-violence/reform-opportunities', { | ||
waitUntil: 'commit', | ||
}) | ||
await page.getByRole('heading', { name: 'Reform Opportunities' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('How to Use the Data Tab Loads', async ({ page }) => { | ||
await page.goto('/policy/gun-violence/how-to-use-the-data', { | ||
waitUntil: 'commit', | ||
}) | ||
await page | ||
.getByRole('heading', { name: 'HET Data Visualization Maps and Charts' }) | ||
.click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) | ||
|
||
test('Community Safety FAQs Tab Loads', async ({ page }) => { | ||
await page.goto('/policy/gun-violence/faqs', { waitUntil: 'commit' }) | ||
await page.getByRole('heading', { name: 'Community Safety FAQs' }).click() | ||
const accessibilityScanResults = await new AxeBuilder({ page }).analyze() | ||
expect(accessibilityScanResults.violations).toEqual([]) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.