Files
transcription/tests/ui/test_upload_page.py
T
2026-06-29 19:05:15 -05:00

36 lines
1.2 KiB
Python

"""Tests for upload and entry-point routes."""
import pytest
@pytest.mark.integration
class TestPageRendering:
"""Verify upload-related routes return working pages."""
def test_root_redirects_to_ui(self, app_client):
"""GET / redirects to the UI mount point."""
_, client = app_client
response = client.get("/", follow_redirects=False)
assert response.status_code == 307
assert response.headers["location"] == "/ui"
def test_ui_redirects_to_upload(self, app_client):
"""GET /ui redirects to the upload page."""
_, client = app_client
response = client.get("/ui", follow_redirects=False)
assert response.status_code == 307
assert response.headers["location"] == "/ui/upload"
def test_upload_page_renders_expected_controls(self, app_client):
"""GET /ui/upload returns the page shell and upload controls."""
_, client = app_client
response = client.get("/ui/upload")
assert response.status_code == 200
assert "Upload Document" in response.text
assert "Select document file" in response.text
assert "Upload" in response.text
assert "Jobs" in response.text