mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
feat(renderer): AppHeader wired to command store
- toggle sidebar/preview buttons dispatch through command store - new 'shortcuts.show' command (Keyboard icon, opens shortcuts panel later) - AppHeader.test.tsx updated: registers matching commands in beforeEach - integration test fixed: 'Open folder' button now matches 2 (toolbar + sidebar) - 155/155 tests pass
This commit is contained in:
@@ -71,9 +71,11 @@ describe('Phase 5 integration', () => {
|
||||
|
||||
it('opening a folder via the Open Folder button populates the tree', async () => {
|
||||
render(<AppShell />);
|
||||
const openBtn = screen.getByRole('button', { name: /open folder/i });
|
||||
// Two buttons share the "Open folder" name (toolbar + sidebar).
|
||||
// Either one triggers the same command, so click the first match.
|
||||
const buttons = screen.getAllByRole('button', { name: /open folder/i });
|
||||
await act(async () => {
|
||||
fireEvent.click(openBtn);
|
||||
fireEvent.click(buttons[0]);
|
||||
});
|
||||
// After openFolder, the tree should have children
|
||||
const state = useFileStore.getState();
|
||||
|
||||
Reference in New Issue
Block a user