mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-08 08:20:13 +00:00
Merge pull request #5862 from storytold/fix/canvas-tests-render-on-this-thread
Tests: two canvas tests render on their own thread
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user