feat(player): 点赞与评论改为按集
This commit is contained in:
1 parent
e6f34977f5
commit
83822a0cbb
25 files changed
+337
-69
No files matched your search
@@ -55,12 +55,18 @@ void main() {
|
||||
ApiClient(baseUrl: 'http://127.0.0.1:8081', adapter: adapter),
|
||||
);
|
||||
|
||||
final page = await api.page(dramaId: '5', cursor: '99', size: 20);
|
||||
final page = await api.page(
|
||||
dramaId: '5',
|
||||
episodeId: '7',
|
||||
cursor: '99',
|
||||
size: 20,
|
||||
);
|
||||
|
||||
expect(adapter.requests.single.method, 'GET');
|
||||
expect(adapter.requests.single.uri.path, '/app/comments');
|
||||
expect(adapter.requests.single.queryParameters, {
|
||||
'dramaId': '5',
|
||||
'episodeId': '7',
|
||||
'cursor': '99',
|
||||
'size': '20',
|
||||
});
|
||||
@@ -93,6 +99,7 @@ void main() {
|
||||
|
||||
final reply = await api.publish(
|
||||
dramaId: '5',
|
||||
episodeId: '7',
|
||||
content: 'great badword',
|
||||
parentId: '2111012753262120962',
|
||||
);
|
||||
@@ -101,6 +108,7 @@ void main() {
|
||||
expect(adapter.requests.single.uri.path, '/app/comments');
|
||||
expect(adapter.requests.single.data, {
|
||||
'dramaId': '5',
|
||||
'episodeId': '7',
|
||||
'content': 'great badword',
|
||||
'parentId': '2111012753262120962',
|
||||
});
|
||||
@@ -135,12 +143,15 @@ void main() {
|
||||
ApiClient(baseUrl: 'http://127.0.0.1:8081', adapter: adapter),
|
||||
);
|
||||
|
||||
final count = await api.count('5');
|
||||
final count = await api.count('5', episodeId: '7');
|
||||
|
||||
expect(count, 17);
|
||||
expect(adapter.requests.single.method, 'GET');
|
||||
expect(adapter.requests.single.uri.path, '/app/comments/count');
|
||||
expect(adapter.requests.single.queryParameters, {'dramaId': '5'});
|
||||
expect(adapter.requests.single.queryParameters, {
|
||||
'dramaId': '5',
|
||||
'episodeId': '7',
|
||||
});
|
||||
});
|
||||
|
||||
test('should_parse_string_comment_count', () async {
|
||||
|
||||
Reference in new issue
Block a user