Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions templates/regression/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ <h5>Regression tests</h5>

$(document).ready(function(){
const urlParams = new URLSearchParams(window.location.search);
const hash = urlParams.get("category");
if(hash === "") hash = "1";
let hash = urlParams.get("category");
if(!hash || hash === "") hash = "1";
$("#category").find("option").each(function(idx, elm){
if($(elm).val() === hash){
$(elm).attr("selected",true);
Expand Down
9 changes: 9 additions & 0 deletions tests/test_regression/test_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,3 +566,12 @@ def test_add_test_output_and_check_double_hashes(self):
).count(),
1
)

def test_category_description_shown_without_tags(self):
"""Test that category description is shown when accessing /regression/ with category parameter but no tags."""
response = self.app.test_client().get('/regression/?category=1')
self.assertEqual(response.status_code, 200)
# Check that the category description span is present and not hidden
self.assertIn('data-category="1"', str(response.data))
# The JavaScript should ensure the description is visible, but we can't test JS execution in unit tests
# This test verifies the HTML structure is correct for the fix to work