Address browser testing reliability in CI environments: ## CI/CD Improvements - **ChromeDriver**: Use latest stable version instead of pinned version for better compatibility - **Timeouts**: Add 10-minute timeout for integration tests to prevent CI hangs - **Environment Variables**: Configure WALLABY_MAX_WAIT_TIME for CI-specific timeouts ## Wallaby Configuration Enhancements - **Chrome Args**: Add CI-stable Chrome options (--no-sandbox, --disable-dev-shm-usage) - **Window Size**: Set consistent 1280x720 window size for reproducible tests - **Dynamic Timeouts**: Environment-configurable max wait time with sensible defaults - **Pool Size**: Limit to single browser instance to prevent resource conflicts ## Benefits - ✅ More reliable test execution in CI environments - ✅ Better error handling and timeout management - ✅ Consistent browser behavior across environments - ✅ Reduced flakiness from resource constraints 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
558 B
Elixir
26 lines
558 B
Elixir
defmodule AprsmeWeb.SimpleIntegrationTest do
|
|
@moduledoc """
|
|
Simple integration test to verify Wallaby setup works
|
|
"""
|
|
use ExUnit.Case, async: false
|
|
use Wallaby.Feature
|
|
|
|
import Wallaby.Browser
|
|
|
|
alias Ecto.Adapters.SQL.Sandbox
|
|
alias Wallaby.Query
|
|
|
|
@moduletag :integration
|
|
|
|
setup do
|
|
:ok = Sandbox.checkout(Aprsme.Repo)
|
|
Sandbox.mode(Aprsme.Repo, {:shared, self()})
|
|
{:ok, %{}}
|
|
end
|
|
|
|
feature "can visit homepage and see title", %{session: session} do
|
|
session
|
|
|> visit("/")
|
|
|> assert_has(Query.text("APRS"))
|
|
end
|
|
end
|