From 307dc9a0e52ca78034a9b5d8b9a4cfd4d6b9ec80 Mon Sep 17 00:00:00 2001 From: Denis Donici Date: Sun, 22 Feb 2026 13:38:14 +0200 Subject: [PATCH] chore: adjust config for wallaby --- example_project/README.md | 4 ++-- example_project/config/test.exs | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/example_project/README.md b/example_project/README.md index 79f5959..9d22e3f 100644 --- a/example_project/README.md +++ b/example_project/README.md @@ -9,10 +9,10 @@ Now you can visit [`localhost:4000`](http://localhost:4000) from your browser. ## Testing -- Run all tests: `mix test` +- Run all tests: `mix test` (by default this excludes E2E tests; use `mix test --only e2e` to run browser tests). - Run only E2E (browser) tests: `mix test --only e2e` -E2E tests use [Wallaby](https://hexdocs.pm/wallaby) and serve the app from **built** assets (`priv/static`). After changing Svelte (or other frontend) code, rebuild before E2E so tests see your changes: +E2E test modules must use `@moduletag :e2e`. E2E tests use [Wallaby](https://hexdocs.pm/wallaby) and serve the app from **built** assets (`priv/static`). After changing Svelte (or other frontend) code, rebuild before E2E so tests see your changes: ```bash mix assets.js && mix test --only e2e diff --git a/example_project/config/test.exs b/example_project/config/test.exs index b8acaaf..4ecf92a 100644 --- a/example_project/config/test.exs +++ b/example_project/config/test.exs @@ -17,8 +17,10 @@ config :example, ExampleWeb.Endpoint, secret_key_base: "XvZC2gcAePazgtLhJ+/kX9NxRrJA9HBGVxRjfVHW7f//XBDiDpQJ4/ot6N3llQjW", server: true -# Wallaby E2E: base URL must match endpoint port -config :wallaby, base_url: "http://localhost:4002" +# Wallaby E2E: base URL must match endpoint port; explicit driver for clarity and CI +config :wallaby, + base_url: "http://localhost:4002", + driver: Wallaby.Chrome # PhoenixTest: lightweight server-side testing (no browser needed) config :phoenix_test, :endpoint, ExampleWeb.Endpoint