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("Dashboard ยท CalMiner") def test_dashboard_shows_summary_metrics_panel(page: Page): """Check that the summary metrics panel is visible.""" expect(page.locator("h2:has-text('Operations Overview')")).to_be_visible() def test_dashboard_renders_cost_chart(page: Page): """Ensure the scenario cost chart canvas is present.""" expect(page.locator("#cost-chart")).to_be_attached() expect(page.locator("#cost-chart-empty")).to_be_visible()