feat(ui): Full Sonarr support for the indexer tab

This commit is contained in:
2024-12-04 16:39:37 -07:00
parent a0b27ec105
commit 2d2901f6dc
27 changed files with 761 additions and 26 deletions
@@ -0,0 +1,21 @@
#[cfg(test)]
mod tests {
use strum::IntoEnumIterator;
use crate::models::servarr_data::sonarr::sonarr_data::{
ActiveSonarrBlock, INDEXER_SETTINGS_BLOCKS,
};
use crate::ui::sonarr_ui::indexers::indexer_settings_ui::IndexerSettingsUi;
use crate::ui::DrawUi;
#[test]
fn test_indexer_settings_ui_accepts() {
ActiveSonarrBlock::iter().for_each(|active_sonarr_block| {
if INDEXER_SETTINGS_BLOCKS.contains(&active_sonarr_block) {
assert!(IndexerSettingsUi::accepts(active_sonarr_block.into()));
} else {
assert!(!IndexerSettingsUi::accepts(active_sonarr_block.into()));
}
});
}
}