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 = ({
) : (
-
-
-
-
-
-
-
- ) : (
-
- )
- }
- onClick={handleExpandClick}
- />
-
-
+
+
{getGraph}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/profilerDashboard.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/profilerDashboard.interface.ts
index 0f6380e84e8..e647ccd53b6 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/profilerDashboard.interface.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/profilerDashboard.interface.ts
@@ -118,7 +118,6 @@ export interface DataQualityTabProps {
export interface TestSummaryProps {
data: TestCase;
showOnlyGraph?: boolean;
- showExpandIcon?: boolean;
}
export interface ProfilerLatestValueProps {
diff --git a/openmetadata-ui/src/main/resources/ui/src/constants/constants.ts b/openmetadata-ui/src/main/resources/ui/src/constants/constants.ts
index 3238156ece3..ddbf43c1159 100644
--- a/openmetadata-ui/src/main/resources/ui/src/constants/constants.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/constants/constants.ts
@@ -265,7 +265,6 @@ export const ROUTES = {
// Query Routes
QUERY_FULL_SCREEN_VIEW: `/query-view/${PLACEHOLDER_ROUTE_FQN}/${PLACEHOLDER_ROUTE_QUERY_ID}`,
- TEST_CASE_DETAILS: `/test-case/${PLACEHOLDER_ROUTE_FQN}`,
ADD_QUERY: `/query/${PLACEHOLDER_ROUTE_FQN}/add-query`,
// Tasks Routes
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TestCaseDetailsPage/TestCaseDetailsPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TestCaseDetailsPage/TestCaseDetailsPage.component.tsx
deleted file mode 100644
index ed1c543caf1..00000000000
--- a/openmetadata-ui/src/main/resources/ui/src/pages/TestCaseDetailsPage/TestCaseDetailsPage.component.tsx
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright 2023 Collate.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { Col, Layout, Row, Typography } from 'antd';
-import { AxiosError } from 'axios';
-import { has, isEmpty, isUndefined } from 'lodash';
-import React, { useEffect, useMemo, useState } from 'react';
-import { useTranslation } from 'react-i18next';
-import ErrorPlaceHolder from '../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder';
-import TitleBreadcrumb from '../../components/common/TitleBreadcrumb/TitleBreadcrumb.component';
-import TestSummary from '../../components/ProfilerDashboard/component/TestSummary';
-import { TestCase } from '../../generated/tests/testCase';
-import { useFqn } from '../../hooks/useFqn';
-import { DataQualityPageTabs } from '../../pages/DataQuality/DataQualityPage.interface';
-import { getTestCaseByFqn } from '../../rest/testAPI';
-import { formatDateTime } from '../../utils/date-time/DateTimeUtils';
-import { getEntityName } from '../../utils/EntityUtils';
-import { getDataQualityPagePath } from '../../utils/RouterUtils';
-import { showErrorToast } from '../../utils/ToastUtils';
-import './test-case-details-page.style.less';
-
-function TestCaseDetailsPage() {
- const { fqn: testCaseFQN } = useFqn();
- const { t } = useTranslation();
- const [testCaseData, setTestCaseData] = useState();
-
- const fetchTestCaseData = async () => {
- try {
- const response = await getTestCaseByFqn(testCaseFQN, {
- fields: ['testSuite', 'testCaseResult'],
- });
- setTestCaseData(response);
- } catch (error) {
- showErrorToast(
- error as AxiosError,
- t('server.entity-fetch-error', { entity: t('label.test-case') })
- );
- }
- };
-
- const breadcrumb = useMemo(() => {
- if (has(testCaseData, 'testSuite')) {
- return [
- {
- name: t('label.test-case-plural'),
- url: getDataQualityPagePath(DataQualityPageTabs.TEST_CASES),
- },
- {
- name: testCaseData?.name ?? '',
- url: '',
- activeTitle: true,
- },
- ];
- } else {
- return [];
- }
- }, [testCaseData]);
-
- const parameterValuesWithoutSqlExpression = useMemo(
- () =>
- testCaseData?.parameterValues && testCaseData.parameterValues.length > 0
- ? testCaseData.parameterValues.filter(
- (param) => param.name !== 'sqlExpression'
- )
- : undefined,
- [testCaseData?.parameterValues]
- );
-
- useEffect(() => {
- fetchTestCaseData();
- }, [testCaseFQN]);
-
- if (isUndefined(testCaseData)) {
- return ;
- }
-
- return (
-
-
-
-
-
-
-
-
-
-
-
- {getEntityName(testCaseData)}
-
-
-
-
-
-
- {`${t('label.last-run-result')}:`}
-
-
-
-
- {testCaseData.testCaseResult?.testCaseStatus ?? '--'}
-
-
-
-
- {`${t('label.last-run')}:`}
-
-
-
-
- {testCaseData.testCaseResult?.timestamp
- ? formatDateTime(testCaseData.testCaseResult?.timestamp)
- : '--'}
-
-
-
-
-
-
-
-
-
- {t('label.description')}
-
-
-
-
- {testCaseData.description
- ? testCaseData.description
- : t('label.no-description')}
-
-
-
-
-
-
-
-
-
- {t('label.parameter')}
-
-
-
- {!isEmpty(parameterValuesWithoutSqlExpression) &&
- !isUndefined(parameterValuesWithoutSqlExpression) ? (
-
- {parameterValuesWithoutSqlExpression.map((param) => (
-
-
- {`${param.name}:`}{' '}
-
- {param.value}
-
- ))}
-
- ) : (
-
- {t('label.no-parameter-available')}
-
- )}
-
-
-
-
-
-
- );
-}
-
-export default TestCaseDetailsPage;
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TestCaseDetailsPage/test-case-details-page.style.less b/openmetadata-ui/src/main/resources/ui/src/pages/TestCaseDetailsPage/test-case-details-page.style.less
deleted file mode 100644
index c96f3e78ddb..00000000000
--- a/openmetadata-ui/src/main/resources/ui/src/pages/TestCaseDetailsPage/test-case-details-page.style.less
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2023 Collate.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-@import url('../../styles/variables.less');
-
-.test-case-details-page-container {
- height: 100vh;
- background-color: @white;
-
- .test-case-details-page-right-panel {
- background-color: @white;
- border-left: @global-border;
- padding: 0px;
- overflow-y: auto;
- width: 360px;
- }
-}
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/RouterUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/RouterUtils.ts
index 141e52cadd7..d64afd352ae 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/RouterUtils.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/RouterUtils.ts
@@ -534,14 +534,6 @@ export const getGlossaryTermsVersionsPath = (
return path;
};
-export const getTestCaseDetailsPath = (testCaseFqn: string) => {
- let path = ROUTES.TEST_CASE_DETAILS;
-
- path = path.replace(PLACEHOLDER_ROUTE_FQN, getEncodedFqn(testCaseFqn));
-
- return path;
-};
-
export const getDataQualityPagePath = (tab?: DataQualityPageTabs) => {
let path = tab ? ROUTES.DATA_QUALITY_WITH_TAB : ROUTES.DATA_QUALITY;