aboutsummaryrefslogtreecommitdiffstats
path: root/frontend-vanilla/src/main.test.ts
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-16 08:59:56 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-16 08:59:56 -0800
commit1bed4bbd9a0606f9d3edfbf0ccfd1499793f8712 (patch)
tree07c7665ff374892f75fab8fcb4932936ef252a18 /frontend-vanilla/src/main.test.ts
parent466804699bf42e403913d2fb435327b554d537d1 (diff)
downloadneko-1bed4bbd9a0606f9d3edfbf0ccfd1499793f8712.tar.gz
neko-1bed4bbd9a0606f9d3edfbf0ccfd1499793f8712.tar.bz2
neko-1bed4bbd9a0606f9d3edfbf0ccfd1499793f8712.zip
Fix v3 theme contrast and sync with v2 colors, add v3 logo, and fix v2 test stability
- Sync v3 dark/light theme colors with v2 defaults - Fix v3 settings input/select contrast in dark mode - Add logo emoji to v3 sidebar - Fix duplicate key warnings and side-effect issues in FeedItems.tsx (v2) - Rebuild production assets
Diffstat (limited to 'frontend-vanilla/src/main.test.ts')
-rw-r--r--frontend-vanilla/src/main.test.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/frontend-vanilla/src/main.test.ts b/frontend-vanilla/src/main.test.ts
index c9d0e0c..3798f1b 100644
--- a/frontend-vanilla/src/main.test.ts
+++ b/frontend-vanilla/src/main.test.ts
@@ -65,10 +65,19 @@ describe('main application logic', () => {
it('renderLayout should create sidebar and main content', () => {
renderLayout();
expect(document.getElementById('sidebar')).not.toBeNull();
+ expect(document.querySelector('.logo')).not.toBeNull();
expect(document.getElementById('content-area')).not.toBeNull();
expect(document.getElementById('sidebar-toggle-btn')).not.toBeNull();
});
+ it('should navigate to home when clicking logo', () => {
+ renderLayout();
+ const logo = document.querySelector('.logo') as HTMLElement;
+ const navigateSpy = vi.spyOn(router, 'navigate');
+ logo.click();
+ expect(navigateSpy).toHaveBeenCalledWith('/', expect.any(Object));
+ });
+
it('renderFeeds should populate feed list', () => {
renderLayout();
store.setFeeds([{ _id: 1, title: 'Test Feed', url: 'test', web_url: 'test', category: 'tag' }]);