// frontend/playwright/fixtures/seed-reset.ts import { request } from "@playwright/test"; const API = process.env.API_BASE ?? "http://localhost:31800"; /** 백엔드 시드를 초기 상태로 되돌린다. ARI_ALLOW_TEST_RESET=1 일 때만 동작. */ export async function resetSeed(): Promise { const ctx = await request.newContext(); const res = await ctx.post(`${API}/api/_test/reset`); if (!res.ok()) { throw new Error( `시드 리셋 실패(${res.status()}). 백엔드를 ARI_ALLOW_TEST_RESET=1 로 띄웠는지 확인하세요.`, ); } await ctx.dispose(); }