Add manual input elements to the app an ui #216
@ -253,12 +253,14 @@ mod tests {
|
|||||||
fn artist_matches(matching: ArtistMeta, list: Vec<Match<ArtistMeta>>) -> MatchStateInfo {
|
fn artist_matches(matching: ArtistMeta, list: Vec<Match<ArtistMeta>>) -> MatchStateInfo {
|
||||||
let mut list: Vec<MatchOption<ArtistMeta>> = list.into_iter().map(Into::into).collect();
|
let mut list: Vec<MatchOption<ArtistMeta>> = list.into_iter().map(Into::into).collect();
|
||||||
list.push(MatchOption::CannotHaveMbid);
|
list.push(MatchOption::CannotHaveMbid);
|
||||||
|
list.push(MatchOption::ManualInputMbid);
|
||||||
MatchStateInfo::artist(matching, list)
|
MatchStateInfo::artist(matching, list)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn album_matches(matching: AlbumMeta, list: Vec<Match<AlbumMeta>>) -> MatchStateInfo {
|
fn album_matches(matching: AlbumMeta, list: Vec<Match<AlbumMeta>>) -> MatchStateInfo {
|
||||||
let mut list: Vec<MatchOption<AlbumMeta>> = list.into_iter().map(Into::into).collect();
|
let mut list: Vec<MatchOption<AlbumMeta>> = list.into_iter().map(Into::into).collect();
|
||||||
list.push(MatchOption::CannotHaveMbid);
|
list.push(MatchOption::CannotHaveMbid);
|
||||||
|
list.push(MatchOption::ManualInputMbid);
|
||||||
MatchStateInfo::album(matching, list)
|
MatchStateInfo::album(matching, list)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -380,6 +382,10 @@ mod tests {
|
|||||||
input: None,
|
input: None,
|
||||||
};
|
};
|
||||||
terminal.draw(|frame| Ui::render(&mut app, frame)).unwrap();
|
terminal.draw(|frame| Ui::render(&mut app, frame)).unwrap();
|
||||||
|
|
||||||
|
let input = tui_input::Input::default();
|
||||||
|
app.input = Some(&input);
|
||||||
|
terminal.draw(|frame| Ui::render(&mut app, frame)).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -415,5 +421,9 @@ mod tests {
|
|||||||
input: None,
|
input: None,
|
||||||
};
|
};
|
||||||
terminal.draw(|frame| Ui::render(&mut app, frame)).unwrap();
|
terminal.draw(|frame| Ui::render(&mut app, frame)).unwrap();
|
||||||
|
|
||||||
|
let input = tui_input::Input::default();
|
||||||
|
app.input = Some(&input);
|
||||||
|
terminal.draw(|frame| Ui::render(&mut app, frame)).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user