update stuff
This commit is contained in:
parent
274af1ce93
commit
0c90a47f9a
7 changed files with 9 additions and 9 deletions
|
|
@ -22,7 +22,7 @@ defmodule AprsmeWeb.Router do
|
|||
|
||||
plug :put_secure_browser_headers, %{
|
||||
"content-security-policy" =>
|
||||
"default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://js.sentry-cdn.com https://unpkg.com https://cdn.jsdelivr.net https://cdnjs.cloudflare.com; style-src 'self' 'unsafe-inline' https://unpkg.com; img-src 'self' data: https: http: blob:; font-src 'self' data:; connect-src 'self' wss: https://*.ingest.sentry.io https://*.sentry.io https://nominatim.openstreetmap.org https://tile.openstreetmap.org https://*.tile.openstreetmap.org https://*.tile.openstreetmap.de https://*.basemaps.cartocdn.com; media-src 'self'; object-src 'none'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; frame-src 'self'; manifest-src 'self'; worker-src 'self' blob:"
|
||||
"default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://js.sentry-cdn.com https://unpkg.com https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://a.w5isp.com; style-src 'self' 'unsafe-inline' https://unpkg.com; img-src 'self' data: https: http: blob:; font-src 'self' data:; connect-src 'self' wss: https://*.ingest.sentry.io https://*.sentry.io https://nominatim.openstreetmap.org https://tile.openstreetmap.org https://*.tile.openstreetmap.org https://*.tile.openstreetmap.de https://*.basemaps.cartocdn.com https://a.w5isp.com; media-src 'self'; object-src 'none'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; frame-src 'self'; manifest-src 'self'; worker-src 'self' blob:"
|
||||
}
|
||||
|
||||
plug :fetch_current_user
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ defmodule AprsmeWeb.MapLive.HistoricalLoadingTest do
|
|||
})
|
||||
|
||||
# Create an old packet that should not be loaded
|
||||
_old_packet =
|
||||
old_packet =
|
||||
packet_fixture(%{
|
||||
sender: "TEST3",
|
||||
base_callsign: "TEST3",
|
||||
|
|
@ -77,7 +77,7 @@ defmodule AprsmeWeb.MapLive.HistoricalLoadingTest do
|
|||
packet_ids = Enum.map(recent_packets, & &1.id)
|
||||
assert packet1.id in packet_ids
|
||||
assert packet2.id in packet_ids
|
||||
refute _old_packet.id in packet_ids
|
||||
refute old_packet.id in packet_ids
|
||||
end
|
||||
|
||||
test "loads historical packets with custom historical hours setting", %{conn: conn} do
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ defmodule AprsmeWeb.MapLive.MovementTest do
|
|||
test "does not update marker for GPS drift", %{conn: conn} do
|
||||
# Start with initial location
|
||||
{:ok, view, _html} = live(conn, "/", on_error: :warn)
|
||||
# Help dialyzer narrow the View type
|
||||
assert %{ref: _} = view
|
||||
|
||||
# First update the map state to set zoom level
|
||||
assert render_hook(view, "update_map_state", %{
|
||||
|
|
@ -76,6 +78,9 @@ defmodule AprsmeWeb.MapLive.MovementTest do
|
|||
# Start with initial location at a zoom level that shows individual markers
|
||||
{:ok, view, _html} = live(conn, "/?z=15", on_error: :warn)
|
||||
|
||||
# Help dialyzer narrow the View type
|
||||
assert %{ref: _} = view
|
||||
|
||||
# Notify the map is ready
|
||||
assert render_hook(view, "map_ready", %{})
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ defmodule AprsmeWeb.MapLive.UrlParamsTest do
|
|||
describe "defaults" do
|
||||
test "default_center returns USA-centered coordinates" do
|
||||
%{lat: lat, lng: lng} = UrlParams.default_center()
|
||||
assert is_float(lat) and is_float(lng)
|
||||
assert lat >= 25 and lat <= 50
|
||||
assert lng >= -125 and lng <= -66
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ defmodule AprsmeWeb.PacketsLive.IndexTest do
|
|||
use ExUnit.Case, async: true
|
||||
|
||||
alias AprsmeWeb.PacketsLive.Index
|
||||
alias Phoenix.LiveView.LiveStream
|
||||
alias Phoenix.LiveView.Socket
|
||||
|
||||
describe "extract_coordinate/2" do
|
||||
test "extracts lat from direct :lat key" do
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ defmodule AprsmeWeb.TelemetryTest do
|
|||
test "returns a non-empty list of metric definitions" do
|
||||
metrics = Telemetry.metrics()
|
||||
assert is_list(metrics)
|
||||
refute metrics == []
|
||||
refute Enum.empty?(metrics)
|
||||
end
|
||||
|
||||
test "includes Phoenix endpoint, router, and live_view metrics" do
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ defmodule AprsIsMock do
|
|||
|
||||
use GenServer
|
||||
|
||||
require Logger
|
||||
|
||||
def start_link(opts \\ []) do
|
||||
GenServer.start_link(__MODULE__, opts, name: __MODULE__)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue