fix: 去除页面编号井号显示

This commit is contained in:
meijiali
2026-07-03 19:12:08 +08:00
parent 4102ecc4e3
commit 07ce3d4fcd
5 changed files with 14 additions and 8 deletions
+10 -4
View File
@@ -99,8 +99,9 @@ def test_index_page_uses_short_task_numbers_compact_fields_and_friendly_error_co
assert response.status_code == 200
visible_text = BeautifulSoup(response.text, "html.parser").get_text(" ")
assert "#1" in visible_text
assert "#2" in visible_text
assert " 1 " in f" {visible_text} "
assert " 2 " in f" {visible_text} "
assert "#" not in visible_text
assert first_id not in visible_text
assert second_id not in visible_text
assert "2026-07-03 10:30" in visible_text
@@ -194,11 +195,12 @@ def test_task_detail_uses_short_number_title_and_keeps_full_uuid_for_diagnostics
assert response.status_code == 200
visible_text = BeautifulSoup(response.text, "html.parser").get_text(" ")
assert "<title>任务 #1 - 热榜评论分析工具</title>" in response.text
assert "任务 #1" in visible_text
assert "<title>任务 1 - 热榜评论分析工具</title>" in response.text
assert "任务 1" in visible_text
assert "完整 ID" in visible_text
assert task_id in visible_text
assert "任务 #33333333-3333-4333-8333-333333333333" not in visible_text
assert "#" not in visible_text
assert "创建时间 2026-07-03 10:30" in visible_text
@@ -416,6 +418,7 @@ def test_result_pages_render_seeded_data():
assert task_response.status_code == 200
assert "热点标题" in task_response.text
assert "热点 1:热点标题" in BeautifulSoup(task_response.text, "html.parser").get_text(" ")
assert 'onclick="window.location.reload()"' in task_response.text
assert hotspot_response.status_code == 200
assert "热点总结" in hotspot_response.text
@@ -431,6 +434,9 @@ def test_result_pages_render_seeded_data():
assert "<pre" not in hotspot_response.text
assert item_response.status_code == 200
assert "内容总结" in item_response.text
item_visible_text = BeautifulSoup(item_response.text, "html.parser").get_text(" ")
assert "热点 1:热点标题" in item_visible_text
assert "#" not in item_visible_text
assert "downloadExport('/api/export/items/item-result.md'" in item_response.text
assert "downloadExport('/api/export/items/item-result/comments.csv'" in item_response.text
assert "评论样本" in item_response.text