Tried to fix a broke filter.
Build LinkLog Development Image / development-image (push) Successful in 10s
Build LinkLog Development Image / development-image (push) Successful in 10s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user