feat(ai-character): Mock Preview 모드 구현

This commit is contained in:
Yu Sung
2026-07-27 23:23:36 +09:00
parent b4841ff579
commit 2a5efb0f3e
38 changed files with 4763 additions and 289 deletions

View File

@@ -0,0 +1,20 @@
import { expect, test } from "@playwright/test";
test("registers a browser MSW worker in explicit mock mode", async ({ page }) => {
// Given
const expectedWorkerRegistration = true;
// When
await page.goto("/");
// Then
await expect
.poll(() =>
page.evaluate(async () => {
const registration = await navigator.serviceWorker.ready;
return registration.active?.scriptURL.endsWith("/mockServiceWorker.js") ?? false;
}),
)
.toBe(expectedWorkerRegistration);
});