test: expand exporter/css/a11y/i18n regressions and add e2e skip-link focus check
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { render, screen } from '@testing-library/react'
|
||||
import '@testing-library/jest-dom'
|
||||
import React from 'react'
|
||||
import BuilderClientPage from '@/components/BuilderClientPage'
|
||||
import I18nProvider from '@/components/I18nProvider'
|
||||
import en from '@/messages/en.json'
|
||||
|
||||
describe('Buttons naming/aria-label consistency (smoke)', () => {
|
||||
it('renders primary action buttons with stable accessible names', () => {
|
||||
render(
|
||||
<I18nProvider locale="en" messages={en as unknown as Record<string, string>}>
|
||||
<BuilderClientPage />
|
||||
</I18nProvider>
|
||||
)
|
||||
|
||||
// Sidebar/toolbar actions
|
||||
expect(screen.getByRole('button', { name: 'Add Hero' })).toBeInTheDocument()
|
||||
expect(screen.getByRole('button', { name: 'Add FAQ' })).toBeInTheDocument()
|
||||
expect(screen.getByRole('button', { name: 'Add CTA' })).toBeInTheDocument()
|
||||
|
||||
// Export button
|
||||
expect(screen.getByRole('button', { name: 'Export ZIP' })).toBeInTheDocument()
|
||||
|
||||
// Preview viewport toggle buttons have explicit aria-labels as names
|
||||
expect(screen.getByRole('button', { name: 'Desktop' })).toBeInTheDocument()
|
||||
expect(screen.getByRole('button', { name: 'Mobile' })).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user