feat: FormBlock 컨트롤러 정리 및 15.1 SEO/head 메타 관리 추가
CI / test (push) Failing after 7m19s
CI / pr_and_merge (push) Has been skipped

This commit is contained in:
2025-11-27 11:20:38 +09:00
parent 48e13d2a75
commit e16f8298ab
9 changed files with 341 additions and 147 deletions
@@ -2,7 +2,6 @@ import { describe, it, expect, vi } from "vitest";
import { render, screen, fireEvent } from "@testing-library/react";
import { TextPropertiesPanel } from "@/app/editor/panels/TextPropertiesPanel";
import { ListPropertiesPanel } from "@/app/editor/panels/ListPropertiesPanel";
import { FormControllerPanel } from "@/app/editor/forms/FormControllerPanel";
import type { Block } from "@/features/editor/state/editorStore";
// Text/List/Form 패널에 추가되는 블록 배경색(backgroundColorCustom) 컨트롤에 대한 최소 TDD
@@ -58,34 +57,4 @@ describe("Text/List/Form 패널 - 블록 배경색 컨트롤", () => {
expect.objectContaining({ backgroundColorCustom: "#445566" }),
);
});
it("FormControllerPanel 에서 배경색 HEX 인풋 변경 시 updateBlock 이 backgroundColorCustom 으로 호출되어야 한다", () => {
const updateBlock = vi.fn();
const formBlock: Block = {
id: "form-1",
type: "form",
props: {
kind: "contact",
submitTarget: "internal",
} as any,
};
render(
<FormControllerPanel
block={formBlock}
blocks={[]}
selectedBlockId="form-1"
updateBlock={updateBlock}
/>,
);
const hexInput = screen.getByLabelText("폼 배경색 HEX");
fireEvent.change(hexInput, { target: { value: "#778899" } });
expect(updateBlock).toHaveBeenCalledWith(
"form-1",
expect.objectContaining({ backgroundColorCustom: "#778899" }),
);
});
});