mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 03:16:46 -07:00
- Route default `subminer stats` through attached `--stats`; keep daemon path for `--background`/`--stop` - Update overview metrics: lookup rate uses lifetime Yomitan lookups per 100 tokens; new words dedupe by headword - Suppress repeated macOS `Overlay loading...` OSD during fullscreen tracker flaps and improve session-detail chart scaling - Add/adjust launcher, tracker query, stats server, IPC, overlay, and stats UI regression tests; add changelog fragments
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import assert from 'node:assert/strict';
|
|
import test from 'node:test';
|
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
import { MediaSessionList } from '../components/library/MediaSessionList';
|
|
|
|
test('MediaSessionList renders expandable session rows with delete affordance', () => {
|
|
const markup = renderToStaticMarkup(
|
|
<MediaSessionList
|
|
sessions={[
|
|
{
|
|
sessionId: 7,
|
|
canonicalTitle: 'Episode 7',
|
|
videoId: 9,
|
|
animeId: 3,
|
|
animeTitle: 'Anime',
|
|
startedAtMs: 0,
|
|
endedAtMs: null,
|
|
totalWatchedMs: 1_000,
|
|
activeWatchedMs: 900,
|
|
linesSeen: 12,
|
|
tokensSeen: 24,
|
|
cardsMined: 2,
|
|
lookupCount: 3,
|
|
lookupHits: 2,
|
|
yomitanLookupCount: 1,
|
|
knownWordsSeen: 6,
|
|
knownWordRate: 25,
|
|
},
|
|
]}
|
|
onDeleteSession={() => {}}
|
|
initialExpandedSessionId={7}
|
|
/>,
|
|
);
|
|
|
|
assert.match(markup, /Session History/);
|
|
assert.match(markup, /aria-expanded="true"/);
|
|
assert.match(markup, /Delete session Episode 7/);
|
|
assert.match(markup, /tokens/);
|
|
assert.match(markup, /No token data for this session/);
|
|
});
|