diff --git a/public/app/features/connections/Connections.test.tsx b/public/app/features/connections/Connections.test.tsx index 15c5ee2b2de..b8a6971c725 100644 --- a/public/app/features/connections/Connections.test.tsx +++ b/public/app/features/connections/Connections.test.tsx @@ -103,9 +103,7 @@ describe('Connections', () => { renderPage(ROUTES.ConnectData, store); // We expect not to see the text that would be rendered by the core "Connect data" page - // (Instead we expect to see the default route "Datasources") - expect(await screen.findByText('Datasources')).toBeVisible(); - expect(await screen.findByText('Manage your existing datasource connections')).toBeVisible(); + expect(screen.queryByText('Data sources')).not.toBeInTheDocument(); expect(screen.queryByText('No results matching your query were found.')).not.toBeInTheDocument(); }); }); diff --git a/public/app/features/connections/Connections.tsx b/public/app/features/connections/Connections.tsx index 867cf1bdfd9..fe5bd7ce1d9 100644 --- a/public/app/features/connections/Connections.tsx +++ b/public/app/features/connections/Connections.tsx @@ -29,21 +29,25 @@ export default function Connections() { }} > - } /> + {/* Redirect to "Connect data" by default */} + } /> } /> - - - - - - {!isConnectDataPageOverriden && } + + + + + - {/* Default page */} - + {/* "Connect data" page - we don't register a route in case a plugin already registers a standalone page for it */} + {!isConnectDataPageOverriden && } + + {/* Not found */} + } /> );