docs: plan review nits — preview-based test reads, spec R3.1 revision chain
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -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 '<meta name="theme-color" content="#0b3d91"' in html
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user