chore: phase 2 and 3 refactors

This commit is contained in:
2026-02-21 18:02:20 +01:00
parent 40892b9302
commit 87200a8ad9
24 changed files with 411 additions and 74 deletions

View File

@@ -142,7 +142,7 @@ describe('Pages shortcut UI', () => {
expect(window.electronAPI.posts.filter).not.toHaveBeenCalledWith({ categories: ['page'] });
});
it('uses a flex-height wrapper for active posts/pages sidebar view', async () => {
it('conditionally mounts only the active posts/pages sidebar content', async () => {
useAppStore.setState({
activeView: 'posts',
sidebarVisible: true,
@@ -153,8 +153,7 @@ describe('Pages shortcut UI', () => {
expect(await screen.findByText('POSTS')).toBeInTheDocument();
const wrappers = container.querySelectorAll('.sidebar > div');
expect(wrappers.length).toBeGreaterThanOrEqual(2);
expect((wrappers[0] as HTMLElement).style.display).toBe('flex');
expect(wrappers.length).toBe(1);
});
it('opens style tab from settings sidebar navigation', async () => {