Google 로그인을 단일 버튼으로 정리

This commit is contained in:
Yun Chan 2026-08-29 06:54:11 +09:00
parent 7994175a3d
commit 471eb9621a
15 changed files with 78 additions and 85 deletions

View file

@ -905,7 +905,7 @@ async function openLogin(page: Page) {
await routeLoginScreen(page);
await page.goto("/login");
await expect(page.locator(".lg-root, .lg-enter").first()).toBeVisible({ timeout: 15_000 });
await expect(page.getByRole("button", { name: /^Google 계정으로 계속/ })).toBeVisible();
await expect(page.getByRole("button", { name: /^Google 계정으로 로그인/ })).toBeVisible();
}
async function openLearnerHome(page: Page) {
@ -970,16 +970,41 @@ test.describe("uc a11y-mobile — 주요 6화면 접근성·모바일 감사", (
// usecase: 키보드 사용자가 Tab 으로 로그인 버튼에 도달하고 포커스 위치를 눈으로 확인한다
test("로그인 화면에서 Tab 순회 시 포커스 표시가 눈에 보인다", async ({ page }) => {
await openLogin(page);
await expectFocusVisibleOnTab(page, "login", 5);
const googleLogin = page.getByRole("button", { name: /^Google 계정으로 로그인/ });
await expect(googleLogin).toHaveCount(1);
await page.keyboard.press("Tab");
await expect(googleLogin).toBeFocused();
const focusReport = await googleLogin.evaluate((element) => {
const target = element as HTMLElement;
const snapshot = () => {
const style = window.getComputedStyle(target);
return [
style.outlineStyle,
style.outlineWidth,
style.outlineColor,
style.boxShadow,
style.borderColor,
style.backgroundColor,
].join("|");
};
const focusVisible = target.matches(":focus-visible");
const focusedStyle = snapshot();
target.blur();
const blurredStyle = snapshot();
target.focus();
return { focusVisible, styleChanged: focusedStyle !== blurredStyle };
});
expect(focusReport.focusVisible).toBeTruthy();
expect(focusReport.styleChanged).toBeTruthy();
});
// usecase: 저시력 사용자가 주 로그인 버튼의 문구를 읽는다
test("로그인 주 CTA(Google 계정으로 계속)의 색 대비가 4.5:1 이상이다", async ({ page }) => {
test("로그인 주 CTA(Google 계정으로 로그인)의 색 대비가 4.5:1 이상이다", async ({ page }) => {
await openLogin(page);
await expectCtaContrast(
page.getByRole("button", { name: /^Google 계정으로 계속/ }),
page.getByRole("button", { name: /^Google 계정으로 로그인/ }),
"login",
"Google 계정으로 계속",
"Google 계정으로 로그인",
);
});