From de107639152421387029f00a5d812c2e7a4ad92d Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 3 Aug 2025 15:48:31 -0500 Subject: [PATCH] fix: Center integration tests on test packet locations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The integration tests were failing because the map was loading at a default location that didn't include the test packets. The tests were creating packets in specific locations but the map view wasn't centered on them. Changes: - Center first test on New York area (40.735, -73.996) where test packets are - Center other tests on central US (39.8283, -98.5795) for broader view - Add appropriate zoom levels for each test scenario - Ensure all test URLs include location parameters This ensures the test packets are within the map viewport when the tests run, allowing the markers to be visible and clickable. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../historical_loading_integration_test.exs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/integration/historical_loading_integration_test.exs b/test/integration/historical_loading_integration_test.exs index eb82087..63e4006 100644 --- a/test/integration/historical_loading_integration_test.exs +++ b/test/integration/historical_loading_integration_test.exs @@ -62,9 +62,10 @@ defmodule AprsmeWeb.HistoricalLoadingIntegrationTest do symbol_table_id: "/" }) - # Navigate to the map + # Navigate to the map with the test location in view + # Center on New York area where our test packets are located session - |> visit("/") + |> visit("/?lat=40.735&lon=-73.996&zoom=11") |> assert_has(css("#aprs-map")) # Wait for map to initialize and markers to appear @@ -123,7 +124,7 @@ defmodule AprsmeWeb.HistoricalLoadingIntegrationTest do # Navigate to map with 1 hour historical range (default) session - |> visit("/?hist=1") + |> visit("/?hist=1&lat=39.8283&lon=-98.5795&zoom=6") |> assert_has(css("#aprs-map")) # Wait for historical loading @@ -140,7 +141,7 @@ defmodule AprsmeWeb.HistoricalLoadingIntegrationTest do # Now test with extended historical range session # 6 hours - |> visit("/?hist=6") + |> visit("/?hist=6&lat=39.8283&lon=-98.5795&zoom=6") |> assert_has(css("#aprs-map")) Process.sleep(3000) @@ -250,7 +251,7 @@ defmodule AprsmeWeb.HistoricalLoadingIntegrationTest do # Navigate to tracked callsign URL session - |> visit("/TRACK1-9") + |> visit("/TRACK1-9?lat=39.8283&lon=-98.5795&zoom=4") |> assert_has(css("#aprs-map")) # Wait for map to load and center on latest position