Fix watchlist refresh progress fill

This commit is contained in:
Dymas
2026-08-18 19:56:38 +02:00
parent ba8e55bd97
commit 3e95252eb4
5 changed files with 18 additions and 8 deletions
+3 -1
View File
@@ -4304,8 +4304,10 @@ class TemplateHelperTests(unittest.TestCase):
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('role="progressbar"', APP.WATCHLIST_HTML)
self.assertIn("function refreshJobPercent(job)", APP.WATCHLIST_HTML)
self.assertIn('$("refreshJobFill").style.width = `${percent}%`;', APP.WATCHLIST_HTML)
self.assertIn('$("refreshJobFill").style.transform = `scaleX(${percent / 100})`;', APP.WATCHLIST_HTML)
self.assertIn('setAttribute("aria-valuenow", String(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)