i18n 적용
This commit is contained in:
@@ -31,7 +31,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const hexInput = screen.getByLabelText("섹션 배경 색상 HEX 입력");
|
||||
const hexInput = screen.getByLabelText("Section background color HEX");
|
||||
fireEvent.change(hexInput, { target: { value: "#112233" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
@@ -57,7 +57,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const presetSelect = screen.getByLabelText("배경 이미지 가로 위치 프리셋");
|
||||
const presetSelect = screen.getByLabelText("Background image horizontal position 프리셋");
|
||||
fireEvent.change(presetSelect, { target: { value: "left" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
@@ -83,7 +83,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const presetSelect = screen.getByLabelText("배경 이미지 세로 위치 프리셋");
|
||||
const presetSelect = screen.getByLabelText("Background image vertical position 프리셋");
|
||||
fireEvent.change(presetSelect, { target: { value: "top" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
@@ -110,7 +110,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const xSlider = screen.getByLabelText("배경 이미지 가로 위치 슬라이더");
|
||||
const xSlider = screen.getByLabelText("Background image horizontal position 슬라이더");
|
||||
fireEvent.change(xSlider, { target: { value: "30" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
@@ -121,7 +121,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
}),
|
||||
);
|
||||
|
||||
const ySlider = screen.getByLabelText("배경 이미지 세로 위치 슬라이더");
|
||||
const ySlider = screen.getByLabelText("Background image vertical position 슬라이더");
|
||||
fireEvent.change(ySlider, { target: { value: "70" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
@@ -143,7 +143,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const slider = screen.getByLabelText("세로 패딩 슬라이더");
|
||||
const slider = screen.getByLabelText("Vertical padding 슬라이더");
|
||||
fireEvent.change(slider, { target: { value: "40" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith("section-1", expect.objectContaining({ paddingYPx: 40 }));
|
||||
@@ -160,7 +160,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const urlInput = screen.getByLabelText("배경 이미지 URL");
|
||||
const urlInput = screen.getByLabelText("Background image URL");
|
||||
fireEvent.change(urlInput, { target: { value: "https://example.com/bg.png" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
@@ -189,7 +189,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const select = screen.getByLabelText("배경 이미지 크기");
|
||||
const select = screen.getByLabelText("Background image size");
|
||||
fireEvent.change(select, { target: { value: "contain" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
@@ -214,7 +214,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const select = screen.getByLabelText("배경 이미지 위치");
|
||||
const select = screen.getByLabelText("Background image position");
|
||||
fireEvent.change(select, { target: { value: "top" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
@@ -234,7 +234,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const sourceSelect = screen.getByLabelText("배경 이미지 소스") as HTMLSelectElement;
|
||||
const sourceSelect = screen.getByLabelText("Background image source") as HTMLSelectElement;
|
||||
expect(sourceSelect.value).toBe("none");
|
||||
|
||||
fireEvent.change(sourceSelect, { target: { value: "none" } });
|
||||
@@ -246,9 +246,9 @@ describe("SectionPropertiesPanel", () => {
|
||||
} as any);
|
||||
|
||||
// "없음" 상태에서는 크기/위치/반복 컨트롤이 렌더되지 않아야 한다.
|
||||
expect(screen.queryByLabelText("배경 이미지 크기")).toBeNull();
|
||||
expect(screen.queryByLabelText("배경 이미지 위치")).toBeNull();
|
||||
expect(screen.queryByLabelText("배경 이미지 반복")).toBeNull();
|
||||
expect(screen.queryByLabelText("Background image size")).toBeNull();
|
||||
expect(screen.queryByLabelText("Background image position")).toBeNull();
|
||||
expect(screen.queryByLabelText("Background image repeat")).toBeNull();
|
||||
});
|
||||
|
||||
it("배경 이미지 반복 셀렉트 변경 시 updateBlock 이 backgroundImageRepeat 로 호출된다", () => {
|
||||
@@ -267,7 +267,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const repeatSelect = screen.getByLabelText("배경 이미지 반복");
|
||||
const repeatSelect = screen.getByLabelText("Background image repeat");
|
||||
fireEvent.change(repeatSelect, { target: { value: "repeat-x" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
@@ -292,7 +292,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const sourceSelect = screen.getByLabelText("배경 이미지 소스") as HTMLSelectElement;
|
||||
const sourceSelect = screen.getByLabelText("Background image source") as HTMLSelectElement;
|
||||
expect(sourceSelect.value).toBe("upload");
|
||||
|
||||
fireEvent.change(sourceSelect, { target: { value: "url" } });
|
||||
@@ -321,7 +321,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const urlInput = screen.getByLabelText("배경 비디오 URL");
|
||||
const urlInput = screen.getByLabelText("Background video URL");
|
||||
fireEvent.change(urlInput, { target: { value: "https://example.com/bg-video.mp4" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
@@ -350,7 +350,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const sourceSelect = screen.getByLabelText("배경 비디오 소스") as HTMLSelectElement;
|
||||
const sourceSelect = screen.getByLabelText("Background video source") as HTMLSelectElement;
|
||||
expect(sourceSelect.value).toBe("upload");
|
||||
|
||||
fireEvent.change(sourceSelect, { target: { value: "url" } });
|
||||
@@ -381,7 +381,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const bgImageSourceSelect = screen.getByLabelText("배경 이미지 소스") as HTMLSelectElement;
|
||||
const bgImageSourceSelect = screen.getByLabelText("Background image source") as HTMLSelectElement;
|
||||
const bgImageSourceClass = bgImageSourceSelect.getAttribute("class") ?? "";
|
||||
expect(bgImageSourceClass).toContain("bg-white");
|
||||
expect(bgImageSourceClass).toContain("text-slate-900");
|
||||
@@ -390,7 +390,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
expect(bgImageSourceClass).toContain("dark:text-slate-100");
|
||||
expect(bgImageSourceClass).toContain("dark:border-slate-700");
|
||||
|
||||
const bgImageUrlInput = screen.getByLabelText("배경 이미지 URL") as HTMLInputElement;
|
||||
const bgImageUrlInput = screen.getByLabelText("Background image URL") as HTMLInputElement;
|
||||
const bgImageUrlClass = bgImageUrlInput.getAttribute("class") ?? "";
|
||||
expect(bgImageUrlClass).toContain("bg-white");
|
||||
expect(bgImageUrlClass).toContain("text-slate-900");
|
||||
@@ -399,7 +399,7 @@ describe("SectionPropertiesPanel", () => {
|
||||
expect(bgImageUrlClass).toContain("dark:text-slate-100");
|
||||
expect(bgImageUrlClass).toContain("dark:border-slate-700");
|
||||
|
||||
const bgVideoUrlInput = screen.getByLabelText("배경 비디오 URL") as HTMLInputElement;
|
||||
const bgVideoUrlInput = screen.getByLabelText("Background video URL") as HTMLInputElement;
|
||||
const bgVideoUrlClass = bgVideoUrlInput.getAttribute("class") ?? "";
|
||||
expect(bgVideoUrlClass).toContain("bg-white");
|
||||
expect(bgVideoUrlClass).toContain("text-slate-900");
|
||||
@@ -433,12 +433,12 @@ describe("SectionPropertiesPanel", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const columnLayoutSelect = screen.getByLabelText("섹션 컬럼 레이아웃") as HTMLSelectElement;
|
||||
const alignItemsSelect = screen.getByLabelText("섹션 컬럼 세로 정렬") as HTMLSelectElement;
|
||||
const positionModeSelect = screen.getByLabelText("배경 이미지 위치 모드") as HTMLSelectElement;
|
||||
const sizeSelect = screen.getByLabelText("배경 이미지 크기") as HTMLSelectElement;
|
||||
const positionSelect = screen.getByLabelText("배경 이미지 위치") as HTMLSelectElement;
|
||||
const repeatSelect = screen.getByLabelText("배경 이미지 반복") as HTMLSelectElement;
|
||||
const columnLayoutSelect = screen.getByLabelText("Section column layout") as HTMLSelectElement;
|
||||
const alignItemsSelect = screen.getByLabelText("Section column vertical alignment") as HTMLSelectElement;
|
||||
const positionModeSelect = screen.getByLabelText("Background image position mode") as HTMLSelectElement;
|
||||
const sizeSelect = screen.getByLabelText("Background image size") as HTMLSelectElement;
|
||||
const positionSelect = screen.getByLabelText("Background image position") as HTMLSelectElement;
|
||||
const repeatSelect = screen.getByLabelText("Background image repeat") as HTMLSelectElement;
|
||||
|
||||
const assertDualTheme = (el: HTMLElement) => {
|
||||
const className = el.getAttribute("class") ?? "";
|
||||
|
||||
Reference in New Issue
Block a user