fix: expose dashboard login shell

This commit is contained in:
Курнат Андрей
2026-07-19 22:20:14 +03:00
parent 0ec64645b6
commit 393454c9e0
4 changed files with 39 additions and 16 deletions
+6 -3
View File
@@ -64,13 +64,16 @@ def test_safe_config_summarizes_torch_forecast_artifact(make_settings, tmp_path)
def test_web_ui_assets_are_available() -> None:
html = WEB_INDEX.read_text(encoding="utf-8")
script = WEB_INDEX.with_name("dashboard.js").read_text(encoding="utf-8")
assert "TradeBot — панель управления" in html
assert "/assets/dashboard.css" in html
assert "/assets/dashboard.js" in html
assert "/web-api/dashboard/snapshot" in WEB_INDEX.with_name("dashboard.js").read_text(
encoding="utf-8"
)
assert 'id="usernameInput"' in html
assert 'id="passwordInput"' in html
assert "/web-api/dashboard/snapshot" in script
assert "headers.Authorization = state.authorization" in script
assert "X-TradeBot-Token" not in script
def test_compact_markets_keeps_dashboard_fields_and_limits_candles() -> None: