feat(실적): 열 접기 버튼에 커서 따라다니는 이름 말풍선

버튼 위에 올리면 커서 바로 위에 쇼핑몰(열) 이름 — 글자 크기는 열 제목과 같은 12px 굵게.
머리글 th 의 기본 title 말풍선은 버튼 title="" 로 막음.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-06 19:58:18 +09:00
parent 548a163fc4
commit 359ff29e95
4 changed files with 36 additions and 1 deletions
+17
View File
@@ -57,6 +57,23 @@ function state(p, col) {
});
const s0 = await state(p, col);
check(tag + "날짜 열 빼고 열마다 버튼, 처음엔 펼침", s0.buttons === s0.heads - 1 && !s0.labelBtn && !s0.folded && s0.expanded === "true", s0);
// 말풍선 — 버튼 위에 올리면 커서 바로 위에 열 이름(제목 글자 크기 12px), 커서 따라 움직임, 머리글 기본 말풍선(title) 없음
const bb = await p.locator('thead th[data-col="' + col + '"] .perf-cfold').boundingBox();
await p.mouse.move(bb.x + 4, bb.y + bb.height / 2);
await p.mouse.move(bb.x + bb.width - 4, bb.y + bb.height / 2);
const tip = await p.evaluate(function (col) {
const t = document.querySelector(".perf-cfold-tip"), b = document.querySelector('thead th[data-col="' + col + '"] .perf-cfold');
const head = document.querySelector('thead th[data-col="' + col + '"]');
if (!t) return null;
const r = t.getBoundingClientRect();
return { text: t.textContent, name: head.textContent.replace(/[✎\s]+/g, " ").trim(), size: getComputedStyle(t).fontSize,
headSize: getComputedStyle(head).fontSize, cx: Math.round(r.left + r.width / 2), bottom: Math.round(r.bottom), title: b.getAttribute("title") };
}, col);
const cursorX = Math.round(bb.x + bb.width - 4), cursorY = bb.y + bb.height / 2;
check(tag + "말풍선 = 열 이름, 제목 글자 크기, 커서 위를 따라감", tip && tip.text === tip.name && tip.text !== "" && tip.size === tip.headSize &&
Math.abs(tip.cx - cursorX) <= 1 && tip.bottom < cursorY && tip.title === "", tip);
await p.mouse.move(5, 5);
check(tag + "벗어나면 말풍선 닫힘", (await p.locator(".perf-cfold-tip").count()) === 0);
await p.click('thead th[data-col="' + col + '"] .perf-cfold');
await p.waitForTimeout(100);
const s1 = await state(p, col);