navigate from logs to calltree in async calls

This commit is contained in:
Dmitry Vasilev
2022-11-16 14:30:18 +08:00
parent 9c641f759f
commit f0f93229c7
2 changed files with 5 additions and 1 deletions

View File

@@ -516,7 +516,7 @@ export const expand_path = (state, node) => ({
calltree_node_is_expanded: {
...state.calltree_node_is_expanded,
...Object.fromEntries(
path_to_root(root_calltree_node(state), node)
path_to_root(state.calltree, node)
.map(n => [n.id, true])
),
// Also expand node, since it is not included in

View File

@@ -2351,6 +2351,10 @@ const y = x()`
// Expand call
const {state: expanded} = COMMANDS.calltree.click(state, call.id)
assert_equal(get_async_calls(expanded)[0].children[0].fn.name, 'fn2')
// Navigate logs
const nav = COMMANDS.calltree.navigate_logs_position(expanded, 0)
assert_equal(nav.state.current_calltree_node.is_log, true)
}),
]