diff --git a/crates/engine/src/tests_pattern.rs b/crates/engine/src/tests_pattern.rs index 9aeff6c70..d19e2d8c2 100644 --- a/crates/engine/src/tests_pattern.rs +++ b/crates/engine/src/tests_pattern.rs @@ -115,8 +115,6 @@ fn edit_then_cancel_restores_definition() { fn edit_defaults_to_selected_objects_pattern() { let mut s = session(); make_dots(&mut s); - let bg = rect(&mut s, 0.0, 0.0, 400.0, 400.0); - s.execute("paint.setFill", &json!({"ids": [bg.0], "color": "#223344"})).unwrap(); let big = rect(&mut s, 100.0, 100.0, 100.0, 100.0); s.execute("paint.setFill", &json!({"ids": [big.0], "swatch": "Dots"})).unwrap(); sel(&mut s, &[big]); @@ -131,8 +129,6 @@ fn edit_defaults_to_selected_objects_pattern() { fn set_fill_with_pattern_swatch() { let mut s = session(); make_dots(&mut s); - let bg = rect(&mut s, 0.0, 0.0, 400.0, 400.0); - s.execute("paint.setFill", &json!({"ids": [bg.0], "color": "#223344"})).unwrap(); let big = rect(&mut s, 100.0, 100.0, 100.0, 100.0); s.execute("paint.setFill", &json!({"ids": [big.0], "swatch": "Dots"})).unwrap(); assert!(matches!(node(&s, big).appearance.fill_paint(), Paint::Pattern { pattern, .. } if pattern == "Dots")); @@ -174,8 +170,6 @@ fn options_set_tile_type_spacing_and_overlap() { fn options_rename_updates_swatch_and_paints() { let mut s = session(); make_dots(&mut s); - let bg = rect(&mut s, 0.0, 0.0, 400.0, 400.0); - s.execute("paint.setFill", &json!({"ids": [bg.0], "color": "#223344"})).unwrap(); let big = rect(&mut s, 100.0, 100.0, 50.0, 50.0); s.execute("paint.setFill", &json!({"ids": [big.0], "swatch": "Dots"})).unwrap(); s.execute("pattern.options", &json!({"name": "Dots", "newName": "Spots"})).unwrap(); @@ -188,8 +182,6 @@ fn options_rename_updates_swatch_and_paints() { fn delete_pattern_unpaints_objects() { let mut s = session(); make_dots(&mut s); - let bg = rect(&mut s, 0.0, 0.0, 400.0, 400.0); - s.execute("paint.setFill", &json!({"ids": [bg.0], "color": "#223344"})).unwrap(); let big = rect(&mut s, 100.0, 100.0, 50.0, 50.0); s.execute("paint.setFill", &json!({"ids": [big.0], "swatch": "Dots"})).unwrap(); let v = s.execute("pattern.delete", &json!({"name": "Dots"})).unwrap(); @@ -203,8 +195,6 @@ fn delete_pattern_unpaints_objects() { fn transform_patterns_only_moves_placement() { let mut s = session(); make_dots(&mut s); - let bg = rect(&mut s, 0.0, 0.0, 400.0, 400.0); - s.execute("paint.setFill", &json!({"ids": [bg.0], "color": "#223344"})).unwrap(); let big = rect(&mut s, 100.0, 100.0, 50.0, 50.0); s.execute("paint.setFill", &json!({"ids": [big.0], "swatch": "Dots"})).unwrap(); let before = node(&s, big).geometric_bounds(); @@ -222,8 +212,6 @@ fn transform_patterns_only_moves_placement() { fn transforms_without_transform_objects_move_only_the_pattern() { let mut s = session(); make_dots(&mut s); - let bg = rect(&mut s, 0.0, 0.0, 400.0, 400.0); - s.execute("paint.setFill", &json!({"ids": [bg.0], "color": "#223344"})).unwrap(); let big = rect(&mut s, 100.0, 100.0, 50.0, 50.0); s.execute("paint.setFill", &json!({"ids": [big.0], "swatch": "Dots"})).unwrap(); s.execute("select.set", &json!({"ids": [big.0]})).unwrap(); @@ -308,8 +296,6 @@ fn hit_testing_in_edit_mode_only_reaches_tile_layer() { fn save_load_roundtrip_keeps_patterns_and_repeats() { let mut s = session(); make_dots(&mut s); - let bg = rect(&mut s, 0.0, 0.0, 400.0, 400.0); - s.execute("paint.setFill", &json!({"ids": [bg.0], "color": "#223344"})).unwrap(); let big = rect(&mut s, 100.0, 100.0, 50.0, 50.0); s.execute("paint.setFill", &json!({"ids": [big.0], "swatch": "Dots"})).unwrap(); let r = rect(&mut s, 300.0, 50.0, 10.0, 10.0); @@ -326,8 +312,6 @@ fn save_load_roundtrip_keeps_patterns_and_repeats() { fn svg_export_writes_pattern_def() { let mut s = session(); make_dots(&mut s); - let bg = rect(&mut s, 0.0, 0.0, 400.0, 400.0); - s.execute("paint.setFill", &json!({"ids": [bg.0], "color": "#223344"})).unwrap(); let big = rect(&mut s, 100.0, 100.0, 50.0, 50.0); s.execute("paint.setFill", &json!({"ids": [big.0], "swatch": "Dots"})).unwrap(); let svg = vectorcraft_svg::export(doc(&s), &vectorcraft_svg::ExportOptions::default()); @@ -345,8 +329,6 @@ fn svg_export_writes_pattern_def() { fn pdf_export_expands_pattern_fills() { let mut s = session(); make_dots(&mut s); - let bg = rect(&mut s, 0.0, 0.0, 400.0, 400.0); - s.execute("paint.setFill", &json!({"ids": [bg.0], "color": "#223344"})).unwrap(); let big = rect(&mut s, 100.0, 100.0, 50.0, 50.0); s.execute("paint.setFill", &json!({"ids": [big.0], "swatch": "Dots"})).unwrap(); let rep = vectorcraft_pdf::export_with_report(doc(&s), &Default::default()).unwrap();