diff --git a/src/__tests__/Explore/FilterCard.test.js b/src/__tests__/Explore/FilterCard.test.js index 5b1eb464..c4a7eb3c 100644 --- a/src/__tests__/Explore/FilterCard.test.js +++ b/src/__tests__/Explore/FilterCard.test.js @@ -21,7 +21,7 @@ const StateFilterCardWrapper = () => { describe('Filters components', () => { it('renders the filters cards', async () => { render(); - expect(screen.getAllByRole('checkbox')).toHaveLength(2); + expect(screen.getAllByRole('checkbox')).toHaveLength(3); const checkbox = screen.getAllByRole('checkbox'); expect(checkbox[0]).not.toBeChecked(); diff --git a/src/utilities/filterConstants.js b/src/utilities/filterConstants.js index 8eb4a321..8a95591f 100644 --- a/src/utilities/filterConstants.js +++ b/src/utilities/filterConstants.js @@ -6,6 +6,10 @@ const osFilters = [ { label: 'linux', value: 'linux' + }, + { + label: 'freebsd', + value: 'freebsd' } ]; diff --git a/tests/explore.spec.js b/tests/explore.spec.js index 0e56b777..20d08b7a 100644 --- a/tests/explore.spec.js +++ b/tests/explore.spec.js @@ -76,8 +76,14 @@ test.describe('explore page test', () => { await expect(exploreFirst).toBeVisible({ timeout: 250000 }); + const windowsFilter = page.getByRole('checkbox', { name: 'windows' }); await linuxFilter.uncheck(); - await page.getByRole('checkbox', { name: 'windows' }).check(); + await windowsFilter.check(); + await expect(exploreFirst).not.toBeVisible({ timeout: 250000 }); + + const freebsdFilter = page.getByRole('checkbox', { name: 'freebsd' }); + await windowsFilter.uncheck(); + await freebsdFilter.check(); await expect(exploreFirst).not.toBeVisible({ timeout: 250000 }); }); });