2022-08-09 20:12:41 +02:00
|
|
|
import { reportA11y } from '../support/accessibility'
|
|
|
|
|
|
|
|
describe('a11y', () => {
|
|
|
|
it('home should have no accessibility violations', () => {
|
|
|
|
cy.get('[data-attr="menu-item-projecthomepage"]').click()
|
|
|
|
cy.injectAxe()
|
2022-08-17 09:43:40 +02:00
|
|
|
reportA11y({ includedImpacts: ['critical'] }, 'home-page-critical', false)
|
|
|
|
reportA11y({ includedImpacts: ['serious'] }, 'home-page-serious', true)
|
2022-08-09 20:12:41 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
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)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|