Skip to content

Commit

Permalink
Remove problematic test
Browse files Browse the repository at this point in the history
  • Loading branch information
macobo committed Jun 27, 2024
1 parent fbf7dd7 commit 67aa08f
Showing 1 changed file with 0 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3323,58 +3323,6 @@ defmodule PlausibleWeb.Api.ExternalStatsController.QueryTest do
]
end

test "all metrics for breakdown by visit prop", %{conn: conn, site: site} do
populate_stats(site, [
build(:pageview,
user_id: 1,
referrer_source: "Google",
timestamp: ~N[2021-01-01 00:00:00]
),
build(:event,
name: "signup",
user_id: 1,
referrer_source: "Google",
timestamp: ~N[2021-01-01 00:05:00]
),
build(:pageview,
user_id: 1,
referrer_source: "Google",
timestamp: ~N[2021-01-01 00:10:00]
),
build(:pageview,
referrer_source: "Google",
timestamp: ~N[2021-01-01 00:25:00]
),
build(:pageview,
referrer_source: "Twitter",
timestamp: ~N[2021-01-01 00:00:00]
)
])

conn =
post(conn, "/api/v2/query", %{
"site_id" => site.domain,
"metrics" => [
"visitors",
"visits",
"pageviews",
"events",
"bounce_rate",
"visit_duration"
],
"date_range" => "all",
"dimensions" => ["visit:source"],
"filters" => []
})

%{"results" => results} = json_response(conn, 200)

assert results == [
%{"dimensions" => ["Google"], "metrics" => [2, 2, 3, 4, 50, 300]},
%{"dimensions" => ["Twitter"], "metrics" => [1, 1, 1, 1, 100, 0]}
]
end

test "metrics=bounce_rate does not add visits to the response", %{conn: conn, site: site} do
populate_stats(site, [
build(:pageview,
Expand Down

0 comments on commit 67aa08f

Please sign in to comment.