@@ -11,6 +11,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
1111 end
1212
1313 describe "POST /api/v1/sites" do
14+ @ tag :skip
1415 test "can create a site" , % { conn: conn } do
1516 conn =
1617 post ( conn , "/api/v1/sites" , % {
@@ -24,6 +25,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
2425 }
2526 end
2627
28+ @ tag :skip
2729 test "timezone defaults to Etc/UTC" , % { conn: conn } do
2830 conn =
2931 post ( conn , "/api/v1/sites" , % {
@@ -36,6 +38,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
3638 }
3739 end
3840
41+ @ tag :skip
3942 test "domain is required" , % { conn: conn } do
4043 conn = post ( conn , "/api/v1/sites" , % { } )
4144
@@ -44,6 +47,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
4447 }
4548 end
4649
50+ @ tag :skip
4751 test "does not allow creating more sites than the limit" , % { conn: conn , user: user } do
4852 Application . put_env ( :plausible , :site_limit , 3 )
4953 insert ( :site , members: [ user ] )
@@ -62,6 +66,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
6266 }
6367 end
6468
69+ @ tag :skip
6570 test "cannot access with a bad API key scope" , % { conn: conn , user: user } do
6671 api_key = insert ( :api_key , user: user , scopes: [ "stats:read:*" ] )
6772
@@ -80,18 +85,21 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
8085 describe "DELETE /api/v1/sites/:site_id" do
8186 setup :create_new_site
8287
88+ @ tag :skip
8389 test "delete a site by it's domain" , % { conn: conn , site: site } do
8490 conn = delete ( conn , "/api/v1/sites/" <> site . domain )
8591
8692 assert json_response ( conn , 200 ) == % { "deleted" => true }
8793 end
8894
95+ @ tag :skip
8996 test "is 404 when site cannot be found" , % { conn: conn } do
9097 conn = delete ( conn , "/api/v1/sites/foobar.baz" )
9198
9299 assert json_response ( conn , 404 ) == % { "error" => "Site could not be found" }
93100 end
94101
102+ @ tag :skip
95103 test "cannot delete a site that the user does not own" , % { conn: conn , user: user } do
96104 site = insert ( :site , members: [ ] )
97105 insert ( :site_membership , user: user , site: site , role: :admin )
@@ -100,6 +108,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
100108 assert json_response ( conn , 404 ) == % { "error" => "Site could not be found" }
101109 end
102110
111+ @ tag :skip
103112 test "cannot access with a bad API key scope" , % { conn: conn , site: site , user: user } do
104113 api_key = insert ( :api_key , user: user , scopes: [ "stats:read:*" ] )
105114
@@ -118,6 +127,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
118127 describe "PUT /api/v1/sites/shared-links" do
119128 setup :create_site
120129
130+ @ tag :skip
121131 test "can add a shared link to a site" , % { conn: conn , site: site } do
122132 conn =
123133 put ( conn , "/api/v1/sites/shared-links" , % {
@@ -130,6 +140,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
130140 assert String . starts_with? ( res [ "url" ] , "http://" )
131141 end
132142
143+ @ tag :skip
133144 test "is idempotent find or create op" , % { conn: conn , site: site } do
134145 conn =
135146 put ( conn , "/api/v1/sites/shared-links" , % {
@@ -148,6 +159,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
148159 assert % { "url" => ^ url } = json_response ( conn , 200 )
149160 end
150161
162+ @ tag :skip
151163 test "returns 400 when site id missing" , % { conn: conn } do
152164 conn =
153165 put ( conn , "/api/v1/sites/shared-links" , % {
@@ -158,6 +170,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
158170 assert res [ "error" ] == "Parameter `site_id` is required to create a shared link"
159171 end
160172
173+ @ tag :skip
161174 test "returns 404 when site id is non existent" , % { conn: conn } do
162175 conn =
163176 put ( conn , "/api/v1/sites/shared-links" , % {
@@ -169,6 +182,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
169182 assert res [ "error" ] == "Site could not be found"
170183 end
171184
185+ @ tag :skip
172186 test "returns 404 when api key owner does not have permissions to create a shared link" , % {
173187 conn: conn ,
174188 site: site ,
@@ -195,6 +209,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
195209 describe "PUT /api/v1/sites/goals" do
196210 setup :create_site
197211
212+ @ tag :skip
198213 test "can add a goal as event to a site" , % { conn: conn , site: site } do
199214 conn =
200215 put ( conn , "/api/v1/sites/goals" , % {
@@ -208,6 +223,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
208223 assert res [ "event_name" ] == "Signup"
209224 end
210225
226+ @ tag :skip
211227 test "can add a goal as page to a site" , % { conn: conn , site: site } do
212228 conn =
213229 put ( conn , "/api/v1/sites/goals" , % {
@@ -221,6 +237,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
221237 assert res [ "page_path" ] == "/signup"
222238 end
223239
240+ @ tag :skip
224241 test "is idempotent find or create op" , % { conn: conn , site: site } do
225242 conn =
226243 put ( conn , "/api/v1/sites/goals" , % {
@@ -241,6 +258,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
241258 assert % { "id" => ^ goal_id } = json_response ( conn , 200 )
242259 end
243260
261+ @ tag :skip
244262 test "returns 400 when site id missing" , % { conn: conn } do
245263 conn =
246264 put ( conn , "/api/v1/sites/goals" , % {
@@ -252,6 +270,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
252270 assert res [ "error" ] == "Parameter `site_id` is required to create a goal"
253271 end
254272
273+ @ tag :skip
255274 test "returns 404 when site id is non existent" , % { conn: conn } do
256275 conn =
257276 put ( conn , "/api/v1/sites/goals" , % {
@@ -264,6 +283,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
264283 assert res [ "error" ] == "Site could not be found"
265284 end
266285
286+ @ tag :skip
267287 test "returns 404 when api key owner does not have permissions to create a goal" , % {
268288 conn: conn ,
269289 site: site ,
@@ -287,6 +307,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
287307 assert res [ "error" ] == "Site could not be found"
288308 end
289309
310+ @ tag :skip
290311 test "returns 400 when goal type missing" , % { conn: conn , site: site } do
291312 conn =
292313 put ( conn , "/api/v1/sites/goals" , % {
@@ -298,6 +319,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
298319 assert res [ "error" ] == "Parameter `goal_type` is required to create a goal"
299320 end
300321
322+ @ tag :skip
301323 test "returns 400 when goal event name missing" , % { conn: conn , site: site } do
302324 conn =
303325 put ( conn , "/api/v1/sites/goals" , % {
@@ -309,6 +331,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
309331 assert res [ "error" ] == "Parameter `event_name` is required to create a goal"
310332 end
311333
334+ @ tag :skip
312335 test "returns 400 when goal page path missing" , % { conn: conn , site: site } do
313336 conn =
314337 put ( conn , "/api/v1/sites/goals" , % {
@@ -324,6 +347,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
324347 describe "DELETE /api/v1/sites/goals/:goal_id" do
325348 setup :create_new_site
326349
350+ @ tag :skip
327351 test "delete a goal by it's id" , % { conn: conn , site: site } do
328352 conn =
329353 put ( conn , "/api/v1/sites/goals" , % {
@@ -342,6 +366,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
342366 assert json_response ( conn , 200 ) == % { "deleted" => true }
343367 end
344368
369+ @ tag :skip
345370 test "is 404 when goal cannot be found" , % { conn: conn , site: site } do
346371 conn =
347372 delete ( conn , "/api/v1/sites/goals/0" , % {
@@ -351,6 +376,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
351376 assert json_response ( conn , 404 ) == % { "error" => "Goal could not be found" }
352377 end
353378
379+ @ tag :skip
354380 test "cannot delete a goal belongs to a site that the user does not own" , % {
355381 conn: conn ,
356382 user: user
@@ -366,6 +392,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
366392 assert json_response ( conn , 404 ) == % { "error" => "Site could not be found" }
367393 end
368394
395+ @ tag :skip
369396 test "cannot access with a bad API key scope" , % { conn: conn , site: site , user: user } do
370397 api_key = insert ( :api_key , user: user , scopes: [ "stats:read:*" ] )
371398
0 commit comments