mirror of
https://github.com/anten-ka/gotelegram_pro.git
synced 2026-05-19 13:26:02 +00:00
v2.5.0: add admin auto refresh toggle
This commit is contained in:
@@ -199,6 +199,19 @@ class AdminFeatureTests(unittest.TestCase):
|
||||
self.assertIn('class="keys-list" id="usersTable"', index)
|
||||
self.assertNotIn('class="keys-table"', index)
|
||||
|
||||
def test_topbar_has_five_second_auto_refresh_toggle(self):
|
||||
app_js = (ROOT / "admin-web" / "static" / "app.js").read_text(encoding="utf-8")
|
||||
styles = (ROOT / "admin-web" / "static" / "styles.css").read_text(encoding="utf-8")
|
||||
index = (ROOT / "admin-web" / "static" / "index.html").read_text(encoding="utf-8")
|
||||
|
||||
self.assertIn('id="autoRefreshToggle"', index)
|
||||
self.assertIn('data-i18n-title="autoRefresh"', index)
|
||||
self.assertIn("gotelegram-auto-refresh", app_js)
|
||||
self.assertIn("AUTO_REFRESH_MS = 5000", app_js)
|
||||
self.assertIn("setInterval", app_js)
|
||||
self.assertIn("clearInterval", app_js)
|
||||
self.assertIn(".auto-refresh-toggle", styles)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user