feat: 오늘 피드 — 사람 글을 묶음 대신 포스트처럼 두 장마다 한 장씩(큰 카드·댓글), 행사는 띠 대신 축제 전부와 팝업·전시·공연 2개씩 포스트로
- 사람 글 큰 카드: 머리줄·4:5 본문(사진, 없으면 글을 크게)·좋아요·댓글·보내기 - 사람 글 댓글: 로그인한 사람만, comment 표에 talk_id, talk.comment_count (init.sql) - '오늘 내 글'·'동네 사람들'·주제별 묶음, '이번 주 가까운 행사' 띠 제거 - 행사 포스트 자리 최대 40개, 앞쪽 절반에 다 못 들어가면 끝까지 한 장씩 걸러 - GA: feed_item_view(talk·event 노출), talk_comment
This commit is contained in:
1 parent
f6cb6f2deb
commit
dba3d78f14
22 files changed
+653
-318
No files matched your search
@@ -82,6 +82,32 @@ async def test_reports_hide_and_block_hides_author():
|
||||
assert t["talk_id"] not in [x["talk_id"] for x in (await c.get("/v1/talk/list")).json()["talks"]]
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_talk_comments_need_login_and_keep_count_on_talk():
|
||||
async with client() as c:
|
||||
h = await _login(c, "talk_c1")
|
||||
t = (await _write(c, h))["talk"]
|
||||
url = f"/v1/reaction/talk/{t['talk_id']}/comment"
|
||||
count = lambda talks: next(x for x in talks if x["talk_id"] == t["talk_id"])["comment_count"] # noqa: E731
|
||||
assert (await c.post(url, json={"body": "저도 봤어요"})).status_code == 401
|
||||
other = await _login(c, "talk_c2")
|
||||
assert (await c.post(url, headers=other, json={"body": "저도 봤어요"})).json()["result"]["desc"] == "TERMS_REQUIRED"
|
||||
await c.post("/v1/auth/terms", headers=other)
|
||||
assert (await c.post(url, headers=other, json={"body": "연락 010-1234-5678"})).json()["result"]["desc"] == "LINK_NOT_ALLOWED"
|
||||
assert (await c.post(url, headers=other, json={"body": "가" * 61})).json()["result"]["desc"] == "INVALID_INPUT"
|
||||
|
||||
made = (await c.post(url, headers=other, json={"body": " 저도 봤어요 "})).json()["comment"]
|
||||
assert made["body"] == "저도 봤어요" and made["mine"] is True
|
||||
listed = (await c.get(f"{url}/list")).json()["comments"]
|
||||
assert [x["comment_id"] for x in listed] == [made["comment_id"]] and listed[0]["nickname"] == "talk_c2"
|
||||
assert count((await c.get("/v1/talk/list")).json()["talks"]) == 1
|
||||
|
||||
assert (await c.delete(f"/v1/reaction/comment/{made['comment_id']}", headers=other)).json()["result"]["success"] is True
|
||||
assert (await c.get(f"{url}/list")).json()["comments"] == []
|
||||
assert count((await c.get("/v1/talk/list")).json()["talks"]) == 0
|
||||
assert (await c.post("/v1/reaction/talk/999999999/comment", headers=other, json={"body": "안녕"})).json()["result"]["desc"] == "NOT_FOUND"
|
||||
|
||||
|
||||
def test_weather_line():
|
||||
class Row:
|
||||
temp_c, sky, rain_type = 18.4, 1, 1
|
||||
|
||||
Reference in new issue
Block a user