Test/browser details unit tests 34 #41
Closed
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.
🧪 Unit Tests: Browser Details Module
Fixes #34
Summary
Adds comprehensive unit test suite for
browser_details.rsmodule coveringparse_browser_kindnormalization logic and Chrome/Firefox profile fallbacks with temporary directories.✅ Acceptance Criteria Met
1. ✅ cargo test passes on Windows and Linux
tempfilefor cross-platform temporary directories#[cfg(target_os = "windows")]2. ✅ All supported aliases resolve to correct enum
Chrome aliases tested:
"Google Chrome"→BrowserKind::Chrome✅"google-chrome"→BrowserKind::Chrome✅"chrome"→BrowserKind::Chrome✅"Chrome"→BrowserKind::Chrome✅"GOOGLE CHROME"→BrowserKind::Chrome✅Firefox, Edge, Brave, Opera, Vivaldi aliases also tested
3. ✅ Chrome profile tests cover required cases
test_chrome_profiles_with_gaia_name()- verifies gaia_name is preferredtest_chrome_profiles_with_name_fallback()- verifies name fallbacktest_chrome_profiles_missing_profile_directory()- returns empty vecWhat's Added
Test Coverage (17 tests):