@@ -288,24 +288,23 @@ defmodule GroupherServer.Test.Query.ArticleComment do
288288 assert results [ "totalCount" ] == total_count + 2
289289 end
290290
291- @ tag :wip
291+ @ tag :wip2
292292 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
294294 thread = :post
295295 page_size = 10
296296
297297 Enum . reduce ( 1 .. total_count , [ ] , fn _ , acc ->
298298 { :ok , comment } = CMS . create_article_comment ( thread , post . id , "test comment" , user )
299- Process . sleep ( 500 )
300-
299+ Process . sleep ( 1000 )
301300 acc ++ [ comment ]
302301 end )
303302
304303 variables = % { id: post . id , thread: "POST" , filter: % { page: 1 , size: page_size } }
305304 results = guest_conn |> query_result ( @ query , variables , "pagedArticleComments" )
306305
307306 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
309308 end
310309
311310 @ tag :wip
@@ -522,8 +521,8 @@ defmodule GroupherServer.Test.Query.ArticleComment do
522521 acc ++ [ comment ]
523522 end )
524523
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 )
527526
528527 variables = % { id: post . id , thread: thread , filter: % { page: 1 , size: page_size } }
529528
0 commit comments