fix(project): 이미지 창 아래 막대 단추 글자가 여러 줄로 나오던 문제

막대가 left:50% 라 폭이 창 절반으로 잡혀 작은 창에서 줄바꿈됐다 — 막대 폭 = 내용 길이(max-content)·한 줄,
이미지 창 최소 폭 480 → 560px. 브라우저 테스트에 480·560px 창 확인 추가.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 12:18:36 +09:00
parent 443dfc5a8a
commit ec8b9787e6
9 changed files with 21 additions and 9 deletions
@@ -96,6 +96,16 @@ const server = http.createServer(async (req, res) => {
ok("[다운로드] = 첨부 다운로드 주소", /\/project\/api\/attachments\/7\/download$/.test(dlHref || ""), dlHref);
const [download] = await Promise.all([pop.waitForEvent("download"), pop.click("#dl")]);
ok("[다운로드] 누르면 파일 내려받기", download.suggestedFilename() === "photo.png" && downloads.length === 1, download.suggestedFilename());
// 작은 창(작은 사진) — 막대 단추 글자가 한 줄(예전엔 막대 폭이 창 절반으로 잡혀 "원본/보기"처럼 줄바꿈)
for (const w of [560, 480]) {
await pop.setViewportSize({ width: w, height: 400 });
const bar = await pop.evaluate(() => {
const b = document.getElementById("bar"), r = b.getBoundingClientRect();
const tall = Array.from(b.querySelectorAll("button, a")).filter(el => el.getBoundingClientRect().height > 32).map(el => el.textContent.trim());
return { tall: tall, h: Math.round(r.height), inside: r.left >= 0 && r.right <= innerWidth };
});
ok("창 폭 " + w + "px — 막대 단추 글자 한 줄, 막대가 창 안", bar.tall.length === 0 && bar.h <= 40 && bar.inside, bar);
}
await pop.locator("#bar").screenshot({ path: path.join(OUT, "comment_image_bar.png") });
await pop.screenshot({ path: path.join(OUT, "comment_image_viewer.png") });
await pop.close();