     end)
 
     visit(session, "/statistics")
-    channels = find(session, ".stats_column ul#channels")
+    channels = find(session, css(".stats_column ul#channels"))
 
-    query = Wallaby.Query.css(".stats_column header", text: "5 posts in 2 channels")
+    query = css(".stats_column header", text: "5 posts in 2 channels")
     channels_header = find(session, query)
     assert(channels_header)
 
-    [ other_channel, phoenix_channel ] = all(channels, "li")
+    [ other_channel, phoenix_channel ] = all(channels, css("li"))
 
-    assert Wallaby.Browser.text(other_channel) =~ "#other\n3 posts"
-    assert Wallaby.Browser.text(phoenix_channel) =~ "#phoenix\n1 post"
+    assert Wallaby.Element.text(other_channel) =~ "#other\n3 posts"
+    assert Wallaby.Element.text(phoenix_channel) =~ "#phoenix\n1 post"
   end
 
   test "sees most liked tils", %{session: session} do


    visit(session, "/statistics")

    most_liked_posts = find(session, "article.most_liked_posts")
    channels_header = find(most_liked_posts, "header")

    assert Wallaby.Browser.text(channels_header) =~ "Most liked TILs"

    [ fast_tests, slow_tests, insert_mode ] = all(most_liked_posts, "li")

    assert Wallaby.Browser.text(fast_tests) =~ "Templates\n#phoenix • 3 likes"
    assert Wallaby.Browser.text(slow_tests) =~ "Views\n#phoenix • 2 likes"
    assert Wallaby.Browser.text(insert_mode) =~ "Controllers\n#phoenix • 1 like"
  end

  test "sees til activity", %{session: session} do
    dt = fn ({y, m, d} = date) ->
      Ecto.DateTime.cast!({date, {12, 0, 0}})
    end


    Factory.insert!(:post, title: "Vim rules", inserted_at: dt.(Date.to_erl(previous_wednesday)))

    visit(session, "/statistics")
    activity_tag = find(session, css("ul#activity"))

    find(activity_tag,
         css("li[data-amount='1'][data-date='Mon, #{Timex.format!(previous_monday, "%b %e", :strftime)}']")
       )
    find(activity_tag,
         css("li[data-amount='2'][data-date='Tue, #{Timex.format!(previous_tuesday, "%b %e", :strftime)}']")
       )
    find(activity_tag,
         css("li[data-amount='3'][data-date='Wed, #{Timex.format!(previous_wednesday, "%b %-e", :strftime)}']")
        )
  end
end
