From 24b353dd2004620d2631457fbd064d4e0db02a5f Mon Sep 17 00:00:00 2001 From: Ioannis Georgoulas Date: Tue, 9 Mar 2021 12:46:42 +0000 Subject: [PATCH] Add test case for filter Signed-off-by: Ioannis Georgoulas --- .../catalog/src/components/CatalogPage/CatalogPage.test.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx b/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx index accfe6eda4..03f211a7bb 100644 --- a/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx +++ b/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx @@ -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( + , + ); + 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 () => {