@@ -288,24 +288,23 @@ defmodule GroupherServer.Test.Query.ArticleComment do
288
288
assert results [ "totalCount" ] == total_count + 2
289
289
end
290
290
291
- @ tag :wip
291
+ @ tag :wip2
292
292
test "guest user can get paged comment with floor it" , ~m( guest_conn post user) a do
293
- total_count = 10
293
+ total_count = 5
294
294
thread = :post
295
295
page_size = 10
296
296
297
297
Enum . reduce ( 1 .. total_count , [ ] , fn _ , acc ->
298
298
{ :ok , comment } = CMS . create_article_comment ( thread , post . id , "test comment" , user )
299
- Process . sleep ( 500 )
300
-
299
+ Process . sleep ( 1000 )
301
300
acc ++ [ comment ]
302
301
end )
303
302
304
303
variables = % { id: post . id , thread: "POST" , filter: % { page: 1 , size: page_size } }
305
304
results = guest_conn |> query_result ( @ query , variables , "pagedArticleComments" )
306
305
307
306
assert results [ "entries" ] |> List . first ( ) |> Map . get ( "floor" ) == 1
308
- assert results [ "entries" ] |> List . last ( ) |> Map . get ( "floor" ) == 10
307
+ assert results [ "entries" ] |> List . last ( ) |> Map . get ( "floor" ) == 5
309
308
end
310
309
311
310
@ tag :wip
@@ -522,8 +521,8 @@ defmodule GroupherServer.Test.Query.ArticleComment do
522
521
acc ++ [ comment ]
523
522
end )
524
523
525
- { :ok , comment } = CMS . create_article_comment ( :post , post . id , "commment" , user )
526
- { :ok , comment } = CMS . create_article_comment ( :post , post . id , "commment" , user )
524
+ { :ok , _comment } = CMS . create_article_comment ( :post , post . id , "commment" , user )
525
+ { :ok , _comment } = CMS . create_article_comment ( :post , post . id , "commment" , user )
527
526
528
527
variables = % { id: post . id , thread: thread , filter: % { page: 1 , size: page_size } }
529
528