Show watchlist refresh progress as a single bar

This commit is contained in:
Dymas
2026-08-18 08:48:13 +02:00
parent d663318f27
commit ba8e55bd97
5 changed files with 89 additions and 7 deletions
+9
View File
@@ -4301,6 +4301,15 @@ class TemplateHelperTests(unittest.TestCase):
self.assertIn("else if (state.queuedCount > 0)", APP.WATCHLIST_HTML)
self.assertIn("fetchWatchlist(state.watchlistPage, { silent: true })", APP.WATCHLIST_HTML)
def test_watchlist_page_renders_single_refresh_progress_bar(self):
self.assertIn('class="refresh-progress" id="refreshJobStatus"', APP.WATCHLIST_HTML)
self.assertIn('class="refresh-progress-fill" id="refreshJobFill"', APP.WATCHLIST_HTML)
self.assertIn("function refreshJobPercent(job)", APP.WATCHLIST_HTML)
self.assertIn('$("refreshJobFill").style.width = `${percent}%`;', APP.WATCHLIST_HTML)
self.assertIn('`Refreshing ${job.current_title}`', APP.WATCHLIST_HTML)
self.assertEqual(APP.WATCHLIST_HTML.count('id="refreshJobStatus"'), 1)
self.assertNotIn("refreshed${job.current_title", APP.WATCHLIST_HTML)
def test_watchlist_page_highlights_fully_ready_cards(self):
self.assertIn(".anime-card.fully-ready", APP.WATCHLIST_HTML)
self.assertIn("const isFullyReady = item.sub_complete && item.dub_complete;", APP.WATCHLIST_HTML)