주기 회기 진단과 로그인 폭 보강

This commit is contained in:
Yun Chan 2026-08-12 16:33:59 +09:00
parent 946661926b
commit f97e7fadac
10 changed files with 216 additions and 17 deletions

View file

@ -115,6 +115,39 @@ test.describe("full sweep auth", () => {
await useRealApi(page);
});
// 검증 checklist: auth-login-mobile-scrollport
test("login root follows the narrow document scrollport without horizontal overflow", async ({
page,
}) => {
await page.route(ME_PATTERN, async (route) => {
await route.fulfill({
status: 401,
contentType: "application/json",
body: JSON.stringify({ detail: "not_authenticated" }),
});
});
await fulfillConfig(page, READY_AUTH_CONFIG);
await page.setViewportSize({ width: 390, height: 844 });
await page.goto("/login");
await expect(page.locator(".lg-root")).toBeVisible();
await expectNoHorizontalOverflow(page);
const widths = await page.evaluate(() => {
const documentRoot = document.documentElement;
const loginRoot = document.querySelector<HTMLElement>(".lg-root");
if (!loginRoot) throw new Error("login root missing");
return {
documentClientWidth: documentRoot.clientWidth,
documentScrollWidth: documentRoot.scrollWidth,
loginRight: loginRoot.getBoundingClientRect().right,
loginWidth: loginRoot.getBoundingClientRect().width,
};
});
expect(widths.documentScrollWidth).toBeLessThanOrEqual(widths.documentClientWidth + 1);
expect(widths.loginRight).toBeLessThanOrEqual(widths.documentClientWidth + 1);
expect(widths.loginWidth).toBeLessThanOrEqual(widths.documentClientWidth + 1);
});
// 검증 checklist: auth-login-generic-google-button
test("secondary Google button shows the second allowed domain and starts the same google OAuth flow", async ({
page,