Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import { ClusterDropZone } from '../ClusterDropZone'

describe('ClusterDropZone', () => {
it('renders without crashing', () => {
const { container } = render(<ClusterDropZone {...({} as any)} />)
const { container } = render(<ClusterDropZone isDragging={false} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import CrossClusterPolicyComparison from '../CrossClusterPolicyComparison'

describe('CrossClusterPolicyComparison', () => {
it('renders without crashing', () => {
const { container } = render(<CrossClusterPolicyComparison {...({} as any)} />)
const { container } = render(<CrossClusterPolicyComparison/ />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ import { DeploymentIssues } from '../DeploymentIssues'

describe('DeploymentIssues', () => {
it('renders without crashing', () => {
const { container } = render(<DeploymentIssues {...({} as any)} />)
const { container } = render(<DeploymentIssues/ />)
expect(container).toBeTruthy()
})
})
2 changes: 1 addition & 1 deletion web/src/components/cards/__tests__/NamespaceRBAC.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ import { NamespaceRBAC } from '../NamespaceRBAC'

describe('NamespaceRBAC', () => {
it('renders without crashing', () => {
const { container } = render(<NamespaceRBAC {...({} as any)} />)
const { container } = render(<NamespaceRBAC/ />)
expect(container).toBeTruthy()
})
})
2 changes: 1 addition & 1 deletion web/src/components/cards/__tests__/SecurityIssues.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ import { SecurityIssues } from '../SecurityIssues'

describe('SecurityIssues', () => {
it('renders without crashing', () => {
const { container } = render(<SecurityIssues {...({} as any)} />)
const { container } = render(<SecurityIssues/ />)
expect(container).toBeTruthy()
})
})
2 changes: 1 addition & 1 deletion web/src/components/cards/__tests__/ServiceExports.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ import { ServiceExports } from '../ServiceExports'

describe('ServiceExports', () => {
it('renders without crashing', () => {
const { container } = render(<ServiceExports {...({} as any)} />)
const { container } = render(<ServiceExports/ />)
expect(container).toBeTruthy()
})
})
2 changes: 1 addition & 1 deletion web/src/components/cards/__tests__/ServiceImports.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import { ServiceImports } from '../ServiceImports'

describe('ServiceImports', () => {
it('renders without crashing', () => {
const { container } = render(<ServiceImports {...({} as any)} />)
const { container } = render(<ServiceImports/ />)
expect(container).toBeTruthy()
})
})
2 changes: 1 addition & 1 deletion web/src/components/cards/__tests__/TopPods.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ import { TopPods } from '../TopPods'

describe('TopPods', () => {
it('renders without crashing', () => {
const { container } = render(<TopPods {...({} as any)} />)
const { container } = render(<TopPods/ />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { PolicyViolationDetailModal } from '../PolicyViolationDetailModal'

describe('PolicyViolationDetailModal', () => {
it('renders without crashing', () => {
const { container } = render(<PolicyViolationDetailModal isOpen={false} onClose={() => {}} violation={{} as any} />)
const { container } = render(<PolicyViolationDetailModal isOpen={false} onClose={() => {}} violation={null} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { GitOpsDriftDetailModal } from '../GitOpsDriftDetailModal'

describe('GitOpsDriftDetailModal', () => {
it('renders without crashing', () => {
const { container } = render(<GitOpsDriftDetailModal isOpen={false} onClose={() => {}} drift={{} as any} />)
const { container } = render(<GitOpsDriftDetailModal isOpen={false} onClose={() => {}} drift={null} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { InsightSourceBadge } from '../InsightSourceBadge'

describe('InsightSourceBadge', () => {
it('renders without crashing', () => {
const { container } = render(<InsightSourceBadge {...({} as any)} />)
const { container } = render(<InsightSourceBadge source="heuristic" />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import HorseshoeGauge from '../HorseshoeGauge'

describe('HorseshoeGauge', () => {
it('renders without crashing', () => {
const { container } = render(<HorseshoeGauge {...({} as any)} />)
const { container } = render(<HorseshoeGauge value={50} label="CPU" />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import PortalTooltip from '../PortalTooltip'

describe('PortalTooltip', () => {
it('renders without crashing', () => {
const { container } = render(<PortalTooltip {...({} as any)} />)
const { container } = render(<PortalTooltip content="tooltip text">trigger</PortalTooltip>)
expect(container).toBeTruthy()
})
})
2 changes: 1 addition & 1 deletion web/src/components/cards/rss/__tests__/RSSFeed.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ import { RSSFeed } from '../RSSFeed'

describe('RSSFeed', () => {
it('renders without crashing', () => {
const { container } = render(<RSSFeed {...({} as any)} />)
const { container } = render(<RSSFeed/ />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { CPUDetailModal } from '../ResourceDetailModals'

describe('CPUDetailModal', () => {
it('renders without crashing', () => {
const { container } = render(<CPUDetailModal {...({} as any)} />)
const { container } = render(<CPUDetailModal clusterName="test" onClose={vi.fn()} totalCores={4} allocatableCores={4} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { EmptyClusterState } from '../EmptyClusterState'

describe('EmptyClusterState', () => {
it('renders without crashing', () => {
const { container } = render(<EmptyClusterState {...({} as any)} />)
const { container } = render(<EmptyClusterState onAddCluster={vi.fn()} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,42 @@ import { ConnectTab } from '../ConnectTab'

describe('ConnectTab', () => {
it('renders without crashing', () => {
const { container } = render(<ConnectTab {...({} as any)} />)
const { container } = render(
<ConnectTab
connectStep={1}
setConnectStep={vi.fn()}
connectState="idle"
serverUrl=""
setServerUrl={vi.fn()}
authType="token"
setAuthType={vi.fn()}
token=""
setToken={vi.fn()}
certData=""
setCertData={vi.fn()}
keyData=""
setKeyData={vi.fn()}
caData=""
setCaData={vi.fn()}
skipTls={false}
setSkipTls={vi.fn()}
contextName=""
setContextName={vi.fn()}
clusterName=""
setClusterName={vi.fn()}
namespace=""
setNamespace={vi.fn()}
testResult={null}
connectError=""
showAdvanced={false}
setShowAdvanced={vi.fn()}
selectedCloudProvider="eks"
setSelectedCloudProvider={vi.fn()}
goToConnectStep={vi.fn()}
handleTestConnection={vi.fn()}
handleAddCluster={vi.fn()}
/>
)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { CopyButton } from '../CopyButton'

describe('CopyButton', () => {
it('renders without crashing', () => {
const { container } = render(<CopyButton {...({} as any)} />)
const { container } = render(<CopyButton text="test" />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { PostConnectBanner } from '../PostConnectBanner'

describe('PostConnectBanner', () => {
it('renders without crashing', () => {
const { container } = render(<PostConnectBanner {...({} as any)} />)
const { container } = render(<PostConnectBanner onRunHealthCheck={vi.fn()} onExploreClusters={vi.fn()} onSetupAlerts={vi.fn()} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import ComplianceDrillDown from '../ComplianceDrillDown'

describe('ComplianceDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<ComplianceDrillDown data={{ filterStatus: '' } as any} />)
const { container } = render(<ComplianceDrillDown data={{ filterStatus: '' }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import { ConfigMapDrillDown } from '../ConfigMapDrillDown'

describe('ConfigMapDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<ConfigMapDrillDown data={{ cluster: 'c1', namespace: 'ns1', configmap: 'cm1' } as any} />)
const { container } = render(<ConfigMapDrillDown data={{ cluster: 'c1', namespace: 'ns1', configmap: 'cm1' }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import CostDrillDown from '../CostDrillDown'

describe('CostDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<CostDrillDown data={{ cluster: 'c1' } as any} />)
const { container } = render(<CostDrillDown data={{ cluster: 'c1' }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import { DeploymentDrillDown } from '../DeploymentDrillDown'

describe('DeploymentDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<DeploymentDrillDown data={{ cluster: 'c1', namespace: 'ns1', deployment: 'dep1', replicas: 1 } as any} />)
const { container } = render(<DeploymentDrillDown data={{ cluster: 'c1', namespace: 'ns1', deployment: 'dep1', replicas: 1 }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { EventsDrillDown } from '../EventsDrillDown'

describe('EventsDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<EventsDrillDown data={{ cluster: 'c1', namespace: 'ns1', events: [] } as any} />)
const { container } = render(<EventsDrillDown data={{ cluster: 'c1', namespace: 'ns1', events: [] }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { GPUNamespaceDrillDown } from '../GPUNamespaceDrillDown'

describe('GPUNamespaceDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<GPUNamespaceDrillDown data={{ namespace: 'ns1', clusters: ['c1'] } as any} />)
const { container } = render(<GPUNamespaceDrillDown data={{ namespace: 'ns1', clusters: ['c1'] }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { GPUNodeDrillDown } from '../GPUNodeDrillDown'

describe('GPUNodeDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<GPUNodeDrillDown data={{ cluster: 'c1', node: 'n1', gpuType: 'A100', gpuCount: 1, gpuAllocated: 0 } as any} />)
const { container } = render(<GPUNodeDrillDown data={{ cluster: 'c1', node: 'n1', gpuType: 'A100', gpuCount: 1, gpuAllocated: 0 }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { LogsDrillDown } from '../LogsDrillDown'

describe('LogsDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<LogsDrillDown data={{ cluster: 'c1', namespace: 'ns1', pod: 'pod1' } as any} />)
const { container } = render(<LogsDrillDown data={{ cluster: 'c1', namespace: 'ns1', pod: 'pod1' }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import { MultiClusterSummaryDrillDown } from '../MultiClusterSummaryDrillDown'

describe('MultiClusterSummaryDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<MultiClusterSummaryDrillDown data={{ filter: '' } as any} />)
const { container } = render(<MultiClusterSummaryDrillDown data={{ filter: '' }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import { NamespaceDrillDown } from '../NamespaceDrillDown'

describe('NamespaceDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<NamespaceDrillDown data={{ cluster: 'c1', namespace: 'ns1' } as any} />)
const { container } = render(<NamespaceDrillDown data={{ cluster: 'c1', namespace: 'ns1' }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import { NodeDrillDown } from '../NodeDrillDown'

describe('NodeDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<NodeDrillDown data={{ cluster: 'c1', node: 'node1' } as any} />)
const { container } = render(<NodeDrillDown data={{ cluster: 'c1', node: 'node1' }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import { PodDrillDown } from '../PodDrillDown'

describe('PodDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<PodDrillDown data={{ cluster: 'c1', namespace: 'ns1', pod: 'pod1', status: 'Running' } as any} />)
const { container } = render(<PodDrillDown data={{ cluster: 'c1', namespace: 'ns1', pod: 'pod1', status: 'Running' }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import { RBACDrillDown } from '../RBACDrillDown'

describe('RBACDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<RBACDrillDown data={{ cluster: 'c1', subject: 'user1', type: 'User', items: [] } as any} />)
const { container } = render(<RBACDrillDown data={{ cluster: 'c1', subject: 'user1', type: 'User', items: [] }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import { ReplicaSetDrillDown } from '../ReplicaSetDrillDown'

describe('ReplicaSetDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<ReplicaSetDrillDown data={{ cluster: 'c1', namespace: 'ns1', replicaset: 'rs1' } as any} />)
const { container } = render(<ReplicaSetDrillDown data={{ cluster: 'c1', namespace: 'ns1', replicaset: 'rs1' }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { ResourcesDrillDown } from '../ResourcesDrillDown'

describe('ResourcesDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<ResourcesDrillDown {...({} as any)} />)
const { container } = render(<ResourcesDrillDown data={{}} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import { SecretDrillDown } from '../SecretDrillDown'

describe('SecretDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<SecretDrillDown data={{ cluster: 'c1', namespace: 'ns1', secret: 'sec1' } as any} />)
const { container } = render(<SecretDrillDown data={{ cluster: 'c1', namespace: 'ns1', secret: 'sec1' }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import { ServiceAccountDrillDown } from '../ServiceAccountDrillDown'

describe('ServiceAccountDrillDown', () => {
it('renders without crashing', () => {
const { container } = render(<ServiceAccountDrillDown data={{ cluster: 'c1', namespace: 'ns1', serviceaccount: 'sa1' } as any} />)
const { container } = render(<ServiceAccountDrillDown data={{ cluster: 'c1', namespace: 'ns1', serviceaccount: 'sa1' }} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { PodAiAnalysis } from '../PodAiAnalysis'

describe('PodAiAnalysis', () => {
it('renders without crashing', () => {
const { container } = render(<PodAiAnalysis {...({} as any)} />)
const { container } = render(<PodAiAnalysis aiAnalysis={null} aiAnalysisLoading={false} fetchAiAnalysis={vi.fn()} handleRepairPod={vi.fn()} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { PodDeleteSection } from '../PodDeleteSection'

describe('PodDeleteSection', () => {
it('renders without crashing', () => {
const { container } = render(<PodDeleteSection {...({} as any)} />)
const { container } = render(<PodDeleteSection podName="pod1" agentConnected={false} canDeletePod={null} deletingPod={false} deleteError={null} showDeletePodConfirm={false} setShowDeletePodConfirm={vi.fn()} isManagedPod={false} handleDeletePod={vi.fn()} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { PodLabelsTab } from '../PodLabelsTab'

describe('PodLabelsTab', () => {
it('renders without crashing', () => {
const { container } = render(<PodLabelsTab {...({} as any)} />)
const { container } = render(<PodLabelsTab labels={null} annotations={null} describeLoading={false} agentConnected={false} copiedField={null} showAllLabels={false} setShowAllLabels={vi.fn()} editingLabels={false} setEditingLabels={vi.fn()} labelDraft={{}} setLabelDraft={vi.fn()} labelSaveError={null} setLabelSaveError={vi.fn()} isSavingLabels={false} handleSaveLabels={vi.fn()} />)
expect(container).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { PodOutputTab } from '../PodOutputTab'

describe('PodOutputTab', () => {
it('renders without crashing', () => {
const { container } = render(<PodOutputTab {...({} as any)} />)
const { container } = render(<PodOutputTab output={null} loading={false} agentConnected={false} copyField="logs" copiedField={null} kubectlComment="" loadingMessage="" />)
expect(container).toBeTruthy()
})
})
Loading
Loading