feat(BT-003B): add event comparison drilldown

This commit is contained in:
Bu5hm4nn
2026-03-26 22:05:31 +01:00
parent bdf56ecebe
commit 3c9ff201e1
8 changed files with 329 additions and 21 deletions

View File

@@ -196,12 +196,24 @@ def test_homepage_and_options_page_render() -> None:
page.get_by_role("button", name="Run comparison").click()
expect(page.locator("text=Ranked Results").first).to_be_visible(timeout=15000)
expect(page.locator("text=Scenario Results").first).to_be_visible(timeout=15000)
expect(page.locator("text=Strategy Drilldown").first).to_be_visible(timeout=15000)
expect(page.locator("text=Portfolio Value Paths").first).to_be_visible(timeout=15000)
expect(page.locator("text=Selected strategy: Protective Put ATM").first).to_be_visible(timeout=15000)
rerun_event_text = page.locator("body").inner_text(timeout=15000)
assert "Baseline series shows the unhedged collateral value path" in rerun_event_text
assert "Templates compared" in rerun_event_text and "4" in rerun_event_text
assert "Worst LTV point" in rerun_event_text
assert "Margin threshold breach dates" in rerun_event_text
assert "Daily path details" in rerun_event_text
assert "Historical scenario starts undercollateralized:" not in rerun_event_text
page.get_by_label("Strategy drilldown").click()
page.get_by_text("#4 — Protective Put 90%", exact=True).click()
expect(page.locator("text=Selected strategy: Protective Put 90%").first).to_be_visible(timeout=15000)
expect(page.locator("text=Rank #4 · Breached margin threshold").first).to_be_visible(timeout=15000)
expect(page.locator("text=2024-01-08 · 82.6%").first).to_be_visible(timeout=15000)
expect(page.locator("text=$17,939").first).to_be_visible(timeout=15000)
page.get_by_label("Event preset").click()
page.get_by_text("GLD January 2024 Drawdown", exact=True).click()
expect(page.locator("text=Results out of date").first).to_be_visible(timeout=15000)