feat: copy output easily. also build fixes.

This commit is contained in:
2026-02-23 12:07:19 +01:00
parent caa3f3c061
commit bf945716f9
12 changed files with 135 additions and 7 deletions

View File

@@ -253,6 +253,40 @@ describe('Panel', () => {
expect(screen.getByText('hello from script')).toBeInTheDocument();
});
it('copies output entries from output tab with copy button', async () => {
const writeText = vi.fn().mockResolvedValue(undefined);
Object.defineProperty(globalThis, 'navigator', {
value: { clipboard: { writeText } },
configurable: true,
});
useAppStore.setState({
panelActiveTab: 'output',
panelOutputEntries: [
{
id: 'output-1',
message: 'pyodide.asm.js missing',
createdAt: '2026-02-22T00:00:00.000Z',
kind: 'error',
},
{
id: 'output-2',
message: 'second line',
createdAt: '2026-02-22T00:00:01.000Z',
kind: 'stdout',
},
],
});
render(<Panel />);
fireEvent.click(screen.getByRole('button', { name: 'Copy Output' }));
await vi.waitFor(() => {
expect(writeText).toHaveBeenCalledWith('pyodide.asm.js missing\n\nsecond line');
});
});
it('renders grouped tasks as expandable parent rows with child task names in tasks tab', async () => {
useAppStore.setState({
tasks: [