feat(ai-character): Mock Preview 모드 구현
This commit is contained in:
20
tests/e2e/mock-mode-boundary.spec.ts
Normal file
20
tests/e2e/mock-mode-boundary.spec.ts
Normal 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);
|
||||
});
|
||||
Reference in New Issue
Block a user