i18n 적용
CI / test (push) Failing after 11m12s
CI / e2e (push) Has been cancelled
CI / pr_and_merge (push) Has been cancelled

This commit is contained in:
2025-12-10 15:56:51 +09:00
parent 73e9bc6a1c
commit f71207aeb5
127 changed files with 7346 additions and 2079 deletions
+19 -21
View File
@@ -42,7 +42,7 @@ describe("FormControllerPanel", () => {
/>,
);
const input = screen.getByLabelText("성공 메시지");
const input = screen.getByLabelText("Success message");
fireEvent.change(input, { target: { value: "새 성공 메시지" } });
expect(updateBlock).toHaveBeenCalledWith(
@@ -67,7 +67,7 @@ describe("FormControllerPanel", () => {
/>,
);
const input = screen.getByLabelText("에러 메시지");
const input = screen.getByLabelText("Error message");
fireEvent.change(input, { target: { value: "새 에러 메시지" } });
expect(updateBlock).toHaveBeenCalledWith(
@@ -143,7 +143,7 @@ describe("FormControllerPanel", () => {
/>,
);
const select = screen.getByLabelText("Submit 버튼") as HTMLSelectElement;
const select = screen.getByLabelText("Submit button") as HTMLSelectElement;
const submitMainOption = screen.getByText("submit-main (제출하기)");
@@ -168,17 +168,15 @@ describe("FormControllerPanel", () => {
/>,
);
const guideButton = screen.getByRole("button", { name: "Google Sheets 연동 가이드" });
const guideButton = screen.getByRole("button", { name: "Google Sheets integration guide" });
guideButton.click();
// Google Sheets 연동 가이드 헤딩과 Apps Script 안내 문구가 노출되어야 한다.
expect(screen.getByText("Google Sheets 연동 가이드")).toBeTruthy();
expect(
screen.getByText(/Apps Script 웹 앱 URL/i),
).toBeTruthy();
// Google Sheets integration guide heading and Apps Script web app URL hint should be visible.
expect(screen.getByText("Google Sheets integration guide")).toBeTruthy();
expect(screen.getByText(/Apps Script web app URL/i)).toBeTruthy();
});
it("Google Sheets 가이드 모달의 Apps Script 코드가 컨트롤러에 매핑된 전송 키와 작성일시를 포함해야 한다", async () => {
it("Google Sheets guide modal Apps Script code should include mapped submit keys and createdAt field", async () => {
const formBlock = makeFormBlock("form-webhook", {
submitTarget: "webhook",
fieldIds: ["input-name", "input-email"],
@@ -213,7 +211,7 @@ describe("FormControllerPanel", () => {
/>,
);
const guideButton = screen.getByRole("button", { name: "Google Sheets 연동 가이드" });
const guideButton = screen.getByRole("button", { name: "Google Sheets integration guide" });
fireEvent.click(guideButton);
const scriptTextarea = (await screen.findByDisplayValue(/function doPost/)) as HTMLTextAreaElement;
@@ -239,7 +237,7 @@ describe("FormControllerPanel", () => {
/>,
);
const submitTargetSelect = screen.getByLabelText("전송 대상") as HTMLSelectElement;
const submitTargetSelect = screen.getByLabelText("Submit target") as HTMLSelectElement;
const submitTargetClass = submitTargetSelect.getAttribute("class") ?? "";
expect(submitTargetClass).toContain("bg-white");
expect(submitTargetClass).toContain("text-slate-900");
@@ -248,7 +246,7 @@ describe("FormControllerPanel", () => {
expect(submitTargetClass).toContain("dark:text-slate-100");
expect(submitTargetClass).toContain("dark:border-slate-700");
const formWidthModeSelect = screen.getByLabelText("폼 너비 모드") as HTMLSelectElement;
const formWidthModeSelect = screen.getByLabelText("Form width mode") as HTMLSelectElement;
const formWidthModeClass = formWidthModeSelect.getAttribute("class") ?? "";
expect(formWidthModeClass).toContain("bg-white");
expect(formWidthModeClass).toContain("text-slate-900");
@@ -257,7 +255,7 @@ describe("FormControllerPanel", () => {
expect(formWidthModeClass).toContain("dark:text-slate-100");
expect(formWidthModeClass).toContain("dark:border-slate-700");
const successInput = screen.getByLabelText("성공 메시지") as HTMLInputElement;
const successInput = screen.getByLabelText("Success message") as HTMLInputElement;
const successClass = successInput.getAttribute("class") ?? "";
expect(successClass).toContain("bg-white");
expect(successClass).toContain("text-slate-900");
@@ -266,7 +264,7 @@ describe("FormControllerPanel", () => {
expect(successClass).toContain("dark:text-slate-100");
expect(successClass).toContain("dark:border-slate-700");
const errorInput = screen.getByLabelText("에러 메시지") as HTMLInputElement;
const errorInput = screen.getByLabelText("Error message") as HTMLInputElement;
const errorClass = errorInput.getAttribute("class") ?? "";
expect(errorClass).toContain("bg-white");
expect(errorClass).toContain("text-slate-900");
@@ -275,7 +273,7 @@ describe("FormControllerPanel", () => {
expect(errorClass).toContain("dark:text-slate-100");
expect(errorClass).toContain("dark:border-slate-700");
const extraParamsTextarea = screen.getByLabelText(/추가 파라미터/) as HTMLTextAreaElement;
const extraParamsTextarea = screen.getByLabelText(/Additional parameters/) as HTMLTextAreaElement;
const extraParamsClass = extraParamsTextarea.getAttribute("class") ?? "";
expect(extraParamsClass).toContain("bg-white");
expect(extraParamsClass).toContain("text-slate-900");
@@ -285,7 +283,7 @@ describe("FormControllerPanel", () => {
expect(extraParamsClass).toContain("dark:border-slate-700");
});
it("Google Sheets 연동 가이드 모달 카드와 textarea 는 라이트/다크 듀얼 테마 크롬을 사용해야 한다", () => {
it("Google Sheets integration guide modal card and textarea should use dual light/dark theme chrome", () => {
const formBlock = makeFormBlock("form-webhook-theme", {
submitTarget: "webhook",
} as any);
@@ -301,10 +299,10 @@ describe("FormControllerPanel", () => {
/>,
);
const guideButton = screen.getByRole("button", { name: "Google Sheets 연동 가이드" });
const guideButton = screen.getByRole("button", { name: "Google Sheets integration guide" });
fireEvent.click(guideButton);
const heading = screen.getByRole("heading", { name: "Google Sheets 연동 가이드" });
const heading = screen.getByRole("heading", { name: "Google Sheets integration guide" });
const card = heading.closest("div")?.parentElement as HTMLDivElement | null;
expect(card).not.toBeNull();
@@ -352,7 +350,7 @@ describe("FormControllerPanel", () => {
/>,
);
const fieldset = screen.getByRole("group", { name: "폼 필드 매핑" });
const fieldset = screen.getByRole("group", { name: "Form field mapping" });
const checkboxes = within(fieldset).getAllByRole("checkbox");
const includeCheckbox = checkboxes[0] as HTMLInputElement;
@@ -391,7 +389,7 @@ describe("FormControllerPanel", () => {
/>,
);
const select = screen.getByLabelText("Submit 버튼") as HTMLSelectElement;
const select = screen.getByLabelText("Submit button") as HTMLSelectElement;
const className = select.getAttribute("class") ?? "";
expect(className).toContain("bg-white");