feat: add E2E test suite#1353
Merged
Merged
Conversation
…LM/embedding fakes)
…nnector PDF canaries
…for Composio and native connectors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
masking-guardunit tests for composio connectors.Motivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR introduces a comprehensive end-to-end testing suite using Playwright for the SurfSense application. The implementation includes a sophisticated test harness that intercepts external API calls at the system level through strict fakes and deterministic mocks, covering multiple integrations (Composio Drive/Gmail/Calendar, native Google connectors, Notion, Linear, Jira) while ensuring production code remains untouched. The architecture uses
sys.moduleshijacking before production imports to replace third-party SDKs with strict fakes that raiseNotImplementedErroron unknown surface areas, combined with CI network deny-listing (HTTPS_PROXY=http://127.0.0.1:1) to prevent any real external calls. The suite includes journey tests for OAuth flows, indexing pipelines, chat interactions with canary tokens for verification, plus supporting integration and unit tests for the fake implementations. Test infrastructure is fully isolated from production builds through.dockerignoreexclusions and separate entrypoints (run_backend.py,run_celery.py).⏱️ Estimated Review Time: 3+ hours
💡 Review Order Suggestion
surfsense_web/tests/README.mdsurfsense_backend/tests/e2e/README.mdsurfsense_web/playwright.config.ts.github/workflows/e2e-tests.ymlsurfsense_backend/tests/e2e/run_backend.pysurfsense_backend/tests/e2e/run_celery.pysurfsense_backend/tests/e2e/middleware/scenario.pysurfsense_backend/tests/e2e/fakes/composio_module.pysurfsense_backend/tests/e2e/fakes/fixtures/drive_files.jsonsurfsense_backend/tests/e2e/fakes/fixtures/gmail_messages.jsonsurfsense_backend/tests/e2e/fakes/fixtures/calendar_events.jsonsurfsense_backend/tests/e2e/fakes/fixtures/notion_pages.jsonsurfsense_backend/tests/e2e/fakes/fixtures/linear_issues.jsonsurfsense_backend/tests/e2e/fakes/fixtures/jira_issues.jsonsurfsense_backend/tests/e2e/fakes/native_google.pysurfsense_backend/tests/e2e/fakes/notion_module.pysurfsense_backend/tests/e2e/fakes/linear_module.pysurfsense_backend/tests/e2e/fakes/jira_module.pysurfsense_backend/tests/e2e/fakes/mcp_oauth_runtime.pysurfsense_backend/tests/e2e/fakes/mcp_runtime.pysurfsense_backend/tests/e2e/fakes/llm.pysurfsense_backend/tests/e2e/fakes/chat_llm.pysurfsense_backend/tests/e2e/fakes/embeddings.pysurfsense_web/tests/auth.setup.tssurfsense_web/tests/fixtures/search-space.fixture.tssurfsense_web/tests/fixtures/chat-thread.fixture.tssurfsense_web/tests/fixtures/connectors/composio-drive.fixture.tssurfsense_web/tests/fixtures/connectors/composio-gmail.fixture.tssurfsense_web/tests/fixtures/connectors/composio-calendar.fixture.tssurfsense_web/tests/fixtures/connectors/native-drive.fixture.tssurfsense_web/tests/fixtures/connectors/native-gmail.fixture.tssurfsense_web/tests/fixtures/connectors/native-calendar.fixture.tssurfsense_web/tests/fixtures/connectors/notion.fixture.tssurfsense_web/tests/fixtures/connectors/linear.fixture.tssurfsense_web/tests/fixtures/connectors/jira.fixture.tssurfsense_web/tests/fixtures/index.tssurfsense_web/tests/helpers/canary.tssurfsense_web/tests/helpers/api/auth.tssurfsense_web/tests/helpers/api/search-spaces.tssurfsense_web/tests/helpers/api/connectors.tssurfsense_web/tests/helpers/api/documents.tssurfsense_web/tests/helpers/api/chat.tssurfsense_web/tests/helpers/waits/indexing.tssurfsense_web/tests/helpers/ui/connector-popup.tssurfsense_web/tests/helpers/ui/dashboard.tssurfsense_web/tests/smoke/dashboard.spec.tssurfsense_web/tests/smoke/chat-stream.spec.tssurfsense_web/tests/connectors/composio/drive/README.mdsurfsense_web/tests/connectors/composio/drive/journey.spec.tssurfsense_web/tests/connectors/composio/gmail/journey.spec.tssurfsense_web/tests/connectors/composio/calendar/journey.spec.tssurfsense_web/tests/connectors/google/drive/journey.spec.tssurfsense_web/tests/connectors/google/gmail/journey.spec.tssurfsense_web/tests/connectors/google/calendar/journey.spec.tssurfsense_web/tests/connectors/notion/journey.spec.tssurfsense_web/tests/connectors/linear/journey.spec.tssurfsense_web/tests/connectors/jira/journey.spec.tssurfsense_backend/tests/integration/composio/conftest.pysurfsense_backend/tests/integration/composio/test_oauth_callback.pysurfsense_backend/tests/integration/composio/test_drive_folders_route.pysurfsense_backend/tests/unit/e2e_fakes/test_drive_list_files.pysurfsense_backend/tests/unit/utils/test_oauth_security.pysurfsense_web/package.jsonsurfsense_web/pnpm-lock.yaml.gitignoresurfsense_backend/.dockerignoresurfsense_web/.dockerignore