mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-25 02:49:32 +01:00
5da50e633a
So obvious in retrospect
If you listen to the Cypress fail event without re-throwing then you swallow all test failures
"fun"
When reviewing #17919 I knew the Cypress tests would have to be failing which is what prompted me to check
Introduced in bbb7ed9
(July 10th!)
35 lines
1013 B
TypeScript
35 lines
1013 B
TypeScript
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: ['critical'] }, 'home-page-critical', true)
|
|
reportA11y({ includedImpacts: ['serious'] }, 'home-page-serious', true)
|
|
})
|
|
|
|
const sidebarItems = [
|
|
'dashboards',
|
|
'savedinsights',
|
|
'replay',
|
|
'featureflags',
|
|
'experiments',
|
|
'events',
|
|
'datamanagement',
|
|
'persons',
|
|
'cohorts',
|
|
'annotations',
|
|
'apps',
|
|
'toolbarlaunch',
|
|
'projectsettings',
|
|
]
|
|
|
|
sidebarItems.forEach((sideBarItem) => {
|
|
it(`${sideBarItem} should have no accessibility violations`, () => {
|
|
cy.clickNavMenu(sideBarItem)
|
|
cy.injectAxe()
|
|
reportA11y({ includedImpacts: ['serious', 'critical'] }, sideBarItem)
|
|
})
|
|
})
|
|
})
|