mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 12:11:28 -07:00
Route OSD notifications through overlay with mpv fallback
- Add main/renderer overlay notification pipeline with loading-state support - Preserve notificationType semantics across osd/system/both/none routing - Update plugin fallback behavior, docs/config examples, and regression tests
This commit is contained in:
@@ -10,17 +10,14 @@ import {
|
||||
test('notify anilist setup main deps builder maps callbacks', () => {
|
||||
const calls: string[] = [];
|
||||
const deps = createBuildNotifyAnilistSetupMainDepsHandler({
|
||||
hasMpvClient: () => true,
|
||||
showMpvOsd: (message) => calls.push(`osd:${message}`),
|
||||
showDesktopNotification: (title) => calls.push(`notify:${title}`),
|
||||
showConfiguredNotification: (title, payload) =>
|
||||
calls.push(`configured:${title}:${payload.kind}:${payload.message}`),
|
||||
logInfo: (message) => calls.push(`log:${message}`),
|
||||
})();
|
||||
|
||||
assert.equal(deps.hasMpvClient(), true);
|
||||
deps.showMpvOsd('ok');
|
||||
deps.showDesktopNotification('SubMiner', { body: 'x' });
|
||||
deps.showConfiguredNotification('SubMiner', { kind: 'success', message: 'ok' });
|
||||
deps.logInfo('done');
|
||||
assert.deepEqual(calls, ['osd:ok', 'notify:SubMiner', 'log:done']);
|
||||
assert.deepEqual(calls, ['configured:SubMiner:success:ok', 'log:done']);
|
||||
});
|
||||
|
||||
test('consume anilist setup token main deps builder maps callbacks', () => {
|
||||
|
||||
Reference in New Issue
Block a user