Rename ItemView
to Item
This commit is contained in:
parent
aced1e2315
commit
0efce8f70a
11 changed files with 122 additions and 135 deletions
|
@ -192,7 +192,7 @@ mod tests {
|
|||
use theme::{Theme, ThemeRegistry, DEFAULT_THEME_NAME};
|
||||
use util::test::temp_tree;
|
||||
use workspace::{
|
||||
open_paths, pane, ItemView, ItemViewHandle, OpenNew, Pane, SplitDirection, WorkspaceHandle,
|
||||
open_paths, pane, Item, ItemHandle, OpenNew, Pane, SplitDirection, WorkspaceHandle,
|
||||
};
|
||||
|
||||
#[gpui::test]
|
||||
|
@ -324,7 +324,7 @@ mod tests {
|
|||
pane.active_item().unwrap().project_path(cx),
|
||||
Some(file1.clone())
|
||||
);
|
||||
assert_eq!(pane.item_views().count(), 1);
|
||||
assert_eq!(pane.items().count(), 1);
|
||||
});
|
||||
|
||||
// Open the second entry
|
||||
|
@ -338,7 +338,7 @@ mod tests {
|
|||
pane.active_item().unwrap().project_path(cx),
|
||||
Some(file2.clone())
|
||||
);
|
||||
assert_eq!(pane.item_views().count(), 2);
|
||||
assert_eq!(pane.items().count(), 2);
|
||||
});
|
||||
|
||||
// Open the first entry again. The existing pane item is activated.
|
||||
|
@ -354,7 +354,7 @@ mod tests {
|
|||
pane.active_item().unwrap().project_path(cx),
|
||||
Some(file1.clone())
|
||||
);
|
||||
assert_eq!(pane.item_views().count(), 2);
|
||||
assert_eq!(pane.items().count(), 2);
|
||||
});
|
||||
|
||||
// Split the pane with the first entry, then open the second entry again.
|
||||
|
@ -393,7 +393,7 @@ mod tests {
|
|||
Some(file3.clone())
|
||||
);
|
||||
let pane_entries = pane
|
||||
.item_views()
|
||||
.items()
|
||||
.map(|i| i.project_path(cx).unwrap())
|
||||
.collect::<Vec<_>>();
|
||||
assert_eq!(pane_entries, &[file1, file2, file3]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue