diff --git a/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx b/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx
index 598f534d14..b462cfb6b6 100644
--- a/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx
+++ b/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx
@@ -248,13 +248,17 @@ describe('CatalogPage', () => {
it('should wrap filter in drawer on smaller screens', async () => {
mockBreakpoint({ matches: true });
- const { getByTestId } = await renderWrapped();
- expect(getByTestId('entity-filters-drawer')).toBeInTheDocument();
+ const { getAllByText } = await renderWrapped();
+ const elems = getAllByText('Filters');
+ expect(elems[0]).toBeVisible();
+ expect(elems[1]).not.toBeVisible();
+ fireEvent.click(elems[0]);
+ expect(elems[1]).toBeVisible();
});
it('should wrap filter in grid on larger screens', async () => {
mockBreakpoint({ matches: false });
- const { getByTestId } = await renderWrapped();
- expect(getByTestId('entity-filters-grid')).toBeInTheDocument();
+ const { queryAllByText } = await renderWrapped();
+ expect(queryAllByText('Filters').length).toBe(0);
});
});
diff --git a/plugins/catalog/src/components/FilteredEntityLayout/FilterContainer.tsx b/plugins/catalog/src/components/FilteredEntityLayout/FilterContainer.tsx
index f21f9c77a3..683dbf8b40 100644
--- a/plugins/catalog/src/components/FilteredEntityLayout/FilterContainer.tsx
+++ b/plugins/catalog/src/components/FilteredEntityLayout/FilterContainer.tsx
@@ -44,7 +44,6 @@ export const FilterContainer = ({ children }: PropsWithChildren<{}>) => {
Filters
setFilterDrawerOpen(false)}
anchor="left"
@@ -65,7 +64,7 @@ export const FilterContainer = ({ children }: PropsWithChildren<{}>) => {
>
) : (
-
+
{children}
);