diff --git a/web/app/components/app-sidebar/app-info/__tests__/app-info-detail-panel.spec.tsx b/web/app/components/app-sidebar/app-info/__tests__/app-info-detail-panel.spec.tsx index 3082eb3789..1bfae24094 100644 --- a/web/app/components/app-sidebar/app-info/__tests__/app-info-detail-panel.spec.tsx +++ b/web/app/components/app-sidebar/app-info/__tests__/app-info-detail-panel.spec.tsx @@ -2,7 +2,7 @@ import type { App, AppSSO } from '@/types/app' import { render, screen } from '@testing-library/react' import userEvent from '@testing-library/user-event' import * as React from 'react' -import { AppModeEnum } from '@/types/app' +import { AppModeEnum, AppTypeEnum } from '@/types/app' import AppInfoDetailPanel from '../app-info-detail-panel' vi.mock('../../../base/app-icon', () => ({ @@ -135,6 +135,17 @@ describe('AppInfoDetailPanel', () => { expect(cardView).toHaveAttribute('data-app-id', 'app-1') }) + it('should not render CardView when app type is evaluation', () => { + render( + , + ) + + expect(screen.queryByTestId('card-view')).not.toBeInTheDocument() + }) + it('should render app icon with large size', () => { render() const icon = screen.getByTestId('app-icon') diff --git a/web/app/components/app-sidebar/app-info/app-info-detail-panel.tsx b/web/app/components/app-sidebar/app-info/app-info-detail-panel.tsx index 4aacc0cdb1..43c5711490 100644 --- a/web/app/components/app-sidebar/app-info/app-info-detail-panel.tsx +++ b/web/app/components/app-sidebar/app-info/app-info-detail-panel.tsx @@ -15,7 +15,7 @@ import { useTranslation } from 'react-i18next' import CardView from '@/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/card-view' import Button from '@/app/components/base/button' import ContentDialog from '@/app/components/base/content-dialog' -import { AppModeEnum } from '@/types/app' +import { AppModeEnum, AppTypeEnum } from '@/types/app' import AppIcon from '../../base/app-icon' import { getAppModeLabel } from './app-mode-labels' import AppOperations from './app-operations' @@ -126,11 +126,13 @@ const AppInfoDetailPanel = ({ secondaryOperations={secondaryOperations} /> - + {appDetail.type !== AppTypeEnum.EVALUATION && ( + + )} {switchOperation && (