Files
admin-web/src/shared/components/LayoutPreferenceList.test.ts
T
2026-08-06 20:14:56 +08:00

15 lines
664 B
TypeScript

import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { describe, expect, it } from 'vitest'
const source = readFileSync(resolve(process.cwd(), 'src/shared/components/LayoutPreferenceList.vue'), 'utf8')
describe('LayoutPreferenceList overflow layout', () => {
it('keeps long item collections inside a viewport-bounded scroll area', () => {
expect(source).toContain('grid-template-rows: auto minmax(0, 1fr) auto')
expect(source).toContain('max-height: min(520px, calc(100dvh - 120px))')
expect(source).toContain('.layout-preference-list__scroll { min-height: 0;')
expect(source).toContain('overflow-y: auto')
})
})