mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 22:27:08 +00:00
Command Palette: the grown-popup test puts the button just under the popup
The test placed the toolbar 2 points under the popup, but the button sits lower inside the toolbar, so one more row did not reach it. With the path.quickPenLength command, "pen tool" lists 11 results and "pen" grows the list by one row only, and the test failed. The test now moves the toolbar so the button's top is 2 points under the popup, and checks that the popup does not cover it before the query changes.
This commit is contained in:
@@ -5480,7 +5480,13 @@ mod tests {
|
||||
window.frame(vec![]);
|
||||
window.frame(vec![]);
|
||||
assert_eq!(window.highlighted(), "tool:pen");
|
||||
// The button goes 2 points below the popup, so one more row covers it.
|
||||
let (outlined, ..) = window.callout().expect("a callout below the popup");
|
||||
window.app.ui.custom_toolbars[0].pos[1] += small.bottom() + 2.0 - outlined.top();
|
||||
window.frame(vec![]);
|
||||
window.frame(vec![]);
|
||||
let (outlined, ..) = window.callout().expect("a callout below the popup");
|
||||
assert!(!window.popup().intersects(outlined), "{:?} {outlined:?}", window.popup());
|
||||
window.app.ui.palette_query = "pen".into();
|
||||
window.frame(vec![]);
|
||||
assert_eq!(window.highlighted(), "tool:pen");
|
||||
|
||||
Reference in New Issue
Block a user