| 1 | import { readFileSync } from 'node:fs' |
| 2 | import { describe, expect, it } from 'vitest' |
| 3 | |
| 4 | describe('thinking generation slide size selection', () => { |
| 5 | it('lets the confirm dialog choose a slide size and forwards it when creating a session', () => { |
| 6 | const dialogSource = readFileSync( |
| 7 | 'src/renderer/src/components/thinking/GenerationConfirmDialog.tsx', |
| 8 | 'utf8' |
| 9 | ) |
| 10 | const pageSource = readFileSync('src/renderer/src/pages/thinking-detail.tsx', 'utf8') |
| 11 | |
| 12 | expect(dialogSource).toContain('SLIDE_SIZE_PRESETS') |
| 13 | expect(dialogSource).toContain('const [slideSizeId, setSlideSizeId]') |
| 14 | expect(dialogSource).toContain('slideSizeId,') |
| 15 | expect(dialogSource).toContain('sm:grid-cols-[minmax(20rem,1fr)_6.25rem_minmax(0,12rem)]') |
| 16 | expect(dialogSource).toContain('className="h-8 min-w-0 py-0 text-xs"') |
| 17 | expect(dialogSource).toContain('dropdownClassName="w-[min(640px,calc(100vw-3rem))]"') |
| 18 | expect(pageSource).toContain('slideSizeId: params.slideSizeId') |
| 19 | }) |
| 20 | }) |
| 21 |