@@ -26,7 +26,11 @@ describe('ProblemList component', () => {
26
26
test ( 'renders correctly with detectedProblems' , ( ) => {
27
27
const { getByText } = render (
28
28
< RecoilRoot >
29
- < ProblemList detectedProblems = { 3 } otherFileWithProblems = { [ ] } />
29
+ < ProblemList
30
+ detectedProblems = { 3 }
31
+ otherFileWithProblems = { [ ] }
32
+ isEmptyIdentifiedProblemDetected = { false }
33
+ />
30
34
</ RecoilRoot > ,
31
35
) ;
32
36
expect ( getByText ( '3 Problems Detected' ) ) . toBeInTheDocument ( ) ;
@@ -36,9 +40,14 @@ describe('ProblemList component', () => {
36
40
const otherFileWithProblems = [ { name : 'file1.txt' } , { name : 'file2.txt' } ] ;
37
41
const { getByText, getAllByText } = render (
38
42
< RecoilRoot >
39
- < ProblemList detectedProblems = { 0 } otherFileWithProblems = { otherFileWithProblems } />
43
+ < ProblemList
44
+ detectedProblems = { 0 }
45
+ otherFileWithProblems = { otherFileWithProblems }
46
+ isEmptyIdentifiedProblemDetected = { true }
47
+ />
40
48
</ RecoilRoot > ,
41
49
) ;
50
+ expect ( getByText ( 'No Problems Detected' ) ) . toBeInTheDocument ( ) ;
42
51
expect ( getByText ( 'Other files with problems' ) ) . toBeInTheDocument ( ) ;
43
52
otherFileWithProblems . forEach ( ( { name } ) => {
44
53
expect ( getAllByText ( name ) ) . toHaveLength ( 1 ) ; // Ensure each file name is rendered once
@@ -49,9 +58,14 @@ describe('ProblemList component', () => {
49
58
const otherFileWithProblems = [ { name : 'file1.txt' } ] ;
50
59
const { getByText } = render (
51
60
< RecoilRoot >
52
- < ProblemList detectedProblems = { 0 } otherFileWithProblems = { otherFileWithProblems } />
61
+ < ProblemList
62
+ detectedProblems = { 0 }
63
+ otherFileWithProblems = { otherFileWithProblems }
64
+ isEmptyIdentifiedProblemDetected = { true }
65
+ />
53
66
</ RecoilRoot > ,
54
67
) ;
68
+ expect ( getByText ( 'No Problems Detected' ) ) . toBeInTheDocument ( ) ;
55
69
fireEvent . click ( getByText ( 'Open' ) ) ;
56
70
expect ( vscode . postMessage ) . toHaveBeenCalledWith ( {
57
71
type : 'OPEN_FILE_IN_NEW_TAB' ,
0 commit comments