[DRAFT] Replace Playwright with Lightpanda for browser tests#2606
Closed
mroderick wants to merge 3 commits intocodebar:masterfrom
Closed
[DRAFT] Replace Playwright with Lightpanda for browser tests#2606mroderick wants to merge 3 commits intocodebar:masterfrom
mroderick wants to merge 3 commits intocodebar:masterfrom
Conversation
This commit adds support for using the Lightpanda headless browser instead of Playwright for browser-dependent tests. Changes: - Add capybara-lightpanda gem to the test group - Configure CI workflow to download and cache Lightpanda binary - Add spec/support/lightpanda.rb for Capybara driver configuration - Remove experimental gems (cuprite, selenium-webdriver, lightpanda-ruby) Usage: LIGHTPANDA=true bundle exec rspec spec/features/ The LIGHTPANDA_PATH environment variable can be used to specify the path to the lightpanda binary (defaults to auto-download). Benefits: - Lighter weight (~65MB binary vs ~150MB+ Chromium) - No complex browser installation in CI - Self-contained CDP client - Comparable test performance to Playwright
- Use the 'from' parameter as element ID instead of hardcoded value - Add longer wait times when LIGHTPANDA=true for JavaScript execution - Fixes test failures in managing_meeting_invitations_spec
Collaborator
Author
|
This was a fun experiment, good learnings. One day Lightpanda will be good enough to run our tests |
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
This PR tests replacing Playwright with Lightpanda for browser-dependent tests in CI.
Changes
capybara-lightpandagem for Capybara integrationUsage
Benefits
Limitations Found⚠️
TomSelect/JavaScript Compatibility: Lightpanda's JavaScript engine doesn't fully support complex DOM manipulation libraries like TomSelect. Tests using TomSelect dropdowns fail because the library doesn't initialize properly.
Root Cause:
tsWrapperClass="ts-wrapper tom-select single..."✅tsWrapperClass="N/A"❌This is a fundamental limitation of Lightpanda's JavaScript engine (QuickJS) compared to full Chrome V8.
Local Testing Results
Based on 6 runs of 12 browser-dependent tests:
CI Results
Conclusion
Not ready for production - Lightpanda shows promise with ~20% faster execution on compatible tests, but the JavaScript compatibility issues prevent full test suite passage.
Recommendation:
Status: DRAFT - Experimental, do not merge