import pytest BASE_URL = "http://127.0.0.1:8080" @pytest.mark.asyncio async def test_dashboard_access(page): # Assume logged in, but for isolation, login first await page.goto(f"{BASE_URL}/login") await page.fill("#email", "testuser@example.com") await page.fill("#password", "password123") await page.click("button[type=submit]") await page.wait_for_url("**/dashboard") # Now test dashboard assert "Dashboard" in await page.text_content() # Assert some elements, like navigation links await page.wait_for_selector("text=My Files") await page.wait_for_selector("text=Shared") await page.wait_for_selector("text=Recent") await page.wait_for_selector("text=Favorites") await page.wait_for_selector("text=Trash")