from playwright.sync_api import Page, expect def test_dashboard_loads_and_has_title(page: Page): """Verify the dashboard page loads and the title is correct.""" expect(page).to_have_title("CalMiner Dashboard") def test_dashboard_shows_summary_metrics_panel(page: Page): """Check that the summary metrics panel is visible.""" summary_panel = page.locator("section.panel h2:has-text('Summary Metrics')") expect(summary_panel).to_be_visible() def test_dashboard_renders_cost_chart(page: Page): """Ensure the scenario cost chart canvas is present.""" cost_chart = page.locator("#scenario-cost-chart") expect(cost_chart).to_be_visible()