Skip to content

Add integration tests for PDF viewer flow #508

@cbcoutinho

Description

@cbcoutinho

Problem

Excellent unit tests exist, but no integration tests verifying:

  • End-to-end flow: Vue component → PHP controller → Python API → WebDAV download → PyMuPDF render
  • Actual PDF rendering with different PDF types
  • Page navigation in the UI

Recommendation

Add integration test in tests/integration/test_astrolabe_pdf_viewer.py:

@pytest.mark.integration
async def test_pdf_viewer_end_to_end(nc_mcp_oauth_client, nc_client):
    """Test complete PDF viewing flow through Astrolabe UI."""
    # 1. Upload test PDF via WebDAV
    # 2. Index it via vector sync (or skip if not needed)
    # 3. Request PDF preview via API
    # 4. Verify base64 image is valid PNG
    # 5. Verify page navigation works
    ...

Location

  • tests/integration/

Priority

Nice to have - Improves confidence in end-to-end flow

Parent Issue

Part of #502

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions