mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-29 19:21:33 -07:00
eb5e07cfc0
- Add Search tab with realtime subtitle sentence search, media context, and mining actions - Persist library card size selection across reloads - Fix selection text written only for sentence cards, not word/audio cards - Fix word mining audio routed to SentenceAudio field when present - Fix sentence card created immediately before slow media generation completes - Fix Anki config resolved at request time for sentence mining - Prefer non-Signs/Songs tracks when auto-selecting secondary subtitle language
43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import assert from 'node:assert/strict';
|
|
import test from 'node:test';
|
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
import { TabBar } from '../components/layout/TabBar';
|
|
import { EpisodeList } from '../components/anime/EpisodeList';
|
|
|
|
test('TabBar renders Library instead of Anime for the media library tab', () => {
|
|
const markup = renderToStaticMarkup(<TabBar activeTab="overview" onTabChange={() => {}} />);
|
|
|
|
assert.doesNotMatch(markup, />Anime</);
|
|
assert.match(markup, />Overview</);
|
|
assert.match(markup, />Library</);
|
|
assert.match(markup, />Search</);
|
|
});
|
|
|
|
test('EpisodeList renders explicit episode detail button alongside quick peek row', () => {
|
|
const markup = renderToStaticMarkup(
|
|
<EpisodeList
|
|
episodes={[
|
|
{
|
|
videoId: 9,
|
|
episode: 9,
|
|
season: 1,
|
|
durationMs: 1,
|
|
endedMediaMs: null,
|
|
watched: 0,
|
|
canonicalTitle: 'Episode 9',
|
|
totalSessions: 1,
|
|
totalActiveMs: 1,
|
|
totalCards: 1,
|
|
totalTokensSeen: 350,
|
|
totalYomitanLookupCount: 7,
|
|
lastWatchedMs: 0,
|
|
},
|
|
]}
|
|
onOpenDetail={() => {}}
|
|
/>,
|
|
);
|
|
|
|
assert.match(markup, />Details</);
|
|
assert.match(markup, /Episode 9/);
|
|
});
|