test(renderer): assert toggled standalone value in ExportHtmlDialog test

This commit is contained in:
2026-06-05 19:28:44 +05:30
parent 9de14df016
commit 76fed872ce
@@ -25,12 +25,11 @@ describe('ExportHtmlDialog', () => {
it('toggles standalone and submits with chosen highlight', async () => {
render(<ExportHtmlDialog sourcePath="/test.md" />);
await userEvent.click(screen.getByRole('checkbox', { name: /standalone/i }));
await userEvent.click(screen.getByRole('checkbox', { name: /standalone/i }));
await userEvent.click(screen.getByRole('combobox', { name: /highlight/i }));
await userEvent.click(screen.getByRole('option', { name: /monokai/i }));
await userEvent.click(screen.getByRole('button', { name: /^export$/i }));
const call = (window.electronAPI.export.html as any).mock.calls[0][0];
expect(call.standalone).toBe(true);
expect(call.standalone).toBe(false);
expect(call.highlightStyle).toBe('monokai');
});
});