From 5556e249a89293144b6119b4961a371cd6fef563 Mon Sep 17 00:00:00 2001 From: Collin Fingar Date: Wed, 7 Jan 2026 16:04:17 -0500 Subject: [PATCH] Updated unit test --- .../extensions/DrilldownExtensionPoint.test.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/app/features/explore/extensions/DrilldownExtensionPoint.test.tsx b/public/app/features/explore/extensions/DrilldownExtensionPoint.test.tsx index 7d3fbc9e5e3..0a1208e2775 100644 --- a/public/app/features/explore/extensions/DrilldownExtensionPoint.test.tsx +++ b/public/app/features/explore/extensions/DrilldownExtensionPoint.test.tsx @@ -54,7 +54,7 @@ describe('DrilldownExtensionPoint', () => { render(); - expect(screen.getByRole('button', { name: 'Open in Drilldown' })).toBeVisible(); + expect(screen.getByRole('button', { name: 'Drilldown' })).toBeVisible(); }); it('should open the first queryless app link when button is clicked', async () => { @@ -74,7 +74,7 @@ describe('DrilldownExtensionPoint', () => { }); render(); - await user.click(screen.getByRole('button', { name: 'Open in Drilldown' })); + await user.click(screen.getByRole('button', { name: 'Drilldown' })); expect(mockGlobalOpen).toHaveBeenCalledTimes(1); expect(mockGlobalOpen).toHaveBeenCalledWith('http://localhost/a/grafana-pyroscope-app', '_blank'); @@ -105,7 +105,7 @@ describe('DrilldownExtensionPoint', () => { }); render(); - await user.click(screen.getByRole('button', { name: 'Open in Drilldown' })); + await user.click(screen.getByRole('button', { name: 'Drilldown' })); expect(mockGlobalOpen).toHaveBeenCalledWith('http://localhost/a/grafana-pyroscope-app', '_blank'); expect(mockGlobalOpen).toHaveBeenCalledTimes(1); @@ -156,7 +156,7 @@ describe('DrilldownExtensionPoint', () => { const { container } = render(); - expect(screen.queryByRole('button', { name: 'Open in Drilldown' })).not.toBeInTheDocument(); + expect(screen.queryByRole('button', { name: 'Drilldown' })).not.toBeInTheDocument(); expect(container.firstChild).toBeNull(); }); @@ -168,7 +168,7 @@ describe('DrilldownExtensionPoint', () => { const { container } = render(); - expect(screen.queryByRole('button', { name: 'Open in Drilldown' })).not.toBeInTheDocument(); + expect(screen.queryByRole('button', { name: 'Drilldown' })).not.toBeInTheDocument(); expect(container.firstChild).toBeNull(); }); @@ -188,7 +188,7 @@ describe('DrilldownExtensionPoint', () => { }); render(); - await user.click(screen.getByRole('button', { name: 'Open in Drilldown' })); + await user.click(screen.getByRole('button', { name: 'Drilldown' })); expect(mockGlobalOpen).not.toHaveBeenCalled(); });