테마 적용
CI / test (push) Failing after 5m22s
CI / e2e (push) Has been skipped
CI / pr_and_merge (push) Has been skipped

This commit is contained in:
2025-12-09 18:53:21 +09:00
parent 9d8c4538c7
commit 676e58cad7
71 changed files with 3394 additions and 498 deletions
+30
View File
@@ -0,0 +1,30 @@
import { describe, it, expect } from "vitest";
import { render, screen } from "@testing-library/react";
import { PropertySliderField } from "@/features/editor/components/PropertySliderField";
describe("PropertySliderField - 테마", () => {
it("텍스트 입력은 라이트/다크 테마에 맞는 배경/텍스트 클래스를 사용해야 한다", () => {
render(
<PropertySliderField
label="테스트 슬라이더"
ariaLabelSlider="테스트 슬라이더"
ariaLabelInput="테스트 값 입력"
value={10}
min={0}
max={100}
step={1}
onChange={() => {}}
/>,
);
const input = screen.getByLabelText("테스트 값 입력") as HTMLInputElement;
const className = input.getAttribute("class") ?? "";
// 라이트 모드: 흰 배경 + 어두운 텍스트
expect(className).toContain("bg-white");
expect(className).toContain("text-slate-900");
// 다크 모드: 다크 배경 + 밝은 텍스트
expect(className).toContain("dark:bg-slate-900");
expect(className).toContain("dark:text-slate-100");
});
});