fix: quote counts in the counts line; remove dead editor scripts and files (v2.14.2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
88aea09e04
commit
d354dc9733
18 files changed
+106
-60
No files matched your search
@@ -639,3 +639,21 @@ def test_home_page_shows_counts(app, client):
|
||||
assert 'title="3 likes"' in page and 'title="2 reposts"' in page and 'title="1 reply"' in page
|
||||
assert f"/note/{quiet.slug}#responses" not in page
|
||||
assert 'id="responses"' in app.test_client().get(f"/note/{note.slug}").get_data(as_text=True)
|
||||
|
||||
|
||||
def test_quote_counts_include_anonymous_ones(app, client):
|
||||
"""v2.14.2: quotes have a count, including those without names (Threads, opted out)"""
|
||||
note, sid = crossposted(app)
|
||||
client.harvest = Harvest([Response(kind="quote", source_url="https://bsky.app/profile/q/post/1",
|
||||
remote_id="at://q/1", author_name="Quoter",
|
||||
content_html="<p>Look</p>")])
|
||||
run(app)
|
||||
with app.app_context():
|
||||
get_db(app).execute("UPDATE syndications SET quotes_count = 2 WHERE id = ?", (sid,))
|
||||
get_db(app).commit()
|
||||
page = app.test_client().get(f"/note/{note.slug}").get_data(as_text=True)
|
||||
quote = page.split('response-count-quote')[1].split('</span>\n</span>')[0]
|
||||
assert '<span class="response-count-n">3</span>' in quote and "2 on GoToSocial" in quote
|
||||
assert "Quoter" in page, "the named quote is listed under Responses"
|
||||
home = app.test_client().get("/").get_data(as_text=True)
|
||||
assert 'title="3 quotes"' in home
|
||||
Reference in new issue
Block a user