Move search results into poster grid
This commit is contained in:
+21
@@ -292,6 +292,21 @@ class NetworkGuardTests(unittest.TestCase):
|
||||
self.assertEqual(handler.json_status, HTTPStatus.OK)
|
||||
remove_from_watchlist.assert_called_once_with("show-1")
|
||||
|
||||
def test_search_thumbnail_route_serves_cached_file(self):
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
image_path = Path(temp_dir) / "search-thumb.jpg"
|
||||
image_path.write_bytes(b"fake-image-data")
|
||||
handler = DummyHandler("/api/search/thumb?title=Demo")
|
||||
handler.handler_context = mock.Mock(
|
||||
ensure_runtime=mock.Mock(),
|
||||
runtime_state=mock.Mock(return_value={"config": {}}),
|
||||
resolve_search_thumbnail=mock.Mock(return_value=image_path),
|
||||
)
|
||||
|
||||
APP.Handler.do_GET(handler)
|
||||
|
||||
self.assertEqual(handler.file_path, image_path)
|
||||
|
||||
def test_loopback_proxy_with_forwarded_remote_ip_requires_credentials(self):
|
||||
handler = DummyHandler("/api/config")
|
||||
handler.client_address = ("127.0.0.1", 8421)
|
||||
@@ -3217,6 +3232,12 @@ class TemplateHelperTests(unittest.TestCase):
|
||||
self.assertIn('query: state.selected.title,', APP.INDEX_HTML)
|
||||
self.assertNotIn('index: state.selected.index,', APP.INDEX_HTML)
|
||||
|
||||
def test_search_page_renders_poster_results_under_selection_panel(self):
|
||||
self.assertIn('class="results-grid" id="results"', APP.INDEX_HTML)
|
||||
self.assertIn("Select results", APP.INDEX_HTML)
|
||||
self.assertIn("resultThumbnailUrl(title)", APP.INDEX_HTML)
|
||||
self.assertIn('/api/search/thumb?title=', APP.INDEX_HTML)
|
||||
|
||||
def test_pages_share_serial_polling_helper(self):
|
||||
self.assertIn("function startSerialPoll(callback, intervalMs)", APP.QUEUE_HTML)
|
||||
self.assertIn("function startSerialPoll(callback, intervalMs)", APP.WATCHLIST_HTML)
|
||||
|
||||
Reference in New Issue
Block a user