Skip to content
Merged
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
3 changes: 0 additions & 3 deletions packages/extension/src/ui/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,5 @@ describe('App', () => {
const { App } = await import('./App.tsx');
render(<App />);
expect(screen.getByText('Kernel')).toBeInTheDocument();
expect(
screen.getByRole('button', { name: 'Launch Vat' }),
).toBeInTheDocument();
});
});
19 changes: 3 additions & 16 deletions packages/extension/src/ui/components/ControlPanel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@ import { describe, it, expect, vi, beforeEach } from 'vitest';
import { ControlPanel } from './ControlPanel.tsx';
import { KernelControls } from './KernelControls.tsx';
import { LaunchSubcluster } from './LaunchSubcluster.tsx';
import { LaunchVat } from './LaunchVat.tsx';
import { SubclustersTable } from './SubclustersTable.tsx';

vi.mock('./KernelControls.tsx', () => ({
KernelControls: vi.fn(() => <div data-testid="kernel-controls" />),
}));

vi.mock('./LaunchVat.tsx', () => ({
LaunchVat: vi.fn(() => <div data-testid="launch-vat" />),
}));

vi.mock('./LaunchSubcluster.tsx', () => ({
LaunchSubcluster: vi.fn(() => <div data-testid="launch-subcluster" />),
}));
Expand Down Expand Up @@ -44,14 +39,11 @@ describe('ControlPanel Component', () => {
it('renders all child components in correct order', () => {
render(<ControlPanel />);

const children = screen.getAllByTestId(
/-controls|-table|-vat|-subcluster$/u,
);
expect(children).toHaveLength(4);
const children = screen.getAllByTestId(/-controls|-table|-subcluster$/u);
expect(children).toHaveLength(3);
expect(children[0]).toHaveAttribute('data-testid', 'kernel-controls');
expect(children[1]).toHaveAttribute('data-testid', 'subclusters-table');
expect(children[2]).toHaveAttribute('data-testid', 'launch-vat');
expect(children[3]).toHaveAttribute('data-testid', 'launch-subcluster');
expect(children[2]).toHaveAttribute('data-testid', 'launch-subcluster');
});

it('renders header section with correct class', () => {
Expand All @@ -70,11 +62,6 @@ describe('ControlPanel Component', () => {
expect(SubclustersTable).toHaveBeenCalled();
});

it('renders LaunchVat component', () => {
render(<ControlPanel />);
expect(LaunchVat).toHaveBeenCalled();
});

it('renders LaunchSubcluster component', () => {
render(<ControlPanel />);
expect(LaunchSubcluster).toHaveBeenCalled();
Expand Down
2 changes: 0 additions & 2 deletions packages/extension/src/ui/components/ControlPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { KernelControls } from './KernelControls.tsx';
import { LaunchSubcluster } from './LaunchSubcluster.tsx';
import { LaunchVat } from './LaunchVat.tsx';
import { SubclustersTable } from './SubclustersTable.tsx';
import styles from '../App.module.css';

Expand All @@ -12,7 +11,6 @@ export const ControlPanel: React.FC = () => {
<KernelControls />
</div>
<SubclustersTable />
<LaunchVat />
<LaunchSubcluster />
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const mockUseKernelActions = (overrides = {}): void => {
terminateAllVats: vi.fn(),
clearState: vi.fn(),
reload: vi.fn(),
launchVat: vi.fn(),
collectGarbage: vi.fn(),
launchSubcluster: vi.fn(),
...overrides,
Expand All @@ -37,10 +36,7 @@ const mockUseKernelActions = (overrides = {}): void => {

const mockUseVats = (vats: VatRecord[] = []): void => {
vi.mocked(useVats).mockReturnValue({
groupedVats: {
subclusters: [],
rogueVats: vats,
},
subclusters: [],
pingVat: vi.fn(),
restartVat: vi.fn(),
terminateVat: vi.fn(),
Expand Down
187 changes: 0 additions & 187 deletions packages/extension/src/ui/components/LaunchVat.test.tsx

This file was deleted.

72 changes: 0 additions & 72 deletions packages/extension/src/ui/components/LaunchVat.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ describe('MessagePanel Component', () => {
collectGarbage: vi.fn(),
clearState: vi.fn(),
reload: vi.fn(),
launchVat: vi.fn(),
launchSubcluster: vi.fn(),
});
vi.mocked(usePanelContext).mockReturnValue({
Expand Down
Loading
Loading