#!/usr/bin/env node /** * Check auth-mode keyboard focus with the real settings template and controls. * Run: node --test --test-reporter=spec scripts/qa-voice-auth-focus.mjs * Sign-in responses are fixtures. No credentials or live login are used. */ import assert from 'node:assert/strict'; import { existsSync } from 'node:fs'; import { mkdir, readFile, writeFile } from 'node:fs/promises'; import { createServer } from 'node:http'; import { after, before, test } from 'node:test'; import puppeteer from 'puppeteer'; const root = new URL('../', import.meta.url); const view = await readFile( new URL('src/ui/views/ProviderSettingsView.vue', root), 'utf8', ); const template = view.slice( view.indexOf('