fix(ui): pin session clock in prepare button-label test to prevent ModDate second-boundary flake

This commit is contained in:
jonathanwxh-cell committed 2026-10-19 12:54:45 +08:00
1 parent afde5298cb
commit ec34fc2c2d
2 files changed
+3

No files matched your search

+1
View File
@@ -1387,6 +1387,7 @@ fn dialogs(app: &mut PdfCraftApp, ctx: &egui::Context) {
app.props_draft = None;
app.view_draft = None;
app.bulk_field_props = None;
app.field_props = None;
} else {
app.dialog = Some(next);
}
+2
View File
@@ -254,6 +254,8 @@ fn options_tab_sets_the_check_box_style() {
fn button_label_is_editable_without_renaming_the_field() {
use pdfcraft_engine::{Edit, NewField};
let mut h = harness();
// Saves stamp /ModDate from the clock; pinned, two saves compare equal across a second.
h.state_mut().session = std::mem::take(&mut h.state_mut().session).with_clock(|| 1_700_000_000);
h.state_mut().apply_edit(Edit::AddField {
page: 0,
rect: [40.0, 300.0, 190.0, 330.0],