Face unlock window steps aside while Apply asks for the password
CI / test (push) Canceled after 3m23s
CI / test (push) Canceled after 3m23s
After Apply the window kept the keyboard and the pointer and its dimmed card covered the screen, so a password dialog that isn't Chandra's own (another polkit agent's window) couldn't be reached. While Apply waits, the window now shows only a note at the top and takes no input. A refused or cancelled password brings it back with the snaps and marks kept (chandra-face camera restarts the camera instead of exiting) and says so. Test: snaps, Enter, the password dialog gets typing (Space no longer snaps underneath) and the Authenticate click, then the root step finishes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf
This commit is contained in:
8 files changed
+150
-8
No files matched your search
@@ -337,6 +337,23 @@ class CameraWindowTests(unittest.TestCase):
|
||||
s.finish()
|
||||
self.assertEqual([f["label"] for f in self.vectors()], ["Face 2"])
|
||||
|
||||
def test_a_failed_apply_keeps_the_snaps(self):
|
||||
self.env.camera(["alice"], frame_delay="0.01")
|
||||
s = Session(self.env)
|
||||
s.send("snap")
|
||||
s.next("snap")
|
||||
s.send("apply 99")
|
||||
words, _ = s.next("error")
|
||||
self.assertEqual(" ".join(words[1:]), "no face 99 for %s" % ME)
|
||||
self.assertEqual(s.next("applied")[0][1], "1")
|
||||
s.next("frame") # the camera goes on
|
||||
s.send("snap")
|
||||
s.next("snap")
|
||||
s.send("apply ")
|
||||
self.assertEqual(s.next("applied")[0][1], "0")
|
||||
self.assertEqual(s.finish(), 0)
|
||||
self.assertEqual(len(self.vectors()[0]["vectors"]), 2)
|
||||
|
||||
def test_apply_refuses_bad_data(self):
|
||||
for bad in (b"[]", b"{\"add\": [{\"vectors\": [[1, 2]]}]}",
|
||||
b"{\"add\": [{\"vectors\": [[1e999, 0, 0, 0]]}]}", b"{\"remove\": [7]}", b"nonsense"):
|
||||
|
||||
Reference in new issue
Block a user