refactor: split tree shell filetree helpers
This commit is contained in:
@@ -2393,6 +2393,8 @@ pub async fn reduce_tree_shell_runtime(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
const TREE_SHELL_RUNTIME_JS: &str = include_str!("../../browser/tree-shell-runtime.js");
|
||||
const TREE_SHELL_FILETREE_RUNTIME_JS: &str =
|
||||
include_str!("../../browser/tree-shell-filetree-runtime.js");
|
||||
|
||||
use super::{
|
||||
collect_filetree_render_rows, create_command_wire, TreeCommandEnvelopeContext,
|
||||
@@ -2673,7 +2675,10 @@ mod tests {
|
||||
assert!(TREE_SHELL_RUNTIME_JS.contains("tree.filetree.external-drop"));
|
||||
assert!(html.contains("\"rowKind\":\"asset_folder\""));
|
||||
assert!(html.contains("\"resourceMeta\""));
|
||||
assert!(TREE_SHELL_RUNTIME_JS.contains("const getFileTreeRowOwnerDocumentId = (item) => {"));
|
||||
assert!(TREE_SHELL_RUNTIME_JS.contains("tree-shell-filetree-runtime.js"));
|
||||
assert!(
|
||||
TREE_SHELL_FILETREE_RUNTIME_JS.contains("function getFileTreeRowOwnerDocumentId(item)")
|
||||
);
|
||||
assert!(TREE_SHELL_RUNTIME_JS
|
||||
.contains("row.dataset.ownerDocumentId = ownerDocumentId || \"\";"));
|
||||
assert!(
|
||||
|
||||
Reference in New Issue
Block a user