Skip to content

initialize vitest and add E2E tests for public API endpoints #99

Open
Enes830 wants to merge 3 commits intoagentset-ai:mainfrom
Enes830:e2e-tests
Open

initialize vitest and add E2E tests for public API endpoints #99
Enes830 wants to merge 3 commits intoagentset-ai:mainfrom
Enes830:e2e-tests

Conversation

@Enes830
Copy link

@Enes830 Enes830 commented Jan 31, 2026

Greptile Overview

Greptile Summary

Initialized vitest and added comprehensive E2E tests for all public API endpoints including Namespace, Ingest Jobs, Documents, Search, Uploads, Hosting, and Warm-up APIs.

Key Changes:

  • Set up vitest with proper configuration for E2E testing
  • Created reusable test setup with Zod schema validation for response types
  • Implemented 250+ test cases covering happy paths, auth errors, validation errors, and edge cases
  • Added detailed documentation (README and BUGS.md) for running tests and tracking known issues
  • Used environment variables for configuration flexibility

Test Coverage:

  • Health, Namespace, Ingest Jobs (TEXT/FILE/CRAWL), Documents, Search, Uploads, Hosting, Warm-up APIs
  • Auth validation (401 errors)
  • Input validation (400/422 errors)
  • Not found errors (404)
  • Conflict errors (409)

Notable Aspects:

  • Tests appropriately skip operations that would delete test data
  • Three tests are skipped due to documented API bugs
  • BUGS.md provides excellent documentation of known issues with root causes and fix suggestions

Confidence Score: 5/5

  • This PR is safe to merge - it only adds test infrastructure and documentation without modifying production code
  • The PR exclusively adds testing infrastructure with well-structured E2E tests, clear documentation, and no changes to production code. Tests follow best practices with schema validation, proper error handling, and environment-based configuration.
  • No files require special attention - all test files are well-structured and properly documented

Important Files Changed

Filename Overview
apps/web/test/e2e/setup.ts Created comprehensive test setup with schemas, helpers, and environment config; includes z.iso.datetime() which may need verification
apps/web/test/e2e/namespace.test.ts Comprehensive namespace API tests covering CRUD operations, auth, and validation; includes one skipped test due to known bug
apps/web/test/e2e/ingest-jobs.test.ts Thorough ingest jobs API tests covering TEXT, FILE, and CRAWL types with proper error handling
apps/web/test/e2e/hosting.test.ts Hosting API tests with two skipped tests due to known bugs in PATCH and DELETE endpoints
apps/web/test/e2e/BUGS.md Comprehensive documentation of known bugs blocking tests with root causes and fix options

(4/5) You can add custom instructions or style guidelines for the agent here!

@vercel
Copy link

vercel bot commented Jan 31, 2026

@Enes830 is attempting to deploy a commit to the Agentset Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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