fix: restore workspace nav and correct overview spot fallback
This commit is contained in:
@@ -97,17 +97,34 @@ def test_homepage_and_options_page_render() -> None:
|
||||
expect(page.locator("text=Settings").first).to_be_visible(timeout=15000)
|
||||
expect(page.locator("text=Collateral entry basis").first).to_be_visible(timeout=15000)
|
||||
expect(page.locator("text=Entry price ($/oz)").first).to_be_visible(timeout=15000)
|
||||
|
||||
page.get_by_label("Collateral entry basis").click()
|
||||
page.get_by_text("Gold weight + entry price", exact=True).click()
|
||||
page.get_by_label("Entry price ($/oz)").fill("4400")
|
||||
page.get_by_label("Gold weight (oz)").fill("220")
|
||||
budget_input = page.get_by_label("Monthly hedge budget ($)")
|
||||
budget_input.fill("12345")
|
||||
page.get_by_role("button", name="Save settings").click()
|
||||
expect(page.locator("text=Settings saved successfully").first).to_be_visible(timeout=15000)
|
||||
page.reload(wait_until="domcontentloaded", timeout=30000)
|
||||
expect(page.get_by_label("Monthly hedge budget ($)")).to_have_value("12345")
|
||||
expect(page.get_by_label("Entry price ($/oz)")).to_have_value("4400")
|
||||
settings_text = page.locator("body").inner_text(timeout=15000)
|
||||
assert "RuntimeError" not in settings_text
|
||||
assert "Server error" not in settings_text
|
||||
page.screenshot(path=str(ARTIFACTS / "settings.png"), full_page=True)
|
||||
|
||||
page.goto(workspace_url, wait_until="domcontentloaded", timeout=30000)
|
||||
overview_text = page.locator("body").inner_text(timeout=15000)
|
||||
assert "Hedge Analysis" in overview_text
|
||||
assert "Options Chain" in overview_text
|
||||
assert "Backtests" in overview_text
|
||||
assert "Event Comparison" in overview_text
|
||||
assert "Live quote source: configured entry price fallback" in overview_text
|
||||
assert "$878.79" in overview_text
|
||||
assert "$968,000.00" in overview_text
|
||||
assert "$823,000.00" in overview_text
|
||||
|
||||
second_context = browser.new_context(viewport={"width": 1440, "height": 1000})
|
||||
second_page = second_context.new_page()
|
||||
second_page.goto(BASE_URL, wait_until="domcontentloaded", timeout=30000)
|
||||
|
||||
Reference in New Issue
Block a user