Tried to fix a broke filter.
Build LinkLog Development Image / development-image (push) Successful in 10s

This commit is contained in:
2026-08-27 22:54:22 +02:00
parent 9494d2b119
commit 7bd64b870c
8 changed files with 56 additions and 42 deletions
+10 -6
View File
@@ -564,17 +564,17 @@ def test_label_visibility_isolation_and_grandfathering():
assert '#Cybersecurity' in charlie_label_names
assert '#BobOnlyLabel' not in charlie_label_names
# Bob views /api/tags (authenticated): sees Bob tag & default/grandfathered, NOT Charlie tag
# Every user can filter by every available tag, including another user's label.
bob_tags = client.get('/api/tags', headers=bob_headers).json()
assert '#BobOnlyLabel' in bob_tags
assert '#GrandfatheredLabel' in bob_tags
assert '#CharlieOnlyLabel' not in bob_tags
assert '#CharlieOnlyLabel' in bob_tags
# Anonymous views /api/tags: sees default/grandfathered, NOT Bob or Charlie tag
# The public feed filter has the same complete tag catalog.
anon_tags = client.get('/api/tags').json()
assert '#GrandfatheredLabel' in anon_tags
assert '#BobOnlyLabel' not in anon_tags
assert '#CharlieOnlyLabel' not in anon_tags
assert '#BobOnlyLabel' in anon_tags
assert '#CharlieOnlyLabel' in anon_tags
# Bob cannot edit or delete grandfathered label
assert client.put(f"/api/user/labels/{grandfathered_id}", headers=bob_headers, json={'name': '#RenamedGrandfathered'}).status_code == 404
@@ -828,7 +828,11 @@ def test_public_and_admin_pages_render_html():
assert 'if (item.is_owner && !showIdentity)' in feed_script
assert 'deleteEntry(item, deleteButton)' in feed_script
assert 'postToMastodon(item, mastodonButton)' in feed_script
assert 'tag.toLowerCase() === pref.tag.toLowerCase()' in feed_script
assert 'tag.toLowerCase() === activeTag.toLowerCase()' in feed_script
assert 'loadFeed(event.target.value)' in feed_script
assert 'Promise.all([loadUsers(), loadTags()]).then(() => loadFeed())' in feed_script
assert "fetch('/api/tags', {" in feed_script
assert 'Authorization: `Bearer ${accessToken}`' in feed_script
assert 'return `${date.getFullYear()} ${months[date.getMonth()]} ${date.getDate()} - ${hours}:${minutes}`' in feed_script
assert "entryMeta.className = 'entry-meta'" in feed_script
assert "meta.className = 'meta'" in feed_script