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 '