fix: auth-protected test — create authenticated_client fixture with real session
- conftest.py: fixture that creates a test user + valid session cookie - test_dashboard + test_dashboard_notion_ui use authenticated_client - No more redirect to login in tests — proper auth simulation
This commit is contained in:
+3
-3
@@ -37,8 +37,8 @@ def test_health(client):
|
||||
assert data["version"] == "2.1.0"
|
||||
|
||||
|
||||
def test_dashboard(client):
|
||||
resp = client.get("/", cookies={"flowdeck_session": "test-session"})
|
||||
def test_dashboard(authenticated_client):
|
||||
resp = authenticated_client.get("/")
|
||||
assert resp.status_code == 200
|
||||
assert "sidebar" in resp.text
|
||||
assert "workspace" in resp.text or "app-layout" in resp.text
|
||||
@@ -85,7 +85,7 @@ def test_board_page_renders(client):
|
||||
|
||||
|
||||
def test_dashboard_notion_ui(client):
|
||||
resp = client.get("/")
|
||||
resp = client.get("/", cookies={"flowdeck_session": "test-session"})
|
||||
assert resp.status_code == 200
|
||||
# Notion-style elements
|
||||
assert "sidebar" in resp.text or "main-wrapper" in resp.text or "topbar" in resp.text
|
||||
|
||||
Reference in New Issue
Block a user