feat: add freebsd as an OS filter (#407) (#408)

Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
Doug Rabson 2023-12-28 12:52:27 +00:00 committed by GitHub
parent f4600b8b79
commit a9db66bd34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

View File

@ -21,7 +21,7 @@ const StateFilterCardWrapper = () => {
describe('Filters components', () => {
it('renders the filters cards', async () => {
render(<StateFilterCardWrapper />);
expect(screen.getAllByRole('checkbox')).toHaveLength(2);
expect(screen.getAllByRole('checkbox')).toHaveLength(3);
const checkbox = screen.getAllByRole('checkbox');
expect(checkbox[0]).not.toBeChecked();

View File

@ -6,6 +6,10 @@ const osFilters = [
{
label: 'linux',
value: 'linux'
},
{
label: 'freebsd',
value: 'freebsd'
}
];

View File

@ -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 });
});
});