CI: feature/form-submissions-pages #30

Merged
jaybe merged 2 commits from feature/form-submissions-pages into main 2025-12-07 10:53:32 +00:00
9 changed files with 21 additions and 12 deletions
Showing only changes of commit 4bb4c83054 - Show all commits
+2 -1
View File
@@ -899,7 +899,8 @@ function EditorPageInner() {
const titleRaw = projectConfig?.title;
const title = (typeof titleRaw === "string" ? titleRaw.trim() : "") || "제목 없음";
const intervalMs = 20000;
const intervalEnv = process.env.NEXT_PUBLIC_EDITOR_SERVER_AUTOSAVE_MS;
const intervalMs = intervalEnv ? Number(intervalEnv) || 20000 : 20000;
let cancelled = false;
const saveOnce = async () => {
+10 -8
View File
@@ -69,14 +69,13 @@ beforeEach(() => {
window.localStorage.clear();
searchParamsSlug = null;
vi.useFakeTimers();
(process.env as any).NEXT_PUBLIC_EDITOR_SERVER_AUTOSAVE_MS = "10";
});
afterEach(() => {
cleanup();
vi.useRealTimers();
vi.unstubAllGlobals();
delete (process.env as any).NEXT_PUBLIC_EDITOR_SERVER_AUTOSAVE_MS;
});
vi.mock("@/features/editor/state/editorStore", () => {
@@ -153,8 +152,6 @@ describe("EditorPage - 서버 자동 저장", () => {
).toBe(true);
});
await vi.advanceTimersByTimeAsync(20000);
await waitFor(() => {
expect(
fetchMock.mock.calls.some(
@@ -199,8 +196,6 @@ describe("EditorPage - 서버 자동 저장", () => {
).toBe(true);
});
await vi.advanceTimersByTimeAsync(20000);
const projectCalls = fetchMock.mock.calls.filter(
([url, options]: any[]) => url === "/api/projects" && (options?.method ?? "GET") === "POST",
);
@@ -272,7 +267,14 @@ describe("EditorPage - 서버 자동 저장", () => {
).toBe(true);
});
await vi.advanceTimersByTimeAsync(20000);
await waitFor(() => {
expect(
fetchMock.mock.calls.some(
([url, options]: any[]) =>
url === "/api/projects" && (options?.method ?? "GET") === "POST",
),
).toBe(true);
});
const projectCall = fetchMock.mock.calls.find(
([url, options]: any[]) => url === "/api/projects" && (options?.method ?? "GET") === "POST",
+3 -3
View File
@@ -178,7 +178,7 @@ describe("FormControllerPanel", () => {
).toBeTruthy();
});
it("Google Sheets 가이드 모달의 Apps Script 코드가 컨트롤러에 매핑된 전송 키와 작성일시를 포함해야 한다", () => {
it("Google Sheets 가이드 모달의 Apps Script 코드가 컨트롤러에 매핑된 전송 키와 작성일시를 포함해야 한다", async () => {
const formBlock = makeFormBlock("form-webhook", {
submitTarget: "webhook",
fieldIds: ["input-name", "input-email"],
@@ -214,9 +214,9 @@ describe("FormControllerPanel", () => {
);
const guideButton = screen.getByRole("button", { name: "Google Sheets 연동 가이드" });
guideButton.click();
fireEvent.click(guideButton);
const scriptTextarea = screen.getByDisplayValue(/function doPost/) as HTMLTextAreaElement;
const scriptTextarea = (await screen.findByDisplayValue(/function doPost/)) as HTMLTextAreaElement;
expect(scriptTextarea.value).toContain("params.name || \"\"");
expect(scriptTextarea.value).toContain("params.email || \"\"");
@@ -0,0 +1 @@
dummy-video
+1
View File
@@ -0,0 +1 @@
dummy-image
+1
View File
@@ -0,0 +1 @@
dummy-image
@@ -0,0 +1 @@
dummy-section-video
+1
View File
@@ -0,0 +1 @@
dummy-video
+1
View File
@@ -0,0 +1 @@
dummy-poster