test(web): restore App composition smokes
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 12s
Build ErsatzTV Image / decisions.md append-only (pull_request) Successful in 12s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 13s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 14s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 8m26s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 10m23s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped

Refs #247

Co-Authored-By: OpenAI Codex <codex@openai.com>
This commit is contained in:
2026-07-16 13:30:44 +02:00
co-authored by OpenAI Codex
parent bd84593cd1
commit 947c8aacd8
2 changed files with 32 additions and 4 deletions
+22
View File
@@ -87,6 +87,18 @@ describe('ChicoryTV SPA scaffold', () => {
expect(window.location.pathname).toBe('/app/schedules');
});
it('dispatches the Channel Builder from its initial route', async () => {
window.history.replaceState(null, '', '/app/new-channel');
render(<App />);
expect(
await screen.findByText('New Channel', { selector: '.ctv-builder-title' })
).toBeInTheDocument();
expect(screen.getByPlaceholderText('Search shows & movies…')).toBeInTheDocument();
expect(window.fetch).toHaveBeenCalledWith('/api/v1/channel-templates', expect.any(Object));
});
it('registers the multi-collection and rerun-collection nav entries', async () => {
render(<App />);
@@ -597,6 +609,16 @@ describe('ChicoryTV SPA scaffold', () => {
expect(window.location.search).toBe('?source=deep-link');
expect(window.fetch).toHaveBeenCalledWith('/api/v1/settings/ui', expect.any(Object));
});
it('dispatches the extracted Settings screen from an initial section sub-path', async () => {
window.history.replaceState(null, '', '/app/settings/scanner');
render(<App />);
expect(await screen.findByText('Background scanning of local libraries.')).toBeInTheDocument();
expect(window.location.pathname).toBe('/app/settings/scanner');
expect(window.fetch).toHaveBeenCalledWith('/api/v1/settings/scanner', expect.any(Object));
});
});
function jsonResponse(body: unknown, status = 200): Response {
+10 -4
View File
@@ -1,9 +1,15 @@
import { cleanup, fireEvent, render, screen } from '@testing-library/react';
import { afterEach, describe, expect, it, vi } from 'vitest';
import { ProgressBar } from './dataDisplay';
import { Toast, Tooltip } from './feedback';
import { Button, Checkbox, Input, Switch } from './forms';
import { Tabs } from './navigation';
import {
Button,
Checkbox,
Input,
ProgressBar,
Switch,
Tabs,
Toast,
Tooltip
} from '.';
describe('component primitives', () => {
afterEach(cleanup);