UI - 'Mark all viewed' button should not show when all viewed (#2399)

pull/2306/head
dgtlmoon 7 months ago committed by GitHub
parent b8e279a025
commit 6aded50aca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -178,7 +178,7 @@ class ChangeDetectionStore:
@property @property
def has_unviewed(self): def has_unviewed(self):
for uuid, watch in self.__data['watching'].items(): for uuid, watch in self.__data['watching'].items():
if watch.viewed == False: if watch.history_n >= 2 and watch.viewed == False:
return True return True
return False return False

@ -135,6 +135,9 @@ def test_check_basic_change_detection_functionality(client, live_server):
# It should have picked up the <title> # It should have picked up the <title>
assert b'head title' in res.data assert b'head title' in res.data
# Be sure the last_viewed is going to be greater than the last snapshot
time.sleep(1)
# hit the mark all viewed link # hit the mark all viewed link
res = client.get(url_for("mark_all_viewed"), follow_redirects=True) res = client.get(url_for("mark_all_viewed"), follow_redirects=True)

Loading…
Cancel
Save