/** * @fileoverview Static guard for the Add Case modal's submit controls (#368). * * Below 860px the shared set-* surface hides the modal footer, and for eight * releases that footer held the only Create/Clone/Link button, so no case could * be added from a phone and nothing failed. This pins the contract that fixed it: * a header submit button exists after the close button, and the two JS paths * that toggle submit state drive BOTH buttons. */ import { describe, it, expect } from 'vitest'; import { readFileSync } from 'node:fs'; import { resolve } from 'node:path'; const publicDir = resolve(import.meta.dirname, '../src/web/public'); const html = readFileSync(resolve(publicDir, 'index.html'), 'utf8'); const sessionUi = readFileSync(resolve(publicDir, 'session-ui.js'), 'utf8'); const mobileCss = readFileSync(resolve(publicDir, 'mobile.css'), 'utf8'); function caseModal(): string { const start = html.indexOf('