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
@@ -32,6 +32,12 @@ fn fake_face_tool(dir : String) -> String {
|
||||
#| drop) kept=$((kept-1)); pic ;;
|
||||
#| apply)
|
||||
#| echo "info Waiting for the password…"
|
||||
#| # With "$S/wait": hold on until the test's password dialog has been answered.
|
||||
#| if [ -e "$S/wait" ]; then t=0; while [ ! -e "$S/go" ] && [ $t -lt 200 ]; do sleep 0.05; t=$((t+1)); done; fi
|
||||
#| # With "$S/refuse": the password was not given; the camera goes on.
|
||||
#| if [ -e "$S/refuse" ]; then
|
||||
#| echo "error Nothing changed: the administrator password wasn't given"; echo "applied 1"; pic; continue
|
||||
#| fi
|
||||
#| for id in $(echo "$arg" | tr ',' ' '); do
|
||||
#| grep -v "^face $id " "$S/faces" > "$S/faces.new"; mv "$S/faces.new" "$S/faces"
|
||||
#| done
|
||||
@@ -146,6 +152,13 @@ test "the Face unlock window: live picture, snaps, a face marked for removal, on
|
||||
ignore(@sys.write_file_bytes(shots + "/17-face-window.png", @renderer.encode_png_compressed(comp.compose_frame())))
|
||||
}
|
||||
assert_eq(comp.shell.face.faces.length(), 1)
|
||||
// A refused password keeps the window, the snap and the mark, and says why.
|
||||
ignore(@sys.write_file_bytes(dir + "/refuse", b""))
|
||||
face_key(comp, 28U, 35U)
|
||||
assert_true(face_settle(comp, fn() { !w.applying && w.error }))
|
||||
assert_eq(w.message, "Nothing changed: the administrator password wasn't given")
|
||||
assert_eq((w.snaps.length(), w.remove), (1, ["1"]))
|
||||
@sys.unlink(dir + "/refuse")
|
||||
// Enter applies: one run for the snap and the removal; the window closes, Settings shows it.
|
||||
face_key(comp, 28U, 40U)
|
||||
assert_true(face_settle(comp, fn() { comp.shell.face.window is None }))
|
||||
|
||||
Reference in new issue
Block a user