diff --git a/lib/static/modules/reducers/suites-page.ts b/lib/static/modules/reducers/suites-page.ts index 47bdf23f..d03394ae 100644 --- a/lib/static/modules/reducers/suites-page.ts +++ b/lib/static/modules/reducers/suites-page.ts @@ -123,8 +123,10 @@ export default (state: State, action: SomeAction): State => { const newExpandedTreeNodesById: Record = {}; while (nodeData) { - newExpandedTreeNodesById[nodeData.id] = true; nodeData = nodeData.parentData ?? null; + if (nodeData) { + newExpandedTreeNodesById[nodeData.id] = true; + } } return applyStateUpdate(state, { diff --git a/lib/static/new-ui/features/suites/components/TreeViewItemSubtitle/index.tsx b/lib/static/new-ui/features/suites/components/TreeViewItemSubtitle/index.tsx index c43c115a..7e283cad 100644 --- a/lib/static/new-ui/features/suites/components/TreeViewItemSubtitle/index.tsx +++ b/lib/static/new-ui/features/suites/components/TreeViewItemSubtitle/index.tsx @@ -8,6 +8,7 @@ import {ImageEntityFail} from '@/static/new-ui/types/store'; import styles from './index.module.css'; import {getAssertViewStatusMessage} from '@/static/new-ui/utils/assert-view-status'; import {makeLinksClickable} from '@/static/new-ui/utils'; +import {TestStatus} from '@/constants'; interface TreeViewItemSubtitleProps { item: TreeViewItemData; @@ -17,7 +18,7 @@ interface TreeViewItemSubtitleProps { } export function TreeViewItemSubtitle(props: TreeViewItemSubtitleProps): ReactNode { - if (props.item.skipReason) { + if (props.item.status === TestStatus.SKIPPED && props.item.skipReason) { return
Skipped ⋅ {makeLinksClickable(props.item.skipReason)}
;