feat(라이브): 달력에서 방송이 걸친 시간 칸을 합쳐 표시
- 2시간 방송 = 두 칸(rowspan), 30분이라도 걸치면 그 칸까지, 자정 넘김은 그날 마지막 칸까지
- 합친 칸 안에서 시작하는 다른 방송도 같은 칸에 넣고 더 길면 칸을 늘림
- 직전 커밋 1babc39 의 메시지는 잘못 들어감 — 실제 내용은 달력 시간 칸 1시간 단위 변경
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -114,6 +114,19 @@ function check(name, cond, extra) {
|
||||
await day("2026-11-02").click();
|
||||
await p.waitForTimeout(150);
|
||||
check("앞날로 돌아감", (await gap("2026-11-02")) < 2, await gap("2026-11-02"));
|
||||
// 2시간 방송 = 두 칸 합침(rowspan), 22:00~23:30 = 22·23 칸
|
||||
const merged = await p.evaluate(function () {
|
||||
return Array.from(document.querySelectorAll('td[data-day="2026-11-05"]')).map(function (td) { return td.dataset.start + "/" + (td.rowSpan || 1); });
|
||||
});
|
||||
check("2시간 방송 = 두 칸 합침", merged.slice(0, 3).join(",") === "06:00/2,08:00/2,10:00/2" && merged[merged.length - 1] === "22:00/2", merged);
|
||||
const tall = await p.evaluate(function () {
|
||||
const m = document.querySelector('td[data-day="2026-11-05"][data-start="06:00"]').getBoundingClientRect().height;
|
||||
const one = document.querySelector('td[data-day="2026-11-04"][data-start="06:00"]').getBoundingClientRect().height;
|
||||
const two = document.querySelector('td[data-day="2026-11-04"][data-start="07:00"]').getBoundingClientRect().height;
|
||||
return Math.abs(m - one - two);
|
||||
});
|
||||
check("합친 칸 높이 = 두 줄", tall < 2, tall);
|
||||
await p.screenshot({ path: path.join(__dirname, ".out", "live_merge.png") });
|
||||
|
||||
await p.locator('#lv-side-cal [data-nav="1"]').click();
|
||||
await Promise.all([p.waitForURL(/month=2026-12/), day("2026-12-10").click()]);
|
||||
|
||||
Reference in New Issue
Block a user