feat: Enhance end-to-end testing framework with improved server setup and UI validation

This commit is contained in:
2025-10-21 09:04:06 +02:00
parent f020d276bc
commit 9114b584c2
11 changed files with 138 additions and 71 deletions

View File

@@ -3,16 +3,15 @@ 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")
expect(page).to_have_title("Dashboard · CalMiner")
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()
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."""
cost_chart = page.locator("#scenario-cost-chart")
expect(cost_chart).to_be_visible()
expect(page.locator("#cost-chart")).to_be_attached()
expect(page.locator("#cost-chart-empty")).to_be_visible()