feat: style editor for blog

This commit is contained in:
2026-02-20 20:24:37 +01:00
parent 23facaa36d
commit eeffa247bb
33 changed files with 817 additions and 32 deletions

View File

@@ -156,4 +156,26 @@ describe('Pages shortcut UI', () => {
expect(wrappers.length).toBeGreaterThanOrEqual(2);
expect((wrappers[0] as HTMLElement).style.display).toBe('flex');
});
it('opens style tab from settings sidebar navigation', async () => {
useAppStore.setState({
sidebarVisible: true,
tabs: [],
activeTabId: null,
});
useAppStore.getState().setActiveView('settings');
render(<Sidebar />);
const styleButton = await screen.findByRole('button', { name: /style/i });
styleButton.click();
const state = useAppStore.getState();
expect(state.tabs).toEqual(
expect.arrayContaining([
expect.objectContaining({ type: 'style', id: 'style' }),
])
);
expect(state.activeTabId).toBe('style');
});
});