@@ -495,6 +495,48 @@ const Command: React.FC<CommandProps> = observer(({ model, aliasesWithDuplicates
495495 return null
496496 }
497497
498+ const commandContent = ( < div className = 'command-wrapper-container' >
499+ < div
500+ className = { cs ( 'command-wrapper-text' , {
501+ 'command-wrapper-text-group' : model . hasChildren && groupId ,
502+ 'command-wrapper-text-group-parent' : model . hasChildren && ! groupId ,
503+ } ) }
504+ onMouseEnter = { ( ) => _snapshot ( true ) }
505+ onMouseLeave = { ( ) => _snapshot ( false ) }
506+ >
507+ { groupPlaceholder }
508+
509+ { model . hasChildren && groupId && (
510+ < div className = { cs ( 'command-expander-column-group' , { 'nested-group-expander' : model . groupLevel } ) } onClick = { ( e ) => {
511+ e . stopPropagation ( )
512+ model . toggleOpen ( )
513+ } } >
514+ < ChevronIcon className = { cs ( 'command-expander' , { 'command-expander-is-open' : model . hasChildren && ! ! model . isOpen } ) } />
515+ </ div >
516+ ) }
517+ < CommandDetails model = { model } groupId = { groupId } aliasesWithDuplicates = { aliasesWithDuplicates } />
518+ < CommandControls model = { model } commandName = { commandName } />
519+ </ div >
520+ { model . isCyPrompt && model . state === 'passed' && (
521+ < Button
522+ variant = "indigo-dark-mode"
523+ size = "20"
524+ onClick = { ( e ) => {
525+ e . stopPropagation ( )
526+ events . emit ( 'prompt:get-code' , { testId : model . testId , logId : model . id } )
527+ } }
528+ className = "command-prompt-get-code mr-1 whitespace-nowrap"
529+ >
530+ < IconTechnologyAngleBrackets
531+ className = 'command-prompt-get-code-indicator pr-1'
532+ size = '16'
533+ strokeColor = 'white'
534+ />
535+ < span > Code</ span >
536+ </ Button >
537+ ) }
538+ </ div > )
539+
498540 return (
499541 < >
500542 < li className = { cs ( 'command' , `command-name-${ commandName } ` ) } >
@@ -511,54 +553,15 @@ const Command: React.FC<CommandProps> = observer(({ model, aliasesWithDuplicates
511553 ) }
512554 >
513555 < NavColumns model = { model } isPinned = { _isPinned ( ) } toggleColumnPin = { _toggleColumnPin } />
514- < FlashOnClick
556+ { appState . studioActive ? commandContent : < FlashOnClick
515557 message = 'Printed output to your console'
516558 onClick = { _toggleColumnPin }
517559 shouldShowMessage = { _shouldShowClickMessage }
518560 wrapperClassName = { cs ( 'command-pin-target' , { 'command-group' : ! ! groupId , 'command-group-no-children' : ! model . hasChildren && model . group } ) }
519561 >
520- < div className = 'command-wrapper-container' >
521- < div
522- className = { cs ( 'command-wrapper-text' , {
523- 'command-wrapper-text-group' : model . hasChildren && groupId ,
524- 'command-wrapper-text-group-parent' : model . hasChildren && ! groupId ,
525- } ) }
526- onMouseEnter = { ( ) => _snapshot ( true ) }
527- onMouseLeave = { ( ) => _snapshot ( false ) }
528- >
529- { groupPlaceholder }
530-
531- { model . hasChildren && groupId && (
532- < div className = { cs ( 'command-expander-column-group' , { 'nested-group-expander' : model . groupLevel } ) } onClick = { ( e ) => {
533- e . stopPropagation ( )
534- model . toggleOpen ( )
535- } } >
536- < ChevronIcon className = { cs ( 'command-expander' , { 'command-expander-is-open' : model . hasChildren && ! ! model . isOpen } ) } />
537- </ div >
538- ) }
539- < CommandDetails model = { model } groupId = { groupId } aliasesWithDuplicates = { aliasesWithDuplicates } />
540- < CommandControls model = { model } commandName = { commandName } />
541- </ div >
542- { model . isCyPrompt && model . state === 'passed' && (
543- < Button
544- variant = "indigo-dark-mode"
545- size = "20"
546- onClick = { ( e ) => {
547- e . stopPropagation ( )
548- events . emit ( 'prompt:get-code' , { testId : model . testId , logId : model . id } )
549- } }
550- className = "command-prompt-get-code mr-1 whitespace-nowrap"
551- >
552- < IconTechnologyAngleBrackets
553- className = 'command-prompt-get-code-indicator pr-1'
554- size = '16'
555- strokeColor = 'white'
556- />
557- < span > Code</ span >
558- </ Button >
559- ) }
560- </ div >
562+ { commandContent }
561563 </ FlashOnClick >
564+ }
562565 </ div >
563566 < Progress model = { model } />
564567 { model . hasChildren && model . isOpen && (
0 commit comments