- single spec grammar for symbol and benchmark fields: commas join one portfolio (MSFT:0.6,V:0.4), spaces separate distinct symbols/portfolios; both fields accept one or many entries - benchmarks simulated with the same scheme/cost/tax rules; per-benchmark beta/alpha columns; after-tax benchmark curves - global Curve mode (pre/after/both) above the tabs; clean names in single-curve mode - live updates: field commits on Enter/blur, page recomputes per rerun; portfolio+tax sims cached (st.cache_data); plotly.js from CDN (4.6MB -> browser-cached) with F_INLINE_PLOTLY=1 offline fallback - chart: legend underneath, solid lines, pan sticks to data edges (width-preserving), zoom edge-clamped - inputs persist in settings.json across reloads/restarts/devices - tests: tests/test_app.py (AppTest) + tests/test_e2e_browser.py (Playwright) via ./run_tests.sh
26 lines
764 B
Bash
Executable File
26 lines
764 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Full test suite: app-level (Streamlit AppTest) + real-browser e2e (Playwright).
|
|
#
|
|
# Usage: ./run_tests.sh
|
|
# The browser e2e part needs the server running (./run.sh, port 8599);
|
|
# it is skipped automatically if the server is down.
|
|
set -uo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
fail=0
|
|
|
|
echo "=== 1/2 app tests (AppTest, no browser) ==="
|
|
.venv/bin/python tests/test_app.py || fail=1
|
|
echo
|
|
|
|
echo "=== 2/2 browser e2e (Playwright, needs the server) ==="
|
|
if curl -s -m 3 -o /dev/null http://localhost:8599/healthz; then
|
|
.venv/bin/python tests/test_e2e_browser.py || fail=1
|
|
else
|
|
echo "server not reachable on :8599 — skipping e2e (start it with ./run.sh)"
|
|
fi
|
|
echo
|
|
|
|
[ $fail -eq 0 ] && echo "ALL TESTS PASSED" || echo "TESTS FAILED"
|
|
exit $fail
|