|
|
// frontend/playwright/calendar.spec.ts — 일정 E2E
|
|
|
// phase-16+: 일정 mock 시드 제거 → 빈 상태. 실데이터는 Google 캘린더 연결 후 유입(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("/calendar");
|
|
|
await expect(page.getByRole("heading", { name: "6월 7일 – 13일" })).toBeVisible();
|
|
|
await page.getByRole("tab", { name: "일" }).click();
|
|
|
// 일정 시드 제거 → 회의 진입 버튼 없음
|
|
|
await expect(page.getByRole("button", { name: /회의 노트 · 액션 보기/ })).toHaveCount(0);
|
|
|
});
|
|
|
|
|
|
test("일정 계정 연결 진입점은 설정 연결 탭", async ({ page }) => {
|
|
|
await page.goto("/settings?tab=connect");
|
|
|
await expect(page.getByRole("button", { name: /계정 추가/ })).toBeVisible();
|
|
|
});
|
|
|
|
|
|
test("빈 일정 페이지 a11y — 위반 0건", async ({ page }) => {
|
|
|
await page.goto("/calendar");
|
|
|
await expect(page.locator(".calpage")).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([]);
|
|
|
});
|