@@ -76,15 +76,9 @@ <h2 class="text-lg font-semibold mb-3 text-purple-900">Test Summary</h2>
76
76
< div id ="summary " class ="space-y-2 "> </ div >
77
77
</ div >
78
78
79
- <!-- Failed Tests -->
79
+ <!-- Failing PDFs -->
80
80
< div class ="space-y-2 ">
81
- < h3 class ="text-sm font-medium text-purple-900 "> Failed Tests</ h3 >
82
- < div id ="failures " class ="space-y-1 "> </ div >
83
- </ div >
84
-
85
- <!-- Actual PDFs -->
86
- < div class ="space-y-2 ">
87
- < h3 class ="text-sm font-medium text-purple-900 "> Actual PDFs</ h3 >
81
+ < h3 class ="text-sm font-medium text-purple-900 "> Failing PDFs</ h3 >
88
82
< div id ="pdfs " class ="space-y-1 "> </ div >
89
83
</ div >
90
84
</ div >
@@ -182,19 +176,7 @@ <h3 class="font-medium text-purple-900">Differences</h3>
182
176
// Update summary
183
177
document . getElementById ( 'summary' ) . innerHTML = formatSummary ( results ) ;
184
178
185
- // Update failures list
186
- const failures = results . failures || [ ] ;
187
- const failuresHtml = failures . map ( failure => `
188
- <div id="failure_${ failure . name . replace ( / [ ^ a - z A - Z 0 - 9 ] / g, '_' ) } "
189
- class="nav-item text-sm"
190
- onclick='showPdfComparison(${ JSON . stringify ( { ...failure , id : "failure_" + failure . name . replace ( / [ ^ a - z A - Z 0 - 9 ] / g, '_' ) } ) . replace ( / ' / g, "'" ) } )'>
191
- ${ documentIcon }
192
- ${ failure . name }
193
- </div>
194
- ` ) . join ( '' ) ;
195
- document . getElementById ( 'failures' ) . innerHTML = failuresHtml || '<div class="nav-item text-sm text-gray-500">No failures</div>' ;
196
-
197
- // Load and display actual PDFs
179
+ // Load and display failing PDFs
198
180
try {
199
181
const response = await fetch ( '/api/pdfs' ) ;
200
182
const pdfs = await response . json ( ) ;
@@ -206,12 +188,10 @@ <h3 class="font-medium text-purple-900">Differences</h3>
206
188
${ pdf . name }
207
189
</div>
208
190
` ) . join ( '' ) ;
209
- document . getElementById ( 'pdfs' ) . innerHTML = pdfsHtml || '<div class="nav-item text-sm text-gray-500">No PDFs found </div>' ;
191
+ document . getElementById ( 'pdfs' ) . innerHTML = pdfsHtml || '<div class="nav-item text-sm text-gray-500">No failing PDFs </div>' ;
210
192
211
- // Show first failure by default, or first PDF if no failures
212
- if ( failures . length > 0 ) {
213
- showPdfComparison ( { ...failures [ 0 ] , id : "failure_" + failures [ 0 ] . name . replace ( / [ ^ a - z A - Z 0 - 9 ] / g, '_' ) } ) ;
214
- } else if ( pdfs . length > 0 ) {
193
+ // Show first PDF if available
194
+ if ( pdfs . length > 0 ) {
215
195
showPdfComparison ( { ...pdfs [ 0 ] , id : "pdf_" + pdfs [ 0 ] . name . replace ( / [ ^ a - z A - Z 0 - 9 ] / g, '_' ) } ) ;
216
196
}
217
197
} catch ( error ) {
0 commit comments