test: persistence e2e and registration-relogin e2e; lint clean
Adds a lib target (soulseek_rs_tui) exposing cli/models/persist so integration tests can drive the persistence pipeline: state and config survive a simulated restart through the real files, with the incomplete download flagged for auto-resume. The lib e2e suite gains a register-then-relogin test against soulfind proving the stored-credential flow's server assumptions. cargo clippy --all-targets and cargo fmt are clean.
This commit is contained in:
@@ -111,6 +111,7 @@ pub struct AppState {
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
#[must_use]
|
||||
pub fn new() -> Self {
|
||||
let mut searches_table_state = TableState::default();
|
||||
searches_table_state.select(Some(0));
|
||||
@@ -166,6 +167,7 @@ impl AppState {
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[must_use]
|
||||
pub fn get_selected_search(&self) -> Option<&SearchEntry> {
|
||||
self.selected_search_index
|
||||
.and_then(|idx| self.searches.get(idx))
|
||||
|
||||
Reference in New Issue
Block a user