23 lines
744 B
Python
23 lines
744 B
Python
import pytest
|
|
from django.urls import reverse
|
|
|
|
from review_agent.models import Conversation
|
|
|
|
|
|
pytestmark = pytest.mark.django_db
|
|
|
|
|
|
def test_workspace_renders_summary_panel(client, django_user_model):
|
|
user = django_user_model.objects.create_user(username="owner", password="pass")
|
|
conversation = Conversation.objects.create(user=user, title="会话")
|
|
client.force_login(user)
|
|
|
|
response = client.get(f"{reverse('home')}?conversation={conversation.pk}")
|
|
|
|
assert response.status_code == 200
|
|
content = response.content.decode("utf-8")
|
|
assert 'id="summaryPanel"' in content
|
|
assert 'id="uploadDropzone"' in content
|
|
assert 'id="workflowCardList"' in content
|
|
assert "自动汇总文件目录与页数" in content
|