mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-22 19:08:51 +00:00
Batch 11: Paste here puts copied design layers at the point
This commit is contained in:
1 parent
313386c1ac
commit
532b0f7321
1 file changed
+10
@@ -45,6 +45,16 @@ fn paste_takes_layers_copied_in_another_design_app() {
|
||||
assert_eq!(selected_names(&app), ["Copied layer"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn paste_here_puts_copied_design_layers_at_the_point() {
|
||||
let html = copied_html();
|
||||
let mut app = FigApp::new(Session::new(), Box::new(Clip { html, text: Some(String::new()) }));
|
||||
crate::menus::paste(&mut app, None, Some((300.0, 200.0)));
|
||||
let id = app.session.selection()[0];
|
||||
let b = app.session.doc().unwrap().world_bounds(id).unwrap();
|
||||
assert_eq!((b.x0, b.y0), (300.0, 200.0));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn html_from_other_apps_pastes_as_before() {
|
||||
let clip = Clip { html: "<b>Hello</b>".into(), text: Some("Hello".into()) };
|
||||
|
||||
Reference in new issue
Block a user