diff --git a/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.test.tsx b/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.test.tsx index 7b3a73673e..52def47f7c 100644 --- a/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.test.tsx +++ b/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.test.tsx @@ -79,7 +79,9 @@ describe('', () => { ); await waitFor(() => { - expect(getByText('my-namespace/group-a')).toBeInTheDocument(); + expect( + getByText('my-namespace/group-a', { selector: 'div' }), + ).toBeInTheDocument(); }); }); @@ -93,7 +95,9 @@ describe('', () => { mountedRoutes, ); - await waitFor(() => expect(getByText('Our Teams')).toBeInTheDocument()); + await waitFor(() => + expect(getByText('Our Teams', { selector: 'h2' })).toBeInTheDocument(), + ); }); it('renders a friendly error if it cannot collect domains', async () => {