fix(app): filters toggle layout, constant spacing, one active-count helper

This commit is contained in:
bchanot committed 2026-11-16 20:39:01 +01:00
1 parent c25a994c0e
commit 7a129dc763
3 files changed
+25 -8

No files matched your search

@@ -1,5 +1,6 @@
import { describe, expect, it } from 'vitest'
import type { OfficialSheetAdminSummary } from '@faunosteo/supabase'
import { NO_FILTER, activeFilterCount } from '@/admin/filters'
import { searchSheets, sortSheets } from '@/admin/sheetList'
const sheet = (id: string, fr: string, en: string, at: string) =>
@@ -42,3 +43,11 @@ describe('sortSheets', () => {
expect(ids(input)).toBe('za')
})
})
describe('activeFilterCount', () => {
it('counts the filters that are not empty', () => {
expect(activeFilterCount(NO_FILTER)).toBe(0)
const two = { ...NO_FILTER, species: 'equine', roundStatus: 'open' }
expect(activeFilterCount(two)).toBe(2)
})
})