Skip to content

refactor: improve test coverage and support both X11 and Wayland plat…#16

Merged
bigr merged 1 commit intomainfrom
klinger-bug-fixes3
Oct 26, 2025
Merged

refactor: improve test coverage and support both X11 and Wayland plat…#16
bigr merged 1 commit intomainfrom
klinger-bug-fixes3

Conversation

@bigr
Copy link
Owner

@bigr bigr commented Oct 26, 2025

…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:

# 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"

…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"
@bigr bigr merged commit 9100a27 into main Oct 26, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant