fix: Center integration tests on test packet locations

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 <noreply@anthropic.com>
This commit is contained in:
Graham McIntire 2025-08-03 15:48:31 -05:00
parent 9b147101e1
commit de10763915
No known key found for this signature in database

View file

@ -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