Files
summercms/admin/vitest.browser.config.ts
Jakub Zych 4c61a180d0 test(19.6.1-03): SPA trigger, record lock and footer wrap tests
- trigger.test.ts: triggerState and applyTriggers
- FormView: disable, absent-controller and hide-tab backstops, the live
  announcement
- PermissionEditorField and formState: record-locked rows, notes and the
  payload omission, record lock over request lock, read-only screens
- PreviewView: hide removes, disable shows no note
- browser record-actions-wrap at 1024px; vitest.browser.config.ts gains
  the Tailwind plugin so the footer is laid out with the admin's CSS
2026-10-22 12:18:34 +02:00

24 lines
850 B
TypeScript

import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'
// Vitest browser mode in Playwright Chromium (npm run test:browser), for tests
// that need a real engine: happy-dom reproduces neither DOM clobbering nor
// DOMPurify's walk. tests/setup.ts is a happy-dom shim and is not loaded here.
// Decision note: .planning/notes/2026-10-12-admin-display-sanitizer-dompurify.md
// Tailwind compiles src/styles/main.css for layout tests (record-actions-wrap).
export default defineConfig({
plugins: [vue(), tailwindcss()],
test: {
include: ['tests/browser/**/*.test.ts'],
restoreMocks: true,
browser: {
enabled: true,
provider: 'playwright',
headless: true,
screenshotFailures: false,
instances: [{ browser: 'chromium' }],
},
},
})