test(gui): the assistant pictures are two: with the dock, and without it

The Assistant dock along the window's bottom is drawn only where one is
offered (dock::offered, unix; INVARIANT 7), and without it the page is
taller, so Windows draws a different, correct picture. The Windows run's
hash for assist_working_light, 3986efecb6f10268, is exactly the hash of
that window drawn with the dock held back, so the dock is the whole
difference there. assist_* are the pictures with the dock (unix), the new
assist_nodock_* are without it (Windows); every unix run checks both, the
second through dock::pretend_not_offered, a per-thread seam, so the Windows
baseline cannot go stale. The assist_* hashes are unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-21 22:12:43 -07:00
1 parent 7ad75d4299
commit 2753d50704
22 files changed
+2719 -53

No files matched your search

+21 -1
View File
@@ -69,9 +69,29 @@ use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::mpsc::{Receiver, channel};
use std::sync::{Arc, Mutex};
thread_local! {
/// Set by a test, for its own thread only (each test runs on one).
static HIDDEN: std::cell::Cell<bool> = const { std::cell::Cell::new(false) };
}
/// Whether the dock is offered on this system (INVARIANT 7).
pub fn offered() -> bool {
cfg!(unix)
cfg!(unix) && !HIDDEN.get()
}
/// A test seam: while the returned guard lives, this thread's windows draw
/// as they do on a system that offers no dock (Windows), whatever system
/// this is, so that a picture of that window can be blessed anywhere. It
/// touches no other thread, so tests running side by side do not see it.
pub fn pretend_not_offered() -> impl Drop {
struct Hidden;
impl Drop for Hidden {
fn drop(&mut self) {
HIDDEN.set(false);
}
}
HIDDEN.set(true);
Hidden
}
/// A size in character cells.