Skip to content

Commit a76f7f8

Browse files
ryanabxwash2
authored andcommitted
Fix tests
Tested with cargo test --all-features Signed-off-by: Ryan Brue <ryanbrue.dev@gmail.com>
1 parent 29ec08c commit a76f7f8

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

src/app.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6386,6 +6386,7 @@ pub(crate) mod test_utils {
63866386
location,
63876387
TabConfig::default(),
63886388
ThumbCfg::default(),
6389+
None,
63896390
widget::Id::unique(),
63906391
None,
63916392
);

src/tab.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6101,7 +6101,7 @@ fn text_editor_class(
61016101
mod tests {
61026102
use std::{fs, io, path::PathBuf};
61036103

6104-
use cosmic::{iced::mouse::ScrollDelta, iced_runtime::keyboard::Modifiers};
6104+
use cosmic::{iced::mouse::ScrollDelta, iced_runtime::keyboard::Modifiers, widget};
61056105
use log::{debug, trace};
61066106
use tempfile::TempDir;
61076107
use test_log::test;
@@ -6112,7 +6112,7 @@ mod tests {
61126112
assert_eq_tab_path, empty_fs, eq_path_item, filter_dirs, read_dir_sorted, simple_fs,
61136113
tab_click_new, NAME_LEN, NUM_DIRS, NUM_FILES, NUM_HIDDEN, NUM_NESTED,
61146114
},
6115-
config::{IconSizes, TabConfig},
6115+
config::{IconSizes, TabConfig, ThumbCfg},
61166116
};
61176117

61186118
// Boilerplate for tab tests. Checks if simulated clicks selected items.
@@ -6156,9 +6156,10 @@ mod tests {
61566156
let mut tab = Tab::new(
61576157
Location::Path(path.into()),
61586158
TabConfig::default(),
6159-
None,
61606159
ThumbCfg::default(),
61616160
None,
6161+
widget::Id::unique(),
6162+
None,
61626163
);
61636164

61646165
// All directories (simple_fs only produces one nested layer)
@@ -6259,9 +6260,10 @@ mod tests {
62596260
let mut tab = Tab::new(
62606261
Location::Path(path.to_owned()),
62616262
TabConfig::default(),
6262-
None,
62636263
ThumbCfg::default(),
62646264
None,
6265+
widget::Id::unique(),
6266+
None,
62656267
);
62666268
debug!(
62676269
"Emitting Message::Location(Location::Path(\"{}\"))",
@@ -6397,9 +6399,10 @@ mod tests {
63976399
let mut tab = Tab::new(
63986400
Location::Path(path.into()),
63996401
TabConfig::default(),
6400-
None,
64016402
ThumbCfg::default(),
64026403
None,
6404+
widget::Id::unique(),
6405+
None,
64036406
);
64046407

64056408
// Tab's location shouldn't change if GoPrev or GoNext is triggered
@@ -6425,9 +6428,10 @@ mod tests {
64256428
let mut tab = Tab::new(
64266429
Location::Path(next_dir.clone()),
64276430
TabConfig::default(),
6428-
None,
64296431
ThumbCfg::default(),
64306432
None,
6433+
widget::Id::unique(),
6434+
None,
64316435
);
64326436
// This will eventually yield false once root is hit
64336437
while next_dir.pop() {
@@ -6464,7 +6468,9 @@ mod tests {
64646468
Tab::new(
64656469
Location::Path(path.into()),
64666470
TabConfig::default(),
6471+
ThumbCfg::default(),
64676472
None,
6473+
widget::Id::unique(),
64686474
None,
64696475
);
64706476

0 commit comments

Comments
 (0)