refactor: improve test coverage and support both X11 and Wayland plat…#16
Merged
refactor: improve test coverage and support both X11 and Wayland plat…#16
Conversation
…forms **Test Improvements:** - Add CLI tests for Firefox rejection with helpful error messages - Add CLI tests for invalid browser rejection - Add integration tests for ozone platform defaults - Add integration tests for custom ozone platform via chrome flags - Tests now catch platform compatibility issues early **Platform Support:** - Change default ozone platform from "auto" to "x11" for better compatibility - Add support for custom ozone platform via --chrome-flags "ozone-platform=wayland" - Update chrome flags parser to handle ozone-platform parameter - Now supports both X11 and Wayland with explicit configuration **Why Tests Didn't Catch This:** - Previous tests only checked template rendering, not default values - No integration tests for wrapper script content - No tests for chrome flags parsing - Platform-specific issues only manifest at runtime **New Tests:** - test_add_command_firefox_not_supported: Validates Firefox rejection - test_add_command_invalid_browser: Validates invalid browser rejection - test_add_uses_x11_ozone_platform_by_default: Validates X11 default - test_add_allows_custom_ozone_platform: Validates Wayland override **Usage:** ```bash # Default: X11 (works on most systems) pwa-forge add [https://example.com](https://example.com) # Wayland support pwa-forge add [https://example.com](https://example.com) --chrome-flags "ozone-platform=wayland"
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.
…forms
Test Improvements:
Platform Support:
Why Tests Didn't Catch This:
New Tests:
Usage: