test(ci): add exporter heading levels and a11y typography smoke; update MAIN_PLAN
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { render } from '@testing-library/react'
|
||||
import { NextIntlClientProvider } from 'next-intl'
|
||||
import { expect, test } from 'vitest'
|
||||
import { axe, toHaveNoViolations } from 'jest-axe'
|
||||
import FormBuilderPanel from './FormBuilderPanel'
|
||||
import { createFormStore } from '@/lib/state/formStore'
|
||||
|
||||
expect.extend(toHaveNoViolations)
|
||||
import messages from '../messages/en.json'
|
||||
|
||||
function Wrapper({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<NextIntlClientProvider messages={messages} locale="en">
|
||||
{children}
|
||||
</NextIntlClientProvider>
|
||||
)
|
||||
}
|
||||
|
||||
test('FormBuilderPanel has no obvious a11y violations', async () => {
|
||||
const store = createFormStore()
|
||||
const { container } = render(
|
||||
<Wrapper>
|
||||
<FormBuilderPanel store={store} />
|
||||
</Wrapper>
|
||||
)
|
||||
const results = await axe(container)
|
||||
expect(results).toHaveNoViolations()
|
||||
})
|
||||
Reference in New Issue
Block a user