test(smoke): add AT-SPI and state-transition tests for power-status-color extension - #799
Conversation
…s-color extension
Adds behave coverage for the power-status-color@projectbluefin.io GNOME
Shell extension (projectbluefin/bluefin-bling):
- Extension presence/enablement and journal error/warning hygiene.
- Reaction to /run/reboot-required (yellow 'power-status-reboot' style
class), applied and cleared via the extension's real file monitor.
- Uptime-overdue alert ('power-status-overdue') precedence over the
reboot alert, exercised through the extension's own _checkStatus()
logic with only the uptime probe stubbed (30-day uptime cannot be
reproduced in CI).
- Lifecycle/teardown hygiene: style classes and the live stateObj are
gone after gnome-extensions disable.
Style-class assertions go through org.gnome.Shell.Eval since CSS style
classes on St actors are not exposed via AT-SPI.
Closes projectbluefin#794
Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
Stabilize installer unit tests when other tests leave a partial ssh_steps stub in sys.modules, while keeping production probe import explicit. Assisted-by: Claude Sonnet 5 via GitHub Copilot CLI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
hanthor
left a comment
There was a problem hiding this comment.
Superseded by #808, and currently unmergeable
mergeable_state: dirty. Confirmed with a local test merge onto main:
PR799 CONFLICT
#808 adds the same files under the same paths and closes the same issue (#794):
PR799: tests/smoke/features/power_status_color.feature
tests/smoke/features/steps/power_status_color_steps.py
tests/unit/test_power_status_color_steps.py
PR808: (all of the above, plus bluefin_new_extensions / copyous_stress / dakota_extensions)
#808 merges cleanly and passes the whole gate set locally (ruff clean, coverage snapshot fresh, 1645 unit tests). Notably, power_status_color_steps.py in #808 has zero printed-warning soft passes — it is the strongest of the new step modules there.
The conflict is from unrelated files
tests/installer/features/environment.py
tests/unit/test_installer_environment.py
These are a fix for #762, which main already resolved in 54a64e4 (raising=False plus a named regression test at test_installer_environment.py:141). Carrying it here is what makes the branch conflict.
The research in the description is good and worth preserving — the real UUID power-status-color@projectbluefin.io and the real style classes power-status-reboot / power-status-overdue rather than the issue's draft names. If #808's copy of the feature does not reflect that, say so there before it lands. Otherwise recommend closing this in favour of #808.
Generated by Claude Code
Summary
Closes #794.
Adds behave/AT-SPI coverage for the
power-status-color@projectbluefin.ioGNOME Shell extension (projectbluefin/bluefin-bling), which colors the Quick Settings power button based on staged bootc updates //run/reboot-requiredand on system uptime.Note on base branch: the issue asked to base this on a
v4branch, butv4does not exist inprojectbluefin/testsuite(checked via the GitHub API — onlymainand ~420 other feature/chore branches exist, andmainis the repo's default branch). This PR targetsmaininstead.Note on extension UUID/classes: the issue's draft Gherkin used
power-status-color@localand CSS classesbootc-reboot-required/bootc-uptime-overdue. I pulled the actualprojectbluefin/bluefin-blingsource (extensions/power-status-color/extension.js+stylesheet.css) and the real UUID ispower-status-color@projectbluefin.io, and the real style classes arepower-status-reboot(yellow) andpower-status-overdue(red). Tests use the real names so they'll actually match the shipped extension.New coverage (
tests/smoke/features/power_status_color.feature)ENABLED, nognome-shell/extension journal errors, no GJS/St warnings tagged for this extension./run/reboot-requiredon the host is observed by the extension's realGio.FileMonitor, applying/clearing thepower-status-rebootstyle class on the Quick Settings power button within 5s._checkUptimeOverdue()probe and drives its real_checkStatus()precedence logic (the reboot-flag path above is exercised with zero stubbing). Confirmspower-status-overduewins overpower-status-rebootwhen both conditions are true, matchingextension.js's documented precedence.gnome-extensions disable, all custom style classes are gone and the extension's livestateObjis released (evidence there's no dangling closure holding the file monitor/timer). Re-enables the extension afterward so later suite scenarios aren't affected.Style-class checks go through
org.gnome.Shell.Eval(existing pattern intests/shared/gnome_shell_steps.py) since CSS style classes onStactors aren't exposed via AT-SPI.Testing
ruff check tests/ --select E,F,W --ignore E501— cleanpython3 -m pytest tests/unit/ -q— 1546 passed (added 19 new unit tests for the pure helpers inpower_status_color_steps.py)PYTHONPATH=. python3 -m behave --dry-run --steps-catalog tests/smoke/features/— new steps resolve with no ambiguity/collisions vs. the pre-existing catalogpython3 scripts/update_coverage_snapshot.py— regenerateddocs/skills/test-authoring/suite-map/SKILL.mdto include the new suite files— hive: backend=copilot model=claude-sonnet-5
🐝 Hive Agent:
contributor| SHA:888e7173