feat:Added intermediate structure for UTs, ITs and e2e#110
Open
Gyan172004 wants to merge 5 commits intorootCircle:devfrom
Open
feat:Added intermediate structure for UTs, ITs and e2e#110Gyan172004 wants to merge 5 commits intorootCircle:devfrom
Gyan172004 wants to merge 5 commits intorootCircle:devfrom
Conversation
- Implemented Playwright-based e2e tests for Chromium - Auto-detects extension ID and caches for faster runs - API keys from environment variables (secure) - Tests verify full form-filling workflow - 2 passing e2e tests: text field & email field auto-fill - All 414 unit tests passing - Firefox support pending (Chromium only for now) Test infrastructure: - Extension loads automatically with mock API key - Detects extension from service workers - Tests enable extension before navigating to forms - Verifies real AI-generated form content Files Added: - tests/e2e/**/*.spec.ts - E2E test files - tests/e2e/fixtures/extension-fixture.ts - Core test setup - tests/e2e/README.md - Setup documentation Files Modified: - src/background/index.ts - Store extension ID for testing - tests/mocks/browser.mock.ts - Added onStartup mock - tests/unit/background/index.test.ts - Updated for new listener - vitest.config.ts - Exclude e2e tests, restored config - .gitignore - Ignore test artifacts
- Implement dependency injection in LLMEngine for testability - Convert all integration tests to use real Gemini API calls - Add table-driven test approach for better maintainability - Tests run sequentially with natural pipeline delays - No mocking of LLM responses - full end-to-end testing
added 3 commits
November 16, 2025 10:27
- Use bracket notation for process.env access - Add type guards (if (!response) return;) after response checks - Fix null safety for response properties - Remove async from beforeEach (no await needed) - Replace any types with LLMResponse | null - Remove console.warn statements - Fix unused parameter in validate callback
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.
Summary
#68
This pull request adds a complete testing setup for the docFiller extension. It introduces a full end-to-end (E2E) testing system using Playwright and also fixes the existing unit and integration test setup to make everything run smoothly.
What Was Done
E2E Test Infrastructure (Playwright)
GEMINI_API_KEY).Unit & Integration Test Fixes (Vitest)
vitest.config.tsfile was empty; it’s now restored and properly set up.onStartupevent, which fixed the failing background script tests.jsdomdependency needed by the test environment.Documentation & Code Quality
tests/e2e/README.mdwith clear steps on how to set up and run the E2E tests.