File tree Expand file tree Collapse file tree 4 files changed +28
-2
lines changed
Expand file tree Collapse file tree 4 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,10 @@ div.wunderbaum div.wb-header span.wb-col.wb-active {
259259 font : 12px / 1.6 system-ui , sans-serif ;
260260}
261261
262+ .wb-loading-style {
263+ @extend .wb-loading ;
264+ }
265+
262266.wb-no-results {
263267 position : absolute ;
264268 inset : 48px 16px 16px 16px ;
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ export default class extends Controller {
298298
299299 selectAllButton . addEventListener ( "click" , ( ) => {
300300 document . getElementById ( "tree-match-count" ) ?. remove ( ) ;
301-
301+
302302 if ( ! this . _hasActiveFilter ( ) ) {
303303 this . _updateSelectAllButtonState (
304304 this . tree . getSelectedNodes ( ) . length
@@ -1287,7 +1287,7 @@ export default class extends Controller {
12871287 if ( ! el ) {
12881288 el = document . createElement ( "div" ) ;
12891289 el . id = "tree-match-count" ;
1290- el . className = "wb-loading wb-match-count " ;
1290+ el . className = "wb-match-count wb-loading-style " ;
12911291 el . style . position = "absolute" ;
12921292 el . style . pointerEvents = "none" ;
12931293
Original file line number Diff line number Diff line change 1919)
2020
2121SimpleCov . start ( "rails" ) do
22+ minimum_coverage 0
23+ maximum_coverage_drop 100
24+
2225 add_filter "app/channels"
2326 add_filter "app/fields"
2427 add_filter "app/jobs"
Original file line number Diff line number Diff line change @@ -100,4 +100,23 @@ def visit_volume_tree
100100 expect ( page ) . to have_no_css ( ".wb-loading" , wait : 6 )
101101 expect ( page ) . to have_no_content ( "scan_beta_001.tif" , wait : 6 )
102102 end
103+
104+ it "shows a match count after filtering" do
105+ visit volume_path ( volume )
106+
107+ fill_in "tree-filter" , with : "journals"
108+
109+ expect ( page ) . to have_css ( "#tree-match-count" , wait : 6 )
110+ expect ( page ) . to have_text ( "matches" )
111+ end
112+
113+ it "does not apply stale search results after clearing the search" do
114+ visit volume_path ( volume )
115+
116+ fill_in "tree-filter" , with : "journals"
117+ fill_in "tree-filter" , with : ""
118+
119+ expect ( page ) . to have_no_css ( "#tree-match-count" , wait : 6 )
120+ expect ( page ) . to have_no_text ( "journals" )
121+ end
103122end
You can’t perform that action at this time.
0 commit comments