Add Gradient tool test for select and delete removes a stop (#2571)

* Add Gradient tool test for select and delete removes a stop

* refactor fills and double click into functions

* refactor
This commit is contained in:
Sidharth-Singh10
2025-04-20 04:30:59 +05:30
committed by GitHub
parent b45f7ef0c7
commit 6196dbff95
2 changed files with 124 additions and 83 deletions

View File

@@ -243,6 +243,18 @@ impl EditorTestUtils {
pub async fn get_selected_layer(&mut self) -> Option<LayerNodeIdentifier> {
self.active_document().network_interface.selected_nodes().selected_layers(self.active_document().metadata()).next()
}
pub async fn double_click(&mut self, position: DVec2) {
self.handle_message(InputPreprocessorMessage::DoubleClick {
editor_mouse_state: EditorMouseState {
editor_position: position,
mouse_keys: MouseKeys::LEFT,
scroll_delta: ScrollDelta::default(),
},
modifier_keys: ModifierKeys::empty(),
})
.await;
}
}
pub trait FrontendMessageTestUtils {