From cb477ef88ecfbca600a0cee5162623f1dc667d32 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 29 Nov 2026 13:25:50 +0100 Subject: [PATCH] New Document test: unfold Advanced Options past the double-click time, with the header found again Co-Authored-By: Claude Opus 5.5 --- crates/ui-patterns/tests/it/form_dialogs/new_document.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/ui-patterns/tests/it/form_dialogs/new_document.rs b/crates/ui-patterns/tests/it/form_dialogs/new_document.rs index ad2ca7d835..110adea98c 100644 --- a/crates/ui-patterns/tests/it/form_dialogs/new_document.rs +++ b/crates/ui-patterns/tests/it/form_dialogs/new_document.rs @@ -765,7 +765,14 @@ fn advanced_options_folds_color_profile_and_pixel_aspect_and_keeps_the_profile() assert!(fixture.by_label("Color Profile").is_none() && fixture.by_label("Pixel Aspect Ratio").is_none(), "folded, its fields are hidden"); assert_eq!(held.borrow().profile.as_deref(), Some("display-p3"), "folding keeps the profile"); + // Past the double-click time, so the second click is a click of its own; the header is found again in case the fold + // moved it. + fixture.advance(1.0).frame(Vec::new()); + let tree = fixture.tree(); + let advanced = + fixture.by_role(Role::BUTTON).into_iter().find(|button| tree.name_of(button.node) == Some("Advanced Options")).expect("the disclosure"); fixture.click(&advanced).settle(); + assert_eq!(fixture.tree().expanded_of(advanced.node), Some(true), "a second click unfolds it"); assert!(fixture.by_label("Color Profile").is_some(), "unfolded, Color Profile shows again"); assert!(shows(&fixture, "display-p3"), "with the profile still picked"); }