Files
Aislo/resources/tester/test_54_2_help_files.py
T
eomsangdonandClaude Opus 5.5 a1069f270a feat(529-1): 단계 틀 인자(아이콘 · [<][>] 묶음 · 도움말 이름) · D · E 단계 빈 길 일곱
- createWorkflowLayout icons 인자(없으면 B 일곱 아이콘 그대로)
- [?] [<] [>] 묶음 = B05~B09 · D02~D04 · E02~E05 · 묶음 안에서만 오감 · 설명서 이름 B0N/D0N/E0N
- 서버 설명서 주소 D01~D04 · E01~E05 허용 · 우클릭 막기 · 돋보기 d · e 주소
- ROUTES D01~E05 · PLAN_STEP_ROUTES · STAB_STEP_ROUTES · A00_Common/group_workflow(빈 단계 = 틀 · 좌측 [?] 줄 · 단계 막대)
- 페이지 폴더마다 draft/<폴더>_Route.ts · tsconfig 에 D0* · E0* · 문구 ui_template_locale_de
- 시험: 280-2 대역에 D · E 묶음 · 54-2 D · E 설명서 길

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 19:32:09 +09:00

43 lines
1.4 KiB
Python

"""54-2 [?] 설명서 — 서버가 resources/help/<페이지>/*.md 를 부를 때마다 읽음(고치면 바로 바뀜)."""
import tempfile
from pathlib import Path
import pytest
from fastapi import HTTPException
from common_util.common_util_help_router import HELP_ROOT, read_help
def test_every_page_has_manual_first():
for n in range(2, 10):
items = read_help(f"B0{n}")
assert items and items[0]["key"] == "00_설명서"
def test_title_order_and_live_edit():
tmp_path = Path(tempfile.mkdtemp())
page = tmp_path / "B05"
page.mkdir()
(page / "10_배관.md").write_text("# 배관\n\n본문", encoding="utf-8")
(page / "00_설명서.md").write_text("제목 없음", encoding="utf-8")
items = read_help("B05", tmp_path)
assert [i["key"] for i in items] == ["00_설명서", "10_배관"]
assert [i["title"] for i in items] == ["00_설명서", "배관"]
(page / "10_배관.md").write_text("# 배관\n\n고친 글", encoding="utf-8")
assert "고친 글" in read_help("B05", tmp_path)[1]["text"]
@pytest.mark.parametrize("page", ["B01", "B10", "../B05", "b05", "D05", "E06", "C01"])
def test_bad_page_refused(page):
with pytest.raises(HTTPException):
read_help(page)
def test_529_1_D_E_pages_open_empty(tmp_path):
assert read_help("D02", tmp_path) == [] and read_help("E05", tmp_path) == []
def test_root_is_repo_resources():
assert HELP_ROOT.parts[-2:] == ("resources", "help")