0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-25 02:49:32 +01:00
posthog/cypress/e2e/a11y.js
timgl 5780a285d7
perf(insights): Speed up loading properties (#11037)
* perf(insights): Speed up loading properties

* paginator that doesn't count with manual limit and offset

* fix tests and types

* remove console.log

* one more test that relied on count

* add a full count to every row

* make a query context object that can be used to count or return results

* silence unrelated homepage error

* minimise change surface

* minimise change surface

* override less of the pager

Co-authored-by: Paul D'Ambra <paul@posthog.com>
2022-08-17 16:19:09 +01:00

35 lines
1.0 KiB
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: ['critical'] }, 'home-page-critical', true)
reportA11y({ includedImpacts: ['serious'] }, 'home-page-serious', true)
})
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)
})
})
})