Show Reddit recovery status in dashboard

This commit is contained in:
jjbrunton committed 2026-08-08 14:42:19 +01:00
1 parent d2b3a1b31d
commit 316dc3dd3e
6 files changed
+208 -5

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import fs from 'node:fs';
import path from 'node:path';
import { describe, expect, it } from 'vitest';
describe('dashboard Reddit session banner', () => {
it('renders a persistent recovery banner with a Reddit login action', () => {
const html = fs.readFileSync(path.resolve('public/index.html'), 'utf8');
expect(html).toContain('id="reddit-session-banner"');
expect(html).toContain('id="reddit-session-banner-title"');
expect(html).toContain('Open Reddit Login');
expect(html).toContain("data.status === 'unreachable'");
expect(html).toContain("data.status === 'login-required'");
expect(html).toContain('info.publicUrl');
});
});