fix tests
This commit is contained in:
parent
3d5699e83f
commit
08fa88ef8d
3 changed files with 20 additions and 0 deletions
|
|
@ -162,6 +162,11 @@ pub(crate) const UI_MONOSPACE_FONT_FAMILY: &str = "DejaVu Sans Mono";
|
|||
pub(crate) const UI_MONOSPACE_FONT_FAMILY: &str = "monospace";
|
||||
|
||||
impl GitCometView {
|
||||
#[cfg(test)]
|
||||
pub(in crate::view) fn disable_poller_for_tests(&mut self) {
|
||||
self._poller = Poller::disabled();
|
||||
}
|
||||
|
||||
pub(in crate::view) fn open_popover_at(
|
||||
&mut self,
|
||||
kind: PopoverKind,
|
||||
|
|
|
|||
|
|
@ -430,6 +430,10 @@ fn commit_file_menu_copy_path_supports_right_button_release(cx: &mut gpui::TestA
|
|||
let (view, cx) =
|
||||
cx.add_window_view(|window, cx| GitCometView::new(store, events, None, window, cx));
|
||||
|
||||
cx.update(|_window, app| {
|
||||
view.update(app, |this, _cx| this.disable_poller_for_tests());
|
||||
});
|
||||
|
||||
let repo_id = RepoId(35);
|
||||
let commit_id = CommitId("feedfacefeedface".to_string());
|
||||
let workdir = std::env::temp_dir().join(format!(
|
||||
|
|
@ -517,6 +521,10 @@ fn status_file_menu_copy_path_supports_right_button_release(cx: &mut gpui::TestA
|
|||
let (view, cx) =
|
||||
cx.add_window_view(|window, cx| GitCometView::new(store, events, None, window, cx));
|
||||
|
||||
cx.update(|_window, app| {
|
||||
view.update(app, |this, _cx| this.disable_poller_for_tests());
|
||||
});
|
||||
|
||||
let repo_id = RepoId(36);
|
||||
let workdir = std::env::temp_dir().join(format!(
|
||||
"gitcomet_ui_test_{}_status_menu_copy_path_right_release",
|
||||
|
|
|
|||
|
|
@ -32,4 +32,11 @@ impl Poller {
|
|||
|
||||
Poller { _task: task }
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(super) fn disabled() -> Poller {
|
||||
Poller {
|
||||
_task: gpui::Task::ready(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue