Skip to content

feat(e2e): restore kb-librarian-api.spec.ts for /api/kb-librarian endpoints (#3402)#3418

Merged
mrveiss merged 1 commit intoDev_new_guifrom
fix/issue-3402
Apr 3, 2026
Merged

feat(e2e): restore kb-librarian-api.spec.ts for /api/kb-librarian endpoints (#3402)#3418
mrveiss merged 1 commit intoDev_new_guifrom
fix/issue-3402

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 3, 2026

Summary

Auth approach

All three route handlers carry Depends(get_current_user) imported from auth_middleware. The e2e tests verify the auth surface by issuing requests without a bearer token (expecting 401/403). Authenticated happy-path tests are gated on E2E_AUTH_TOKEN env var so they skip gracefully in CI where no session token is available.

Test plan

  • E2E_AUTH_TOKEN unset: the three unauthenticated-rejection tests pass (401/403 assertions)
  • E2E_AUTH_TOKEN set to a valid session token: all authenticated tests pass against a running backend
  • flake8 autobot-backend/api/kb_librarian.py --max-line-length=100 exits 0 (verified locally)

Closes #3402

🤖 Generated with Claude Code

…points (#3402)

Add Playwright e2e tests covering all three KB Librarian HTTP endpoints
(status, query, configure) including unauthenticated 401/403 checks,
validation error cases (422/400), and authenticated happy-path assertions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mrveiss mrveiss merged commit befe3cf into Dev_new_gui Apr 3, 2026
2 of 3 checks passed
@mrveiss mrveiss deleted the fix/issue-3402 branch April 3, 2026 21:04
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant