From cd109cf8730a633c79ef8a71c5b3e97e8e7d9f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Thu, 22 Oct 2026 17:04:30 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20plan=20review=20nits=20=E2=80=94=20prev?= =?UTF-8?q?iew-based=20test=20reads,=20spec=20R3.1=20revision=20chain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Code --- .../plans/2026-10-22-trade-pro-theme-port.md | 13 +++++-------- .../specs/2026-10-22-trade-pro-theme-design.md | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/superpowers/plans/2026-10-22-trade-pro-theme-port.md b/docs/superpowers/plans/2026-10-22-trade-pro-theme-port.md index 30f47e9..8c8d3be 100644 --- a/docs/superpowers/plans/2026-10-22-trade-pro-theme-port.md +++ b/docs/superpowers/plans/2026-10-22-trade-pro-theme-port.md @@ -208,11 +208,8 @@ def test_trade_pro_registered_and_compatible(): def test_trade_pro_builds_real_site(tmp_path): # 复用 tests/test_theme_pro_v3.py 中"建站→切主题→构建→断言预览页"的既有写法 # (夹具工厂在 tests/test_factory_v2.py:15-30),theme 用 'trade-pro'。 - # 真实断言(不允许空壳): - # 1. 构建成功且生成 index.html - # 2. 输出包含 lang="en" - # 3. 不包含平台中文默认导航文案"首页" - html = (tmp_path / 'index.html').read_text(encoding='utf-8') # 按夹具实际构建目录 + # 产物读取走夹具的 HTTP 形式(与 v3 一致): + html = factory.get(f'/preview/{sid}/{bid}/').text assert 'lang="en"' in html assert '>首页<' not in html ``` @@ -294,10 +291,10 @@ def test_frontend_entries_include_trade_pro(): ]: assert needle in (base / rel).read_text(encoding='utf-8'), rel -def test_theme_color_map_covers_trade_pro(tmp_path): +def test_theme_color_map_covers_trade_pro(): # 真实断言:trade-pro 构建出的首页含 meta theme-color #0b3d91 - # (复用 Task 5 的构建夹具写法) - html = (tmp_path / 'index.html').read_text(encoding='utf-8') + # (复用 Task 5 的构建夹具与 /preview/ HTTP 读取写法) + html = factory.get(f'/preview/{sid}/{bid}/').text assert '