test: check pending merge state before waiting for the worker

Enable the tools testing feature in its own test dependency so CI shards use the same features as the workspace.
This commit is contained in:
dotCooCoo committed 2026-11-26 09:12:36 -08:00
1 parent 44f6af4d95
commit dde0834cb3
3 files changed
+3 -1

No files matched your search

Generated
+1
View File
@@ -8930,6 +8930,7 @@ dependencies = [
"vectorcraft-geom 0.24.1",
"vectorcraft-pathops 0.24.1",
"vectorcraft-text",
"vectorcraft-tools",
]
[[package]]
+1
View File
@@ -24,6 +24,7 @@ serde = { workspace = true }
serde_json = { workspace = true }
[dev-dependencies]
vectorcraft-tools = { workspace = true, features = ["testing"] }
craft-image-codecs = { workspace = true }
# The tests lay type out in the bundled fonts (the workspace leaves turning them on to the engine).
vectorcraft-text = { workspace = true, features = ["test-fonts", "bundled-fonts"] }
+1 -1
View File
@@ -936,8 +936,8 @@ fn pointer_reply_waits_for_a_merge_on_another_thread() {
let revision = app.session.active().unwrap().revision;
let mut merge = vectorcraft_tools::builder::testing::pause_next_merge().unwrap();
let click = send(&mut app, json!([{"kind": "down", "x": 15, "y": 10}, {"kind": "up", "x": 15, "y": 10}]));
merge.wait_started().unwrap();
assert!(click.try_recv().is_err() && app.session.tool_editing(), "the click is not answered before the merge is applied");
merge.wait_started().unwrap();
// A hover sent meanwhile is answered at once; a click is made after the merge, and its
// reply waits until then.
let hover = send(&mut app, json!([{"kind": "move", "x": 35, "y": 10}]));