feat: complete tree shell cutover and regression coverage
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
use super::protocol;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct FileTreeRenderRow {
|
||||
pub row_id: String,
|
||||
pub row_kind: String,
|
||||
pub title: String,
|
||||
}
|
||||
|
||||
pub fn build_filetree_testids(rows: &[FileTreeRenderRow]) -> Vec<(&'static str, String)> {
|
||||
rows.iter()
|
||||
.map(|row| {
|
||||
let test_id = match row.row_kind.as_str() {
|
||||
"document" => protocol::TEST_ID_FILETREE_DOC_ROW,
|
||||
"index" => protocol::TEST_ID_FILETREE_INDEX_ROW,
|
||||
_ => protocol::TEST_ID_FILETREE_ASSET_ROW,
|
||||
};
|
||||
(test_id, row.row_id.clone())
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
Reference in New Issue
Block a user