Add test case for filter

Signed-off-by: Ioannis Georgoulas <ioannis@paddle.com>
This commit is contained in:
Ioannis Georgoulas
2021-03-09 12:46:42 +00:00
parent 2ea6751e8c
commit 24b353dd20
@@ -134,6 +134,12 @@ describe('CatalogPage', () => {
fireEvent.click(getByText(/All/));
expect(await findByText(/All \(2\)/)).toBeInTheDocument();
});
it('should set initial filter correctly', async () => {
const { findByText } = renderWrapped(
<CatalogPage initiallySelectedFilter="all" />,
);
expect(await findByText(/All \(2\)/)).toBeInTheDocument();
});
// this test is for fixing the bug after favoriting an entity, the matching entities defaulting
// to "owned" filter and not based on the selected filter
it('should render the correct entities filtered on the selectedfilter', async () => {