mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 16:59:43 +01:00
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:
3 files changed
+3
-1
No files matched your search
Generated
+1
@@ -8930,6 +8930,7 @@ dependencies = [
|
||||
"vectorcraft-geom 0.24.1",
|
||||
"vectorcraft-pathops 0.24.1",
|
||||
"vectorcraft-text",
|
||||
"vectorcraft-tools",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -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"] }
|
||||
|
||||
@@ -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}]));
|
||||
|
||||
Reference in new issue
Block a user