feat(performance): 광고비 파일 여러 개 업로드(같은 날짜는 최신 파일) + 끝나면 창 닫기

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 17:32:01 +09:00
parent 15a5eddf20
commit e3bc9d518d
9 changed files with 150 additions and 25 deletions
+7 -3
View File
@@ -193,13 +193,17 @@ function gross(td) { return td.querySelector(".v-gross").textContent.trim(); }
modal.querySelector(".perf-ad-channel").dispatchEvent(new e.w.Event("change"));
check("[업로드] 양식 안내(19열 청구금액)", /19열/.test(modal.querySelector(".perf-ad-help").textContent));
const fileInput = modal.querySelector(".perf-upload-file");
const f = new e.w.File(["날짜"], "rocket.csv", { type: "text/csv" });
Object.defineProperty(fileInput, "files", { value: [f] });
check("[업로드] 파일 여러 개 고르기", fileInput.multiple === true);
const f = new e.w.File(["날짜"], "rocket.csv", { type: "text/csv", lastModified: 1700000000000 });
const f2 = new e.w.File(["날짜"], "rocket2.csv", { type: "text/csv", lastModified: 1800000000000 });
Object.defineProperty(fileInput, "files", { value: [f, f2] });
Array.from(modal.querySelectorAll(".perf-modal-foot button, button")).filter(function (b) { return b.textContent === "업로드"; })[0].click();
await settle();
const post = e.calls.find(function (c) { return c.method === "POST"; });
check("[업로드] POST /api/ad-spend/upload?channel=coupang_rocket (파일)", post && post.url === "/performance/api/ad-spend/upload?channel=coupang_rocket" && !!post.form, e.calls);
check("[업로드] 결과 안내(12일 반영)", /12일 반영/.test(modal.querySelector(".perf-upload-result").textContent));
check("[업로드] 파일마다 files + 파일 날짜(modified)", post && post.form.getAll("files").length === 2 &&
JSON.stringify(post.form.getAll("modified")) === JSON.stringify(["1700000000000", "1800000000000"]), post && post.form.getAll("modified"));
check("[업로드] 끝나면 창이 닫힘", !e.d.body.contains(modal) && !e.d.querySelector(".perf-modal"));
}
// ── 네이버 — 보고서 ROAS 표시 · 머리글 → 일자별 보고서 항목 ──
{