32 lines
1014 B
Python
32 lines
1014 B
Python
import os
|
|
import sys
|
|
|
|
from fastapi.testclient import TestClient
|
|
|
|
PROJECT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
|
if PROJECT_DIR not in sys.path:
|
|
sys.path.insert(0, PROJECT_DIR)
|
|
|
|
from app.web import web_server
|
|
|
|
|
|
def test_index_hides_screening_from_top_level_tabs():
|
|
client = TestClient(web_server.app)
|
|
resp = client.get("/")
|
|
assert resp.status_code == 200
|
|
html = resp.text
|
|
assert 'data-tab="screening"' not in html
|
|
assert '>筛选池<' not in html
|
|
# Miro redesign: landing page no longer references internal debugging endpoints
|
|
assert '/api/screening' not in html
|
|
|
|
|
|
def test_review_page_slimmed_top_level_modules():
|
|
html = web_server.HTML_PAGE
|
|
assert '📈 组合净值 + 推荐生命周期' not in html
|
|
assert '📘 复盘口径说明' not in html
|
|
assert '🏆 当前浮盈第一' not in html
|
|
assert '🩸 当前浮亏第一' not in html
|
|
assert '🚀 最大爆发币' not in html
|
|
assert '⚠️ 最危险币' not in html
|