mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-25 02:31:30 +01:00
0a6d99c0a6
* feat: test a11y with Cypress * axe test more pages * archive a11y violations on success too * remove date from file path * don't warn if no accessibility files to upload... they're not on all test jobs
34 lines
944 B
JavaScript
34 lines
944 B
JavaScript
import { reportA11y } from '../support/accessibility'
|
|
|
|
describe('a11y', () => {
|
|
it('home should have no accessibility violations', () => {
|
|
cy.get('[data-attr="menu-item-projecthomepage"]').click()
|
|
cy.injectAxe()
|
|
reportA11y({ includedImpacts: ['serious', 'critical'] }, 'home-page')
|
|
})
|
|
|
|
const sidebarItems = [
|
|
'dashboards',
|
|
'savedinsights',
|
|
'sessionsrecordings',
|
|
'featureflags',
|
|
'experiments',
|
|
'events',
|
|
'datamanagement',
|
|
'persons',
|
|
'cohorts',
|
|
'annotations',
|
|
'plugins',
|
|
'toolbarlaunch',
|
|
'projectsettings',
|
|
]
|
|
|
|
sidebarItems.forEach((sideBarItem) => {
|
|
it(`${sideBarItem} should have no accessibility violations`, () => {
|
|
cy.clickNavMenu(sideBarItem)
|
|
cy.injectAxe()
|
|
reportA11y({ includedImpacts: ['serious', 'critical'] }, sideBarItem)
|
|
})
|
|
})
|
|
})
|