-
-
Notifications
You must be signed in to change notification settings - Fork 9
test: add screenshots #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #86 +/- ##
==========================================
- Coverage 62.01% 56.50% -5.51%
==========================================
Files 4 4
Lines 337 361 +24
Branches 63 67 +4
==========================================
- Hits 209 204 -5
- Misses 92 123 +31
+ Partials 36 34 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
e10b0fe to
2e7f594
Compare
2e7f594 to
31f20b9
Compare
Significantly expanded unit tests in test_tray.cpp to cover menu callbacks, submenu structures, notifications, tooltips, context pointers, checkbox states, icon updates, and platform-specific icon caching. Improved test setup to ensure screenshot tooling and icon files are available, and refactored test logic for better coverage and maintainability.
2c64fbf to
4689406
Compare
Adds a step to enable all tray icons on Windows runners and increases the test timeout from 1 to 3 minutes. Also updates output redirection syntax for better compatibility.
4689406 to
e5daef0
Compare
Introduces the tray_show_menu function for all supported platforms, allowing the tray menu to be shown programmatically (primarily for testing). Updates unit tests to verify this functionality and adds a delay in screenshot capture to ensure UI elements are rendered before capture.
Introduces tray_get_hwnd() to retrieve the tray window handle on Windows. Updates unit tests to use this accessor for posting messages and synchronizing menu interactions. This improves test reliability and enables direct window manipulation in tests.
Improves code consistency by adjusting spacing in type casts, reordering standard includes, and updating comment formatting in unit tests. No functional changes were made.
Updated test_tray.cpp to simulate ESC key events for dismissing the tray menu on macOS using CoreGraphics. Also changed Windows-specific preprocessor checks to use TRAY_WINAPI macro for consistency.
d253984 to
25f3c47
Compare
Added a conditional to skip the TestTooltipUpdate test on macOS platforms where tooltips are not supported.
Updated the Windows CI workflow to enable all tray icons and disable Do Not Disturb mode before running tests. This ensures that notification and tray icon related tests run in a consistent environment.
Added a conditional to skip the TestCheckboxStates test on macOS using GTEST_SKIP, as checkboxes are not supported on this platform.
8cf1f0b to
6815ba5
Compare
Replaces the reg add command with Set-ItemProperty for disabling Do Not Disturb, adds setting the Profile to Unrestricted, and restarts notification services to ensure changes take effect.
6815ba5 to
4b989ab
Compare
|




Description
This PR adds screenshots to tests. The goal is to be able to easily review what the tray icon looks like in different states.
TODO:
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage