Files
landing-builder/lib/wysiwyg/export.style.tokens.controls.test.ts
T
jaybe 5bf78b3e01
Auto PR / open-pr (push) Successful in 21s
Auto Label PR / add-automerge-label (pull_request) Successful in 6s
CI / test (pull_request) Successful in 1m49s
테스트/린트 안정화: 버튼 쿼리 모호성 제거, 훅 deps 보강, vi.spyOn 모킹, 멀티선택 Moveable 간섭 방지 재확인, 스냅 우선순위 회귀 그린
2025-11-17 17:33:39 +09:00

22 lines
885 B
TypeScript

import { describe, it, expect } from 'vitest'
import { exportFrame } from '@/lib/wysiwyg/export'
import type { Frame } from '@/lib/wysiwyg/schema'
function baseFrame(): Frame {
return {
id: 'f', width: 320, height: 200, background: '#111111',
layers: [{ id: 'l1', name: 'Base', visible: true, locked: false, objects: [] }],
}
}
describe('wysiwyg export - style tokens for controls', () => {
it('defines base styles for inputs/selects/textarea/fieldset/legend using tokens', () => {
const f = baseFrame()
const out = exportFrame(f)
expect(out.css).toMatch(/input,select,textarea\s*{[^}]*color:var\(--text\)/)
expect(out.css).toMatch(/input,select,textarea\s*{[^}]*border:1px solid var\(--border\)/)
expect(out.css).toMatch(/fieldset\s*{[^}]*border:1px solid var\(--border\)/)
expect(out.css).toMatch(/legend\s*{[^}]*color:var\(--text\)/)
})
})