File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 1+ .empty {
2+ font-style : italic ;
3+ }
4+
15.hooks {
26 padding : 0 ;
37 list-style : none ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as messages from '@cucumber/messages'
22import { Story } from '@ladle/react'
33import React from 'react'
44
5+ import empty from '../../../acceptance/empty/empty.js'
56import globalHooksAfterAllError from '../../../acceptance/global-hooks-afterall-error/global-hooks-afterall-error.js'
67import globalHooksAttachments from '../../../acceptance/global-hooks-attachments/global-hooks-attachments.js'
78import globalHooksBeforeAllError from '../../../acceptance/global-hooks-beforeall-error/global-hooks-beforeall-error.js'
@@ -16,6 +17,7 @@ const Template: Story<TemplateArgs> = ({ envelopes }) => {
1617 return (
1718 < EnvelopesProvider envelopes = { envelopes } >
1819 < FilteredDocuments />
20+ < h2 > BeforeAll/AfterAll</ h2 >
1921 < TestRunHooks />
2022 </ EnvelopesProvider >
2123 )
@@ -25,6 +27,11 @@ export default {
2527 title : 'App/TestRunHooksList' ,
2628}
2729
30+ export const EmptyGlobalHooks = Template . bind ( { } )
31+ EmptyGlobalHooks . args = {
32+ envelopes : empty ,
33+ }
34+
2835export const GlobalHooksWithAttachments = Template . bind ( { } )
2936GlobalHooksWithAttachments . args = {
3037 envelopes : globalHooksAttachments ,
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ import styles from './TestRunHooks.module.scss'
77export const TestRunHooks : FC = ( ) => {
88 const hooks = useTestRunHooks ( )
99
10+ if ( hooks . length === 0 ) {
11+ return < p className = { styles . empty } > No hooks found.</ p >
12+ }
13+
1014 return (
1115 < ol aria-label = "RunHooks" className = { styles . hooks } >
1216 { hooks . map ( ( { testRunHookFinished, hook } ) => {
You can’t perform that action at this time.
0 commit comments