Merge remote-tracking branch 'origin/sub_laptop_6' into main_laptop_1
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
"""555 — 불러오는 중 판 · 빌드판 서버 · CAD 글꼴의 짝 대조(파일만 읽음)."""
|
||||
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
def read(rel: str) -> str:
|
||||
return (ROOT / rel).read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_boot_loader_hides_on_app_outlet():
|
||||
html = read("A00_Common/index.html")
|
||||
assert 'id="boot-loader"' in html
|
||||
assert "body:has(#app-outlet > *) #boot-loader" in html
|
||||
assert 'outlet.id = "app-outlet"' in read("A00_Common/app_shell.ts")
|
||||
|
||||
|
||||
def test_boot_loader_theme_key_matches_app():
|
||||
key = re.search(r'THEME_STORAGE_KEY = "([^"]+)"', read("config/config_frontend.ts")).group(1)
|
||||
assert f'localStorage.getItem("{key}")' in read("A00_Common/index.html")
|
||||
|
||||
|
||||
def test_preview_port_is_dev_minus_1000_and_proxied():
|
||||
cfg = read("vite.config.ts")
|
||||
preview = re.search(r"preview: \{(.*?)\n \}", cfg, re.S).group(1)
|
||||
assert "port: devPort - 1000" in preview and "strictPort: true" in preview
|
||||
assert "proxy" not in preview # server.proxy(/api · /b07-cad)를 물려받음
|
||||
assert '"/api"' in cfg and '"/b07-cad"' in cfg
|
||||
|
||||
|
||||
def test_cad_build_copies_shared_fonts():
|
||||
cfg = read("B07_DesignDetail/openwebcad/vite.config.ts")
|
||||
assert "../../ui_template/fonts" in cfg and "./dist/assets" in cfg
|
||||
fonts_css = read("ui_template/fonts/noto_sans_kr.css")
|
||||
for name in re.findall(r'url\("\./([^"]+)"\)', fonts_css):
|
||||
assert (ROOT / "ui_template/fonts" / name).is_file(), name
|
||||
Reference in New Issue
Block a user