From 7cc22310907cf6f40aa8c7b61627c0d60a8fcc03 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 16 Oct 2025 23:11:29 +0000 Subject: [PATCH] =?UTF-8?q?Remove=20=E2=80=9COpen=20in=20search=20comparis?= =?UTF-8?q?on=E2=80=9D=20button=20from=20Query=20Details=20&=20Query=20Gro?= =?UTF-8?q?up=20Details=20(#396)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kishore Kumaar Natarajan Co-authored-by: Kishore Kumaar Natarajan (cherry picked from commit 67377d2c78a75f84ab3b0c522fb1c6c749cea678) Signed-off-by: github-actions[bot] --- .../pages/QueryDetails/QueryDetails.test.tsx | 13 ------- public/pages/QueryDetails/QueryDetails.tsx | 12 ------- .../__snapshots__/QueryDetails.test.tsx.snap | 34 ------------------- .../QueryGroupDetails.test.tsx | 14 -------- .../QueryGroupDetails/QueryGroupDetails.tsx | 12 ------- .../QueryGroupDetails.test.tsx.snap | 34 ------------------- 6 files changed, 119 deletions(-) diff --git a/public/pages/QueryDetails/QueryDetails.test.tsx b/public/pages/QueryDetails/QueryDetails.test.tsx index 99ea1927..8973ff96 100644 --- a/public/pages/QueryDetails/QueryDetails.test.tsx +++ b/public/pages/QueryDetails/QueryDetails.test.tsx @@ -122,19 +122,6 @@ describe('QueryDetails component', () => { }); }); - it('renders the search comparison button', async () => { - renderQueryDetails(); - - await waitFor(() => { - const button = screen.getByText('Open in search comparison'); - expect(button).toBeInTheDocument(); - expect(button.closest('a')).toHaveAttribute( - 'href', - 'https://playground.opensearch.org/app/searchRelevance#/' - ); - }); - }); - it('matches snapshot', async () => { const { container } = renderQueryDetails(); diff --git a/public/pages/QueryDetails/QueryDetails.tsx b/public/pages/QueryDetails/QueryDetails.tsx index 33ea5a85..f863c064 100644 --- a/public/pages/QueryDetails/QueryDetails.tsx +++ b/public/pages/QueryDetails/QueryDetails.tsx @@ -7,7 +7,6 @@ import React, { useCallback, useContext, useEffect, useState } from 'react'; // @ts-ignore import Plotly from 'plotly.js-dist'; import { - EuiButton, EuiCodeBlock, EuiFlexGrid, EuiFlexGroup, @@ -173,17 +172,6 @@ const QueryDetails = ({

Query

- - - Open in search comparison - - diff --git a/public/pages/QueryDetails/__snapshots__/QueryDetails.test.tsx.snap b/public/pages/QueryDetails/__snapshots__/QueryDetails.test.tsx.snap index 9769341b..09d17f3c 100644 --- a/public/pages/QueryDetails/__snapshots__/QueryDetails.test.tsx.snap +++ b/public/pages/QueryDetails/__snapshots__/QueryDetails.test.tsx.snap @@ -216,40 +216,6 @@ exports[`QueryDetails component matches snapshot 1`] = ` Query -
{ expect(document.getElementById('latency')).toBeInTheDocument(); }); - it('displays query details', async () => { - const { container } = renderComponent(); - - await waitFor(() => { - expect(screen.getByText('Open in search comparision')).toBeInTheDocument(); - }); - - const codeBlock = container.querySelector('.euiCodeBlock__pre'); - expect(codeBlock).toBeInTheDocument(); - - expect(codeBlock?.textContent).toContain('"query"'); - expect(codeBlock?.textContent).toMatch(/{\s*"query":/); - }); - it('renders tooltips', () => { renderComponent(); diff --git a/public/pages/QueryGroupDetails/QueryGroupDetails.tsx b/public/pages/QueryGroupDetails/QueryGroupDetails.tsx index 9fb632ce..c2411597 100644 --- a/public/pages/QueryGroupDetails/QueryGroupDetails.tsx +++ b/public/pages/QueryGroupDetails/QueryGroupDetails.tsx @@ -10,7 +10,6 @@ import Plotly from 'plotly.js-dist'; import { useHistory, useLocation } from 'react-router-dom'; import React, { useContext, useEffect, useState } from 'react'; import { - EuiButton, EuiCodeBlock, EuiFlexGrid, EuiFlexGroup, @@ -204,17 +203,6 @@ export const QueryGroupDetails = ({

Query

- - - Open in search comparision - - diff --git a/public/pages/QueryGroupDetails/__snapshots__/QueryGroupDetails.test.tsx.snap b/public/pages/QueryGroupDetails/__snapshots__/QueryGroupDetails.test.tsx.snap index 6143988c..779d3bf3 100644 --- a/public/pages/QueryGroupDetails/__snapshots__/QueryGroupDetails.test.tsx.snap +++ b/public/pages/QueryGroupDetails/__snapshots__/QueryGroupDetails.test.tsx.snap @@ -339,40 +339,6 @@ exports[`QueryGroupDetails matches snapshot 1`] = ` Query -