| 1 | import { describe, expect, it } from 'vitest' |
| 2 | import fs from 'fs' |
| 3 | import path from 'path' |
| 4 | |
| 5 | const sharedPromptSource = fs.readFileSync( |
| 6 | path.resolve(__dirname, '../../../src/main/agent-runtime/prompt/composers/shared.ts'), |
| 7 | 'utf-8' |
| 8 | ) |
| 9 | |
| 10 | describe('shared prompt animation guidance', () => { |
| 11 | it('prefers declarative stagger and sequence controls for new content', () => { |
| 12 | expect(sharedPromptSource).toContain('Prefer `data-anim-stagger="N"`') |
| 13 | expect(sharedPromptSource).toContain('Prefer `data-anim-sequence="with|after"`') |
| 14 | expect(sharedPromptSource).toContain('Use `data-anim-click-group="name"` only for contiguous click-triggered elements') |
| 15 | expect(sharedPromptSource).toContain('Prefer bounded emphasis labels such as `pulse-soft|pulse|pulse-strong`') |
| 16 | expect(sharedPromptSource).toContain('Use `data-anim="path"` only with an inline linear path string') |
| 17 | expect(sharedPromptSource).toContain('Do not use `data-anim-easing`, `data-anim-repeat`, or `data-anim-direction`') |
| 18 | expect(sharedPromptSource).toContain('Do not use split-text/per-letter effects') |
| 19 | expect(sharedPromptSource).toContain('preview-only concepts') |
| 20 | }) |
| 21 | }) |
| 22 |