1- import { Spin } from '@gravity-ui/uikit' ;
21import classNames from 'classnames' ;
32import React , { ReactNode } from 'react' ;
43import { useSelector } from 'react-redux' ;
@@ -10,6 +9,7 @@ import {getCurrentResult, isTimeTravelPlayerAvailable} from '@/static/new-ui/fea
109import { getTestSteps } from '@/static/new-ui/features/suites/components/TestSteps/selectors' ;
1110import { SnapshotsPlayer } from '@/static/new-ui/features/suites/components/SnapshotsPlayer' ;
1211import { ErrorHandler } from '@/static/new-ui/features/error-handling/components/ErrorHandling' ;
12+ import { RunTestLoading } from '@/static/new-ui/components/RunTestLoading' ;
1313
1414import styles from './index.module.css' ;
1515
@@ -23,22 +23,26 @@ export function TestInfo(): ReactNode {
2323
2424 const shouldShowPlayer = isPlayerAvailable && isPlayerVisible ;
2525
26+ if ( isRunning ) {
27+ return < RunTestLoading /> ;
28+ }
29+
2630 return < >
2731 < CollapsibleSection id = { 'actions' } title = { 'Actions' } >
2832 < div className = { styles . stepsContainer } >
2933 { steps . length > 0 ?
3034 < ErrorHandler . Boundary watchFor = { [ currentResult ] } fallback = { < ErrorHandler . FallbackDataCorruption /> } >
3135 < TestSteps className = { styles . stepsListContainer } />
3236 </ ErrorHandler . Boundary > :
33- < div className = { styles . emptyStepsContainer } > { isRunning ? < > < Spin size = { 'xs' } style = { { marginRight : '4px' } } /> Test is running </ > : ' No steps to show' } </ div >
37+ < div className = { styles . emptyStepsContainer } > No steps to show</ div >
3438 }
3539 { isPlayerAvailable && < div className = { classNames ( styles . sticky , ! shouldShowPlayer && styles . hidden ) } >
3640 < SnapshotsPlayer />
3741 </ div > }
3842 </ div >
3943 </ CollapsibleSection >
4044 < CollapsibleSection id = { 'metadata' } title = { 'Metadata' } >
41- { currentResult && < div className = { styles [ 'collapsible-section__body' ] } >
45+ { currentResult && ! isRunning && < div className = { styles [ 'collapsible-section__body' ] } >
4246 < MetaInfo resultId = { currentResult . id } />
4347 </ div > }
4448 </ CollapsibleSection >
0 commit comments