-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Summary
Add end-to-end tests that exercise the full surf CLI against a real Chrome browser instance.
Background
PR #2 added the testing infrastructure with vitest. The test/e2e/ directory exists but is empty.
Scope
E2E tests should cover real browser automation scenarios:
Navigation & Reading
surf go→ navigate to URL, verify page loadedsurf read→ verify accessibility tree extractionsurf page.text→ verify text content extractionsurf back/surf forward→ history navigation
Interaction
surf click→ click elements by ref, selector, coordinatessurf type→ text input with/without submitsurf scroll.*→ scroll operationssurf key→ keyboard input
Screenshots
surf screenshot→ verify image outputsurf screenshot --annotate→ verify element labelssurf screenshot --fullpage→ full page capture
Tabs
surf tab.new/surf tab.close/surf tab.switchsurf tab.name/surf tab.switch <name>
Network Capture
- Verify requests are captured during navigation
surf networkfiltering optionssurf network.get/surf network.body/surf network.curl
AI Queries (optional/manual)
surf chatgpt,surf gemini,surf perplexity- These require logged-in sessions, may need to be manual or skipped in CI
Technical Considerations
- Need a strategy for launching/managing Chrome instances
- Consider using a local test server for predictable test pages
- May need longer timeouts for browser operations
- Some tests may be flaky due to timing—add retries where appropriate
Related
- Add quality and security checks to CI pipeline #4 (CI pipeline)
- Add integration tests #6 (Integration tests)
- PR Add testing infrastructure #2 (test infrastructure)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels