feat: Enhance end-to-end testing framework with improved server setup and UI validation
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user