test(ci): add exporter heading levels and a11y typography smoke; update MAIN_PLAN
CI / test (pull_request) Has been cancelled

This commit is contained in:
2025-11-14 16:40:45 +09:00
parent aaa624a046
commit cd6a6ea069
93 changed files with 8543 additions and 13 deletions
+25
View File
@@ -0,0 +1,25 @@
import { describe, expect, test } from 'vitest'
import { exportPage } from './html'
import { pageSchema, type Page } from '@/lib/schema/page'
function makePage(): Page {
return pageSchema.parse({
title: 'T',
locale: 'en',
theme: { primaryColor: '#000000', fontFamily: 'Inter' },
sections: [],
form: { actionUrl: '', fields: [], spamProtection: { honeypotFieldName: '_hp', minSubmitSeconds: 2 } },
analytics: { ga4MeasurementId: '', metaPixelId: '', customHeadHtml: '' },
seo: { title: 'SEO', description: 'Desc' },
})
}
describe('Exporter CSS tokens', () => {
test('includes focus outline, skip-link, and responsive MQ tokens', () => {
const out = exportPage(makePage())
expect(out.css).toMatch(/a\.skip-link:focus/)
expect(out.css).toMatch(/focus-visible|outline: 3px solid|outline-offset/)
expect(out.css).toMatch(/@media \(max-width: 640px\)/)
expect(out.css).toMatch(/@media \(prefers-reduced-motion: reduce\)/)
})
})