SurfSense/surfsense_web/app
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
..
api/search feat: Added FumaDocs 2025-04-22 02:24:13 -07:00
auth/callback feat: monorepo 2025-04-07 23:47:06 -07:00
dashboard 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
docs feat: Added FumaDocs 2025-04-22 02:24:13 -07:00
login fix: Added Suspense boundary in Login Page 2025-05-21 21:13:56 -07:00
privacy web: Added privacy and terms pages. 2025-04-09 19:10:00 -07:00
register feat: Removed Hard Dependecy on Google Auth 2025-05-21 20:56:23 -07:00
terms web: Added privacy and terms pages. 2025-04-09 19:10:00 -07:00
favicon.ico feat: monorepo 2025-04-07 23:47:06 -07:00
globals.css feat: Code Block Syntax Highlighting & Copy Func 2025-05-19 23:19:20 -07:00
layout.config.tsx feat: Added FumaDocs 2025-04-22 02:24:13 -07:00
layout.tsx updated seo 2025-05-14 01:22:25 +05:30
page.tsx feat: monorepo 2025-04-07 23:47:06 -07:00
sitemap.ts Fix #66: Created sitemap 2025-05-07 16:19:04 +05:30