fix: Configure Wallaby integration tests for GitHub CI

The Wallaby integration tests were timing out in CI. This adds proper
configuration for running browser tests in the CI environment.

Changes:
- Start ChromeDriver explicitly in the background on port 4444
- Pass CHROMEDRIVER_URL environment variable to tests
- Add chromedriver_base_url configuration to use env var if available
- Increase test timeout to 60 seconds for integration tests
- Add additional Chrome flags for better CI stability:
  - --disable-setuid-sandbox
  - --disable-extensions
  - --disable-background-timer-throttling
  - --disable-backgrounding-occluded-windows
  - --disable-renderer-backgrounding

These changes ensure ChromeDriver is properly started and accessible
in the CI environment, preventing connection timeouts.

🤖 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:41:28 -05:00
parent e6d8894bf6
commit 6e504f7209
No known key found for this signature in database
3 changed files with 16 additions and 1 deletions

View file

@ -120,6 +120,12 @@ jobs:
uses: nanasess/setup-chromedriver@v2
# Note: Using latest stable version instead of pinned version for better compatibility
# Step: Start ChromeDriver in the background
- name: Start ChromeDriver
run: |
chromedriver --port=4444 --url-base=/wd/hub &
sleep 2
# Step: Execute the tests.
- name: Run tests
run: mix test
@ -132,3 +138,4 @@ jobs:
# Increase timeouts for browser tests in CI environment
WALLABY_SCREENSHOT_ON_FAILURE: true
WALLABY_MAX_WAIT_TIME: 30000
CHROMEDRIVER_URL: http://localhost:4444/wd/hub

View file

@ -95,6 +95,11 @@ config :wallaby,
"--no-sandbox",
"--disable-dev-shm-usage",
"--disable-gpu",
"--disable-setuid-sandbox",
"--disable-extensions",
"--disable-background-timer-throttling",
"--disable-backgrounding-occluded-windows",
"--disable-renderer-backgrounding",
"--window-size=1280,720"
]
],
@ -104,4 +109,6 @@ config :wallaby,
# Increase default timeouts for CI environment
max_wait_time: "WALLABY_MAX_WAIT_TIME" |> System.get_env("5000") |> String.to_integer(),
# Pool configuration for concurrent tests
pool_size: 1
pool_size: 1,
# Use ChromeDriver URL from environment if available (for CI)
chromedriver_base_url: System.get_env("CHROMEDRIVER_URL")

View file

@ -31,6 +31,7 @@ defmodule AprsmeWeb.HistoricalLoadingIntegrationTest do
describe "historical packet loading on page load" do
@describetag :integration
@describetag timeout: 60_000
feature "displays historical packets immediately after map loads", %{session: session} do
# Create test packets with known positions
now = DateTime.utc_now()