@@ -135,7 +135,7 @@ class SearchControllerTest < ActionDispatch::IntegrationTest
135
135
get '/results?q=data'
136
136
assert_response :success
137
137
assert_select '#filters'
138
- assert_select '#filters .category .filter-label' , { minimum : 1 }
138
+ assert_select '#filters .filter- category .filter-label' , { minimum : 1 }
139
139
end
140
140
end
141
141
@@ -211,7 +211,7 @@ class SearchControllerTest < ActionDispatch::IntegrationTest
211
211
assert_select '#filters' , { count : 0 }
212
212
213
213
# Filters are not shown
214
- assert_select '#filters .category h3' , { count : 0 }
214
+ assert_select '#filters .filter- category h3' , { count : 0 }
215
215
216
216
# Pagination is not shown
217
217
assert_select '#pagination' , { count : 0 }
@@ -427,31 +427,31 @@ def source_filter_count(controller)
427
427
ClimateControl . modify ACTIVE_FILTERS : '' do
428
428
get '/results?q=data'
429
429
assert_response :success
430
- assert_select '#filters .category .filter-label' , { minimum : 1 }
430
+ assert_select '#filters .filter- category .filter-label' , { minimum : 1 }
431
431
end
432
432
433
433
# Ask for a single filter, get that filter.
434
434
ClimateControl . modify ACTIVE_FILTERS : 'subjects' do
435
435
get '/results?q=data'
436
436
assert_response :success
437
- assert_select '#filters .category .filter-label' , { count : 1 }
438
- assert_select '#filters .category:first-of-type .filter-label' , 'Subject'
437
+ assert_select '#filters .filter- category .filter-label' , { count : 1 }
438
+ assert_select '#filters .filter- category:first-of-type .filter-label' , 'Subject'
439
439
end
440
440
441
441
# The order of the terms matter, so now Format should be first.
442
442
ClimateControl . modify ACTIVE_FILTERS : 'format, contentType, source' do
443
443
get '/results?q=data'
444
444
assert_response :success
445
- assert_select '#filters .category .filter-label' , { count : 3 }
446
- assert_select '#filters .category:first-of-type .filter-label' , 'Format'
445
+ assert_select '#filters .filter- category .filter-label' , { count : 3 }
446
+ assert_select '#filters .filter- category:first-of-type .filter-label' , 'Format'
447
447
end
448
448
449
449
# Including extra values does not affect anything - "nonsense" is extraneous.
450
450
ClimateControl . modify ACTIVE_FILTERS : 'contentType, nonsense, source' do
451
451
get '/results?q=data'
452
452
assert_response :success
453
- assert_select '#filters .category .filter-label' , { count : 2 }
454
- assert_select '#filters .category:first-of-type .filter-label' , 'Content type'
453
+ assert_select '#filters .filter- category .filter-label' , { count : 2 }
454
+ assert_select '#filters .filter- category:first-of-type .filter-label' , 'Content type'
455
455
end
456
456
end
457
457
end
0 commit comments