mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
fix(polish): address 3 review blockers + 1 security issue
1. ThemeSettings: change 'auto' radio value to 'system' to match the v5 settingsSchema enum. Storing 'auto' silently wipes all settings on next launch. 2. UpdateBanner: render an 'available' branch so users see a CTA when a new version is detected (the store already had this state, but the banner was silent). Added a test. 3. feed-config: remove the unused resolveFeedUrl / FEEDS exports. feedConfigFor is the actual implementation used by the IPC handler. Updated tests to match. 4. main/index.js: tighten app:open-external regex to https:// only.
This commit is contained in:
@@ -40,10 +40,17 @@ describe('UpdateBanner', () => {
|
||||
expect(screen.getByText(/couldn.?t check/i)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('shows download CTA when state is available', () => {
|
||||
useUpdaterStore.setState({ state: 'available', version: '5.0.2' });
|
||||
render(<UpdateBanner />);
|
||||
expect(screen.getByText(/5\.0\.2/)).toBeInTheDocument();
|
||||
expect(screen.getByText(/download/i)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('restart button calls ipc.updater.install', () => {
|
||||
useUpdaterStore.setState({ state: 'ready', version: '5.0.2' });
|
||||
render(<UpdateBanner />);
|
||||
fireEvent.click(screen.getByRole('button', { name: /restart/i }));
|
||||
expect(useUpdaterStore.getState().install).toBeDefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user