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
+26
View File
@@ -0,0 +1,26 @@
import { describe, expect, test } from 'vitest'
import { exportPage } from './html'
import { pageSchema, type Page } from '@/lib/schema/page'
const makePage = (): Page =>
pageSchema.parse({
title: 'T',
locale: 'en',
theme: { primaryColor: '#0ea5e9', fontFamily: 'Inter' },
sections: [],
form: { actionUrl: '', fields: [], spamProtection: { honeypotFieldName: '_hp', minSubmitSeconds: 2 } },
seo: { title: 'T', description: 'D' },
})
describe('Exporter CSS contrast/font tokens', () => {
test('contains base text color and responsive font adjustments', () => {
const out = exportPage(makePage())
// base body text color token present
expect(out.css).toMatch(/body\{[^}]*color:\s*#0f172a/i)
// focus outline thickness and offset present
expect(out.css).toMatch(/outline:\s*3px\s*solid/i)
expect(out.css).toMatch(/outline-offset:\s*2px/i)
// responsive font size change for h1 in mobile media query
expect(out.css).toMatch(/@media \(max-width: 640px\)[\s\S]*h1\{[^}]*font-size:\s*1\.5rem/i)
})
})