feat(readarr): add the edit author handler
Handles the multi-step edit prompt covering monitored, monitor new items, quality profile, metadata profile, path, tags, and confirmation. The prompt can be opened from either the author list or the author details view, so the originating block is threaded through to the sub-block pushes and Esc returns to the view the user came from.
This commit is contained in:
4 files changed
+1832
-2
No files matched your search
@@ -15,7 +15,7 @@ mod tests {
|
||||
use crate::models::readarr_models::{Author, AuthorStatistics, AuthorStatus};
|
||||
use crate::models::servarr_data::readarr::readarr_data::{
|
||||
ADD_AUTHOR_BLOCKS, AUTHOR_DETAILS_BLOCKS, ActiveReadarrBlock, BOOK_DETAILS_BLOCKS,
|
||||
EDITION_DETAILS_BLOCKS, LIBRARY_BLOCKS,
|
||||
EDIT_AUTHOR_BLOCKS, EDITION_DETAILS_BLOCKS, LIBRARY_BLOCKS,
|
||||
};
|
||||
use crate::test_handler_delegation;
|
||||
|
||||
@@ -898,6 +898,15 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_delegates_edit_author_blocks_to_edit_author_handler() {
|
||||
test_handler_delegation!(
|
||||
LibraryHandler,
|
||||
ActiveReadarrBlock::Authors,
|
||||
ActiveReadarrBlock::EditAuthorPrompt
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_library_handler_accepts() {
|
||||
let mut library_handler_blocks = Vec::new();
|
||||
@@ -906,6 +915,7 @@ mod tests {
|
||||
library_handler_blocks.extend(BOOK_DETAILS_BLOCKS);
|
||||
library_handler_blocks.extend(EDITION_DETAILS_BLOCKS);
|
||||
library_handler_blocks.extend(ADD_AUTHOR_BLOCKS);
|
||||
library_handler_blocks.extend(EDIT_AUTHOR_BLOCKS);
|
||||
|
||||
ActiveReadarrBlock::iter().for_each(|readarr_block| {
|
||||
if library_handler_blocks.contains(&readarr_block) {
|
||||
|
||||
Reference in new issue
Block a user