Files
RedditBot/tests/dashboard-login-banner.test.ts
T

17 lines
666 B
TypeScript

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');
});
});