feat: 운영 안정성과 세션 음성 경험 개선
This commit is contained in:
parent
facc4ad2d9
commit
c788343467
95 changed files with 8431 additions and 1785 deletions
36
apps/web/e2e/chunk-recovery-preview.spec.ts
Normal file
36
apps/web/e2e/chunk-recovery-preview.spec.ts
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test.skip(
|
||||
process.env.E2E_PREVIEW_BUILD !== "1",
|
||||
"프로덕션 build를 vite preview로 띄운 옵트인 검증이다.",
|
||||
);
|
||||
|
||||
test("recovers a failed production lazy chunk with exactly one document reload @single-run", async ({
|
||||
page,
|
||||
}) => {
|
||||
let loginChunkRequests = 0;
|
||||
let documentRequests = 0;
|
||||
|
||||
page.on("request", (request) => {
|
||||
if (request.isNavigationRequest()) documentRequests += 1;
|
||||
});
|
||||
await page.route("**/assets/Login-*.js", async (route) => {
|
||||
loginChunkRequests += 1;
|
||||
if (loginChunkRequests === 1) {
|
||||
await route.abort("failed");
|
||||
return;
|
||||
}
|
||||
await route.continue();
|
||||
});
|
||||
|
||||
await page.goto("/login", { waitUntil: "domcontentloaded" });
|
||||
|
||||
await expect(page.getByRole("heading", { name: "로그인" })).toBeVisible({ timeout: 15_000 });
|
||||
expect(loginChunkRequests).toBe(2);
|
||||
expect(documentRequests).toBe(2);
|
||||
await expect
|
||||
.poll(() =>
|
||||
page.evaluate(() => sessionStorage.getItem("vignette:chunk-recovery:/login")),
|
||||
)
|
||||
.toBeNull();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue