diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AppRouter/AuthenticatedAppRouter.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AppRouter/AuthenticatedAppRouter.tsx index a19a22b541a..86215bc8806 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AppRouter/AuthenticatedAppRouter.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AppRouter/AuthenticatedAppRouter.tsx @@ -307,13 +307,6 @@ const EditRulePage = withSuspenseFallback( ) ); -const TestCaseDetailsPage = withSuspenseFallback( - React.lazy( - () => - import('../../pages/TestCaseDetailsPage/TestCaseDetailsPage.component') - ) -); - const LogsViewer = withSuspenseFallback( React.lazy(() => import('../../pages/LogsViewer/LogsViewer.component')) ); @@ -1081,15 +1074,6 @@ const AuthenticatedAppRouter: FunctionComponent = () => { path={ROUTES.EDIT_OBSERVABILITY_ALERTS} /> - - + )} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/TestSummary.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/TestSummary.test.tsx index 765f4c4536c..74f4f36dde3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/TestSummary.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/TestSummary.test.tsx @@ -11,7 +11,6 @@ * limitations under the License. */ import { queryByAttribute, render, screen } from '@testing-library/react'; -import userEvent from '@testing-library/user-event'; import React from 'react'; import { MOCK_SQL_TEST_CASE, @@ -94,9 +93,6 @@ describe('TestSummary component', () => { expect( await screen.findByTestId('test-summary-container') ).toBeInTheDocument(); - expect( - await screen.findByTestId('test-case-expand-button') - ).toBeInTheDocument(); expect(await screen.findByTestId('params-container')).toBeInTheDocument(); expect(graphContainer).toBeInTheDocument(); expect(graph).toBeInTheDocument(); @@ -125,9 +121,6 @@ describe('TestSummary component', () => { expect( await screen.findByText('ErrorPlaceHolder.component') ).toBeInTheDocument(); - expect( - await screen.findByTestId('test-case-expand-button') - ).toBeInTheDocument(); expect(await screen.findByTestId('params-container')).toBeInTheDocument(); expect(await screen.findAllByTestId('parameter-value')).toHaveLength( @@ -143,30 +136,6 @@ describe('TestSummary component', () => { ).toBeInTheDocument(); }); - it('full screen button click should work', async () => { - render(); - - const fullScreenBtn = await screen.findByTestId('test-case-expand-button'); - - expect(fullScreenBtn).toBeInTheDocument(); - - userEvent.click(fullScreenBtn); - - expect(mockHistory.push).toHaveBeenCalled(); - }); - - it('minimize screen button click should work', async () => { - render(); - - const fullScreenBtn = await screen.findByTestId('test-case-expand-button'); - - expect(fullScreenBtn).toBeInTheDocument(); - - userEvent.click(fullScreenBtn); - - expect(mockHistory.goBack).toHaveBeenCalled(); - }); - it('default time range should be 30 days', async () => { const MockGetEpochMillisForPastDays = getEpochMillisForPastDays as jest.Mock; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/TestSummary.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/TestSummary.tsx index f9c6a2861bd..d628f01ffc0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/TestSummary.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/TestSummary.tsx @@ -11,7 +11,7 @@ * limitations under the License. */ -import { Button, Col, Row, Space, Typography } from 'antd'; +import { Col, Row, Space, Typography } from 'antd'; import { AxiosError } from 'axios'; import { t } from 'i18next'; import { @@ -25,7 +25,6 @@ import { uniqueId, } from 'lodash'; import { DateRangeObject } from 'Models'; -import Qs from 'qs'; import React, { ReactElement, useCallback, @@ -33,7 +32,6 @@ import React, { useMemo, useState, } from 'react'; -import { useHistory } from 'react-router-dom'; import { CartesianGrid, Legend, @@ -48,8 +46,6 @@ import { YAxis, } from 'recharts'; import { Payload } from 'recharts/types/component/DefaultLegendContent'; -import { ReactComponent as ExitFullScreen } from '../../../assets/svg/exit-full-screen.svg'; -import { ReactComponent as FullScreen } from '../../../assets/svg/full-screen.svg'; import { ReactComponent as FilterPlaceHolderIcon } from '../../../assets/svg/no-search-placeholder.svg'; import { GREEN_3, @@ -81,7 +77,6 @@ import { getCurrentMillis, getEpochMillisForPastDays, } from '../../../utils/date-time/DateTimeUtils'; -import { getTestCaseDetailsPath } from '../../../utils/RouterUtils'; import { showErrorToast } from '../../../utils/ToastUtils'; import { useActivityFeedProvider } from '../../ActivityFeed/ActivityFeedProvider/ActivityFeedProvider'; import ErrorPlaceHolder from '../../common/ErrorWithPlaceholder/ErrorPlaceHolder'; @@ -101,9 +96,8 @@ type ChartDataType = { const TestSummary: React.FC = ({ data, showOnlyGraph = false, - showExpandIcon = true, }) => { - const { entityThread } = useActivityFeedProvider(); + const { entityThread = [] } = useActivityFeedProvider(); const defaultRange = useMemo( () => ({ @@ -118,7 +112,6 @@ const TestSummary: React.FC = ({ }), [] ); - const history = useHistory(); const [results, setResults] = useState([]); const [dateRangeObject, setDateRangeObject] = useState( defaultRange.initialRange @@ -254,7 +247,7 @@ const TestSummary: React.FC = ({ setIsGraphLoading(true); try { const { data: chartData } = await getListTestCaseResults( - data.fullyQualifiedName || '', + data.fullyQualifiedName ?? '', pick(dateRangeObj, ['startTs', 'endTs']) ); @@ -436,29 +429,11 @@ const TestSummary: React.FC = ({ } }; - const handleExpandClick = () => { - if (data.fullyQualifiedName) { - if (showExpandIcon) { - history.push({ - search: Qs.stringify({ testCaseData: data }), - pathname: getTestCaseDetailsPath(data.fullyQualifiedName), - }); - } else { - history.goBack(); - } - } - }; - const showParameters = useMemo( () => !isUndefined(parameterValuesWithoutSqlExpression) && - !isEmpty(parameterValuesWithoutSqlExpression) && - showExpandIcon, - [ - parameterValuesWithSqlExpression, - parameterValuesWithoutSqlExpression, - showExpandIcon, - ] + !isEmpty(parameterValuesWithoutSqlExpression), + [parameterValuesWithSqlExpression, parameterValuesWithoutSqlExpression] ); const handleSelectedTimeRange = useCallback((range: string) => { @@ -472,31 +447,13 @@ const TestSummary: React.FC = ({ ) : ( - - - - - - -