feat: Enable all Playwright tests and improve error handling - Phase 3#67
Merged
Conversation
- Remove all CI skip conditions from Playwright tests: - TestBrowserPool_RenderPage - TestJSClient_RenderPage - TestJSClient_Get - TestNewUnifiedClient_JSEnabled - Implement enhanced error handling with debug logging: - Add test_helpers.go with debug capture utilities - Capture console logs and network activity during tests - Log detailed error context when tests fail - Add screenshot capture capability on test failure - Add retry logic helper for potentially flaky tests - Integrate debug handlers into browser pool for automatic logging when running in test mode This completes Phase 3 of the Playwright CI integration, enabling all tests to run in CI with comprehensive debugging capabilities. Fixes #64 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unused init function from test_helpers.go - Fix file formatting to pass gofmt -s check
…pendencies The CI environment is missing critical system dependencies for Playwright: - GTK4 libraries - GStreamer libraries - Various multimedia codecs - And many more These dependencies should be addressed in Phase 2 (issue #63) before enabling Playwright tests in CI. For now, we're keeping the enhanced error handling but skipping tests in CI. The tests still run locally where dependencies are available.
4 tasks
Owner
Author
現在の状況このPRは当初の目的(Phase 3: すべてのPlaywrightテストをCI環境で有効化)を完全には達成できませんでした。 実装できたこと ✅
実装できなかったこと ❌
次のステップ
現時点では、このPRはマージせずに保留とし、#68の解決後に再度作業を進めます。 |
Now that Phase 2 (#68) has been completed with Docker-based CI setup, we can enable all Playwright tests to run in the CI environment. - Remove CI skip conditions from all Playwright tests - Tests now run in Docker container with all dependencies pre-installed - Enhanced error handling and debugging capabilities remain in place Completes Phase 3 (#64)
Fix go vet error by removing unused os package imports
Match Docker image version with project's Playwright version to resolve compatibility issues
The CI Docker environment may have slower network access, causing timeouts when navigating to external URLs
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
Enable all Playwright tests in CI environment(Reverted due to missing system dependencies)Background
This PR was intended to complete Phase 3 of the Playwright CI integration (#64), following Phase 1 (#62) which validated basic functionality and Phase 2 (#63) which was supposed to optimize performance with caching.
However, we discovered that the CI environment is missing critical system dependencies for Playwright to run properly. This should have been addressed in Phase 2.
Current Status
Due to missing system dependencies in CI (GTK4, GStreamer, multimedia codecs, etc.), we've had to revert the CI enablement while keeping the enhanced error handling features.
Missing Dependencies in CI:
Changes Made
1.
Removed CI Skip Conditions(Reverted)2. Enhanced Error Handling ✅
test_helpers.gowith debug capture utilities:SetupPageDebugHandlers()- Captures console logs and network activityCaptureScreenshotOnFailure()- Takes screenshots when tests failLogTestDebugInfo()- Logs comprehensive debug informationRetryTest()- Provides retry logic for potentially flaky tests3. Browser Pool Integration ✅
browser_pool.goto automatically capture debug logs when running in test modeTest Results
All Playwright tests pass locally where dependencies are available:
Next Steps
Success Criteria (Partially Met)
Related Issues
Test Plan
go test ./...✅Verify Playwright tests run without CI skip conditions(blocked)Confirm CI pipeline remains stable(tests skip in CI)🤖 Generated with Claude Code