feat(app): 展示真实点赞与评论计数

This commit is contained in:
Zhou Weidong committed 2026-10-19 23:56:12 +08:00
1 parent 7b927c794e
commit dfc650456a
9 files changed
+123 -8

No files matched your search

+21
View File
@@ -42,6 +42,27 @@ void main() {
model.dispose();
});
test('should_expose_exact_count_only_when_last_page_is_loaded', () async {
final repository = FakeCommentRepository(
pages: [
CommentPage(
comments: [commentFixture(id: '2')],
nextCursor: '2',
hasMore: true,
),
CommentPage(comments: [commentFixture(id: '1')]),
],
);
final model = controller(repository);
await model.load();
expect(model.exactCount, isNull);
await model.loadMore();
expect(model.exactCount, 2);
model.dispose();
});
test('should_use_server_content_and_pending_status_when_review_is_returned', () async {
final repository = FakeCommentRepository(
publishResult: commentFixture(