Tests: two canvas tests render on their own thread

A document's first frame goes to the render worker, and these read the
texture right after it, so under load it had not landed yet.
This commit is contained in:
bflatastic
2026-11-06 08:10:45 +07:00
parent f3a8815e9a
commit cc0575f15d
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -2879,6 +2879,7 @@ fn pixel_grid_shows_in_pixel_preview_from_600_percent() {
#[test]
fn grid_and_guides_take_their_preferences() {
let mut app = VectorcraftApp::new(Session::new(), Default::default());
app.canvas.worker_started = true; // render on this thread
app.session.execute("file.new", &json!({"width": 400, "height": 300})).unwrap();
app.session.execute("guide.add", &json!({"vertical": true, "pos": 100})).unwrap();
app.ui.view.grid = true;
+1
View File
@@ -195,6 +195,7 @@ mod tests {
#[test]
fn the_app_uploads_everything_again_in_a_new_context() {
let mut app = app();
app.canvas.worker_started = true; // render on this thread
let old = egui::Context::default();
// Fonts, then the canvas.
for _ in 0..3 {