Thanks for trying it!
Help… yes on my list!
The expand/collapse commands action on the branch rooted at the current selection. So in this case they do nothing since “Test 2” doesn’t have any children. So working, but maybe a more complex command is needed.
In TaskPaper (and I guess probably many other outliners) the command is a bit less targeted, and if you ask to collapse an item that is already collapsed (or has no children) then it collapses that items parent. I could add that, but this seemed like the simplest starting option.
There’s also the option to add full “Expand All” and “Collapse All” commands that always work on all items no mater the selection.