From 806405cd700705b8edf249e4de1e9a454528368f Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 27 Oct 2026 07:02:59 +0900 Subject: [PATCH] =?UTF-8?q?test(556-2):=20=EB=82=98=EB=A8=B8=EC=A7=80=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20CSS=20=EB=82=A0=20=ED=9D=B0=20?= =?UTF-8?q?=EB=B0=94=ED=83=95=20=EC=97=86=EC=9D=8C=20=EC=A7=80=ED=82=B4=20?= =?UTF-8?q?=EC=8B=9C=ED=97=98=20(PLAN=20556-2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - B07~B09 · D · E · M01 · M02 페이지 CSS 에 날 흰 바탕 금지(E05 종이 미리보기만 예외) Co-Authored-By: Claude Sonnet 5.5 --- resources/tester/test_556_2_page_bg.py | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 resources/tester/test_556_2_page_bg.py diff --git a/resources/tester/test_556_2_page_bg.py b/resources/tester/test_556_2_page_bg.py new file mode 100644 index 000000000..f78248c03 --- /dev/null +++ b/resources/tester/test_556_2_page_bg.py @@ -0,0 +1,43 @@ +"""556-2 나머지 페이지(B07~B09 · D · E · M01 · M02) 본문 — 페이지 CSS 가 흰 바탕을 날 색으로 박지 않음 · 그림 판은 제 색.""" + +import os +import re +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[2] +PAGES = ( + "B07_DesignDetail", + "B08_Quantity", + "B09_Estimation", + "D01_PlanRegister", + "D02_PlanBase", + "D03_PlanAnalysis", + "D04_PlanConfirm", + "E01_StabRegister", + "E02_StabGround", + "E03_StabSection", + "E04_Stab3D", + "E05_StabReport", + "E06_StabRock", + "E07_StabArea", + "M01_MasterData", + "M02_MasterTemplete", +) +# 종이 미리보기(PDF 틀)는 인쇄 종이 흰색 그대로 +PAPER = {"E05_StabReport/E05_StabReport_UI_Style.css"} +RAW_WHITE = re.compile(r"background(-color)?\s*:\s*(#fff(fff)?|white)\b", re.I) + + +def test_no_raw_white_background_in_page_css(): + bad = [] + for page in PAGES: + for base, dirs, files in os.walk(ROOT / page): + dirs[:] = [d for d in dirs if d not in ("node_modules", "dist", "build")] + for name in files: + if not name.endswith(".css"): + continue + path = Path(base) / name + rel = path.relative_to(ROOT).as_posix() + if rel not in PAPER and RAW_WHITE.search(path.read_text(encoding="utf-8")): + bad.append(rel) + assert not bad, f"날 흰 바탕: {bad}"