Skip to content

Commit c828eb8

Browse files
committed
Fix: type filter plural mismatch (Classes vs Class), add exhaustive public tests
Fix pre-existing bug where filter buttons (Classes/Properties/Individuals) never matched because currentFilter was 'classes' but entity type text was 'Class'. Now handles singular/plural comparison correctly. Add 65-test exhaustive Playwright suite for the public site covering every click route: welcome panel, module pills, sidebar navigation, search, type filters, entity details, relationships, breadcrumbs, back-to-welcome, featured cards, URL parameters, cross-module navigation, and visual integrity.
1 parent e410830 commit c828eb8

2 files changed

Lines changed: 724 additions & 1 deletion

File tree

docs/public/browse/ontology-manager.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,11 @@ class OntologyManager {
766766
const type = entityItem.querySelector('.entity-type').textContent;
767767

768768
const matchesSearch = !query || label.includes(query) || uri.includes(query);
769-
const matchesFilter = this.currentFilter === 'all' || type.toLowerCase() === this.currentFilter;
769+
const typeLower = type.toLowerCase();
770+
const matchesFilter = this.currentFilter === 'all' ||
771+
typeLower === this.currentFilter ||
772+
typeLower + 's' === this.currentFilter ||
773+
typeLower + 'es' === this.currentFilter;
770774

771775
const isVisible = matchesSearch && matchesFilter;
772776
entityItem.style.display = isVisible ? 'flex' : 'none';

0 commit comments

Comments
 (0)