Conversation
657a3b2 to
29a4903
Compare
- Add 'browser' and 'icon' fields to add_app return dictionary for better API completeness - Improve _parse_chrome_flags to properly parse semicolon-separated feature flags instead of storing as raw additional flags - Enable proper enable-features and disable-features parsing with comma-separated values
Added end-to-end tests in tests/e2e/ directory covering: - Browser detection with real and missing executables - XDG desktop database and MIME handler integration - Audit command detecting file issues (missing/non-executable files) - Audit --fix repairs missing artifacts - Sync command regenerates wrapper and desktop files - Edit command with temporary EDITOR and validation - Complete PWA workflow (add -> list -> audit -> sync -> remove) All tests mock XDG utilities (update-desktop-database, xdg-mime) while using real file operations in temporary directories. Tests verify proper error handling, file operations, and integration between commands. Tests: 15 new E2E tests, all passing (251 total tests) Updated pre-commit config to exclude e2e tests from mypy strict checks
Created detailed user-facing documentation: USAGE.md: - Complete command reference with all options - Quick start guide - Core commands (add, list, remove, audit, sync, edit) - URL handler system setup guide - Configuration management - Advanced usage patterns - Real-world examples for common scenarios TROUBLESHOOTING.md: - Installation issues and solutions - PWA creation and launch problems - External link handling debugging - Desktop integration fixes - Browser compatibility issues - Profile and data management - Permission problems - Diagnostic commands and tools - Common error messages with solutions Both documents include practical examples, copy-paste commands, and cross-references to other documentation.
Added comprehensive integration tests to reach 65% coverage: Handler Workflow Tests (handler.py: 67% → 87%): - Error handling for invalid schemes and missing browsers - Auto-detection of handler scripts - Subprocess failure handling and registry update failures - Dry-run functionality for generation and installation - Complex scenarios with multiple schemes and browsers - Userscript generation with complex patterns and host lists - Duplicate scheme handling and registry conflicts PWA Lifecycle Tests (add.py: 81% → 95%): - Icon file copying operations - Custom browser executable integration - Profile directory creation and management - WM class generation from app names - Chrome flags integration into wrappers - Out-of-scope behavior configuration - Userscript injection setup - Registry entry creation validation - Desktop file content verification - Error handling for invalid URLs and duplicate IDs Audit/Sync/Edit Workflow Tests (edit.py: 55% → 85%): - Edit with auto-sync functionality - Validation failure rollback mechanism - Edit without auto-sync (artifacts unchanged) - Error handling for non-existent apps - Missing EDITOR environment variable handling Integration test coverage improved from 56% to 65%, exceeding the 60% target.
Added comprehensive tests to reach high coverage across utility modules: Config Module (100% coverage): - Added tests for all property getters (desktop_dir, icons_dir, wrappers_dir, apps_dir, userscripts_dir, registry_file) - Added test for general exception handling in load_config (lines 176-178) Logger Module (100% coverage): - Added test for console-only logging setup - Added test for get_logger namespace prefixing (line 67) Templates Module (100% coverage): - Added test for module-level render_template function (lines 142-143) Utils Modules Summary: - logger.py: 100% (28/28 statements) - paths.py: 100% (29/29 statements) - config.py: 100% (87/87 statements) - templates.py: 100% (39/39 statements) - validation.py: 100% (88/88 statements) Unit test coverage now exceeds 90% target for individual modules.
Added automated coverage checks to prevent coverage regression: Pre-commit Coverage Hooks: - pytest-unit-coverage: Enforces 85% minimum unit test coverage - pytest-integration-coverage: Enforces 60% minimum integration test coverage Coverage Requirements: - Unit tests: Must maintain ≥85% coverage (currently 90%+) - Integration tests: Must maintain ≥60% coverage (currently 65%+) Hook Implementation: - Uses pytest --cov-fail-under to enforce minimum thresholds - Sets proper PYTHONPATH for module discovery - Fails pre-commit if coverage drops below required levels - Provides detailed coverage reports on failure This ensures that future code changes cannot reduce test coverage, maintaining the high quality standards achieved in Phase 6.
Removed redundant sections and streamlined content: Removed Redundancy: - Eliminated duplicate 'External Link Handling' section - Removed redundant 'Quick Start' section (covered in Usage) - Consolidated similar content to avoid repetition Streamlined Sections: - Shortened Development section to essential commands - Kept Configuration & Maintenance section complete - Maintained all essential information while reducing length Result: Brief, comprehensive README with no duplication, covering all frequently needed information concisely.
Updated Implementation-specification.md: - Marked Phase 6 (Testing & Polish) as ✅ COMPLETED - All E2E system tests implemented (15 new tests) - Documentation complete (USAGE.md, TROUBLESHOOTING.md) - Test coverage verified at 74% (exceeds 70% requirement) - Updated status summary with 251 total tests - Revised completion estimates for remaining Phase 7 work Phase 6 deliverables: ✅ E2E system tests for browser detection, XDG integration, file ops ✅ Comprehensive USAGE.md with command reference and examples ✅ TROUBLESHOOTING.md with solutions to common issues ✅ Test coverage 74% (236 unit + 15 E2E tests)
29a4903 to
4df1dde
Compare
bigr
added a commit
that referenced
this pull request
Oct 23, 2025
- Add ValidationStatus class with OK/WARNING/ERROR constants
- Change validate_url() to return 3-tuple (is_valid, status, message)
- Replace fragile string matching ('Warning' in message) with status checks
- Update all callers to use explicit status comparison
- Update all tests for new validation signature
- Resolves user testing issue #9 (fragile validation detection)
bigr
added a commit
that referenced
this pull request
Oct 24, 2025
- Refactor _find_browser_executable() in handler.py to use same robust strategy as add.py - Add platform-specific path checking and shutil.which() fallback - Support Snap, Flatpak, and custom browser installations - Add comprehensive offline installation instructions across all docs - Update README.md, USAGE.md, TROUBLESHOOTING.md with PYTHONPATH method - Fix test expectations to match new error messages - Add test for browser detection via PATH fallback - Resolves second-round testing issue #9 (handler generation failures) - Resolves second-round testing issue #6 (offline installation unclear)
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.
No description provided.