File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
src/Spectra.CLI/Dashboard/Templates/scripts Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1476,6 +1476,17 @@ function scrollToCoverageSection(sectionId) {
14761476 toggleCoverageDetails ( sectionId ) ;
14771477 }
14781478 section . scrollIntoView ( { behavior : 'smooth' , block : 'start' } ) ;
1479+ return ;
1480+ }
1481+ // Fallback: no detail list (e.g. 100% coverage shows success state).
1482+ // Find the section by matching the label text.
1483+ const allSections = document . querySelectorAll ( '.coverage-section' ) ;
1484+ for ( const sec of allSections ) {
1485+ const label = sec . querySelector ( '.coverage-section-label' ) ;
1486+ if ( label && label . textContent . toLowerCase ( ) . replace ( / \s + / g, '-' ) === sectionId ) {
1487+ sec . scrollIntoView ( { behavior : 'smooth' , block : 'start' } ) ;
1488+ return ;
1489+ }
14791490 }
14801491}
14811492
Original file line number Diff line number Diff line change @@ -1476,6 +1476,17 @@ function scrollToCoverageSection(sectionId) {
14761476 toggleCoverageDetails ( sectionId ) ;
14771477 }
14781478 section . scrollIntoView ( { behavior : 'smooth' , block : 'start' } ) ;
1479+ return ;
1480+ }
1481+ // Fallback: no detail list (e.g. 100% coverage shows success state).
1482+ // Find the section by matching the label text.
1483+ const allSections = document . querySelectorAll ( '.coverage-section' ) ;
1484+ for ( const sec of allSections ) {
1485+ const label = sec . querySelector ( '.coverage-section-label' ) ;
1486+ if ( label && label . textContent . toLowerCase ( ) . replace ( / \s + / g, '-' ) === sectionId ) {
1487+ sec . scrollIntoView ( { behavior : 'smooth' , block : 'start' } ) ;
1488+ return ;
1489+ }
14791490 }
14801491}
14811492
You can’t perform that action at this time.
0 commit comments