You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.3 KiB
TypeScript

// frontend/playwright/mail.spec.ts — 메일 E2E
// phase-16+: 메일 mock 시드 제거 → 빈 상태. 실데이터는 Gmail/Outlook 연결 후 유입(OAuth, e2e 범위 밖).
import AxeBuilder from "@axe-core/playwright";
import { expect, test } from "@playwright/test";
import { resetSeed } from "./fixtures/seed-reset";
test.describe.configure({ mode: "serial" });
test.beforeEach(async () => {
await resetSeed();
});
test("메일 — 연결된 계정 없음(빈 상태) 정상 렌더", async ({ page }) => {
await page.goto("/mail");
await expect(page.locator(".mailpage")).toBeVisible();
await expect(page.locator(".mrow")).toHaveCount(0); // 시드 메일 제거
});
test("메일 계정 연결 진입점은 설정 메일 탭", async ({ page }) => {
await page.goto("/settings?tab=mail");
await expect(page.getByRole("button", { name: /계정 추가/ })).toBeVisible();
});
test("빈 메일 페이지 a11y — 위반 0건", async ({ page }) => {
await page.goto("/mail");
await expect(page.locator(".mailpage")).toBeVisible();
const r = await new AxeBuilder({ page })
.withTags(["wcag2a", "wcag2aa", "wcag21aa"])
.disableRules(["color-contrast"])
.analyze();
expect(r.violations, JSON.stringify(r.violations, null, 2)).toEqual([]);
});