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 17:19:09 +02:00
|
|
|
reportA11y({ includedImpacts: ['critical'] }, 'home-page-critical', true)
|
2022-08-17 09:43:40 +02:00
|
|
|
reportA11y({ includedImpacts: ['serious'] }, 'home-page-serious', true)
|
2022-08-09 20:12:41 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
const sidebarItems = [
|
|
|
|
'dashboards',
|
|
|
|
'savedinsights',
|
2023-05-19 10:33:27 +02:00
|
|
|
'replay',
|
2022-08-09 20:12:41 +02:00
|
|
|
'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)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|