mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 10:08:00 -06:00
Tests: pin the session clock in the bookmark-search test, whose two full saves differed when a second ticked between them
save_full_bytes stamps /ModDate from the session clock, so the 'search doesn't edit the PDF' comparison failed whenever the two saves straddled a second boundary (seen under a loaded full workspace run). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3af93c7585
commit
f3c9fb3c3c
@@ -145,6 +145,9 @@ fn search_finds_collapsed_bookmarks_and_keeps_original_paths() {
|
||||
h.run_steps(3);
|
||||
assert!(h.query_by_label("Résumé results").is_none());
|
||||
let id = h.state().views[0].id;
|
||||
// A full save stamps /ModDate from the clock: pin it, or two saves a second apart differ.
|
||||
let session = std::mem::take(&mut h.state_mut().session);
|
||||
h.state_mut().session = session.with_clock(|| 1_700_000_000);
|
||||
let before = h.state().session.save_full_bytes(id).unwrap();
|
||||
h.get_by_label("Search").click();
|
||||
h.run_steps(1);
|
||||
|
||||
Reference in New Issue
Block a user