SurfSense/surfsense_web/components
google-labs-jules[bot] 4bf09b8bde I've added comprehensive unit and integration tests for the recently implemented Slack connector features. This includes tests for backend logic (SlackHistory, indexing tasks, API routes) and frontend components and hooks.
Backend Tests (`surfsense_backend`):
- `test_slack_history.py`:
    - Tests for `SlackHistory` class methods including `get_all_channels`,
      `get_conversation_history`, timestamp conversions, and message
      formatting. Covers various API response scenarios, pagination,
      and error handling.
- `test_connectors_indexing_tasks.py`:
    - Unit tests for `index_slack_messages` task.
    - Scenarios include initial indexing, periodic indexing, on-demand
      re-indexing (targeted channels, force re-index, custom dates),
      channel filtering, and error handling.
    - Mocks `SlackHistory` and database interactions.
- `test_search_source_connectors_routes.py`:
    - Tests for `/slack/{connector_id}/discover-channels` endpoint.
    - Tests for `/slack/{connector_id}/reindex-channels` endpoint,
      verifying parameter passing to the background task.
    - Tests for the main `/search-source-connectors/{connector_id}/index`
      endpoint for Slack connectors, ensuring the `force_full_reindex`
      flag is handled.

Frontend Tests (`surfsense_web`):
- `components/editConnector/EditSlackConnectorConfigForm.test.tsx`:
    - Tests rendering of all Slack configuration fields.
    - Verifies `onConfigChange` callback functionality.
    - Tests conditional rendering of periodic indexing settings.
    - Checks disabled state of the form.
- `app/dashboard/[search_space_id]/connectors/[connector_id]/edit/page.test.tsx`:
    - Tests for the "Channel Management" tab specific to Slack connectors.
    - Verifies UI for discovering channels (mocking API calls).
    - Tests selection of channels and updating the connector configuration.
    - Tests UI for triggering on-demand re-indexing with various options.
- `hooks/useSearchSourceConnectors.test.ts`:
    - Unit tests for the `discoverSlackChannels` function, mocking `fetch`.
    - Unit tests for the `reindexSlackChannels` function, mocking `fetch`
      and verifying correct request body construction.
    - Includes testing of the `fetchWithAuth` helper function.
2025-05-28 10:48:28 +00:00
..
chat feat: Introduce the RAPTOR Search. 2025-05-11 23:05:56 -07:00
editConnector I've added comprehensive unit and integration tests for the recently implemented Slack connector features. This includes tests for backend logic (SlackHistory, indexing tasks, API routes) and frontend components and hooks. 2025-05-28 10:48:28 +00:00
sidebar feat: Added Podcast Feature and its actually fast. 2025-05-05 23:18:12 -07:00
theme fix(ui): apply pointer cursor to theme toggle and Google sign-up buttons 2025-04-11 05:13:46 +00:00
ui feat: Added Podcast Feature and its actually fast. 2025-05-05 23:18:12 -07:00
document-viewer.tsx feat: monorepo 2025-04-07 23:47:06 -07:00
Footer.tsx web: Added privacy and terms pages. 2025-04-09 19:10:00 -07:00
json-metadata-viewer.tsx feat: monorepo 2025-04-07 23:47:06 -07:00
Logo.tsx feat: monorepo 2025-04-07 23:47:06 -07:00
markdown-viewer.tsx feat: Code Block Syntax Highlighting & Copy Func 2025-05-19 23:19:20 -07:00
ModernHeroWithGradients.tsx chore: qol patches 2025-05-03 01:08:19 -07:00
Navbar.tsx feat: Removed Hard Dependecy on Google Auth 2025-05-21 20:56:23 -07:00
search-space-form.tsx feat: monorepo 2025-04-07 23:47:06 -07:00
TokenHandler.tsx feat: monorepo 2025-04-07 23:47:06 -07:00