Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
parent
f4600b8b79
commit
a9db66bd34
@ -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();
|
||||
|
@ -6,6 +6,10 @@ const osFilters = [
|
||||
{
|
||||
label: 'linux',
|
||||
value: 'linux'
|
||||
},
|
||||
{
|
||||
label: 'freebsd',
|
||||
value: 'freebsd'
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -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 });
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user