Repository navigation
Fix the low-battery flap tests for the four-argument shouldWarnLowBattery - #19689
Merged
Merged
Conversation
…tery #19293 added tests that still passed UPower's onBattery, which #11161 had already removed from shouldWarnLowBattery, so every argument landed one slot over and the AC-flap test failed. Plugging in and out now shows as the battery's own state, so the flap test alternates it between discharging and charging. The test still fails on the model from before #19293. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
[Low impact] The PR appears safe to merge; the corrected tests match the model and preserve the repeated-warning check. SummaryFixes the battery tests to match the four-argument
Reviews (1) · Last reviewed commit: "Fix the low-battery flap tests for the f..." · Reviewed by Greptile |
Collaborator
|
GPT-6 in Codex (effort not exposed to this session) checked the diff against |
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.
battery-test.shfails onquattro, so every PR's Tests check is red. #11161 removed UPower'sonBatteryfromshouldWarnLowBattery, which now reads the battery's own state, and #19293, merged after it, added tests that still passonBattery. Every argument lands one slot over, so "battery warns only once across AC flaps while low" counts no warnings.The model is right; only the tests change. Plugging in and out now shows as the battery's state, so the flap test alternates it between discharging and charging, and the other three new assertions drop the extra argument. The flap test still fails on the model from before #19293, so it keeps guarding that fix.
🤖 Generated with Claude Code