UX: lower min_post_count to show bottom topic map (#29649)

This commit is contained in:
Kris 2024-11-07 20:10:18 -05:00 committed by GitHub
parent 79254c59f9
commit 64291fedf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 6 deletions

View File

@ -28,7 +28,7 @@ const MIN_LIKES_COUNT = 5;
const MIN_PARTICIPANTS_COUNT = 5;
const MIN_USERS_COUNT_FOR_AVATARS = 2;
export const MIN_POSTS_COUNT = 10;
export const MIN_POSTS_COUNT = 5;
export default class TopicMapSummary extends Component {
@service site;

View File

@ -21,8 +21,6 @@ describe "Topic Map", type: :system do
topic_page.visit_topic(topic)
expect(topic_page).to have_topic_map
Fabricate(:post, topic: topic, created_at: 2.day.ago)
Fabricate(:post, topic: topic, created_at: 1.day.ago, like_count: 3)
2.times { Fabricate(:post, topic: topic, created_at: 1.day.ago, like_count: 1) }
page.refresh
expect(topic_page).to have_topic_map
@ -30,6 +28,14 @@ describe "Topic Map", type: :system do
Fabricate(:post, topic: topic, created_at: 1.day.ago)
page.refresh
# bottom map, avatars details with post counts
expect(topic_map).to have_no_bottom_map
Fabricate(:post, topic: topic, created_at: 2.day.ago)
Fabricate(:post, topic: topic, created_at: 1.day.ago, like_count: 3)
page.refresh
expect(topic_map.users_count).to eq 6
# user count
@ -41,9 +47,6 @@ describe "Topic Map", type: :system do
topic_page.visit_topic(topic)
}.to change(topic_map, :users_count).by(1)
# bottom map, avatars details with post counts
expect(topic_map).to have_no_bottom_map
Fabricate(:post, topic: topic)
Fabricate(:post, user: user, topic: topic)
Fabricate(:post, user: last_post_user, topic: topic)