Add the configuration for wallaby.

dev
KKlochko 8 months ago
parent ddf54a9264
commit 9e22e1bfde

@ -21,7 +21,7 @@ config :link_shortener, LinkShortener.Repo,
config :link_shortener, LinkShortenerWeb.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4002],
secret_key_base: System.get_env("SECRET_KEY_BASE"),
server: false
server: true
# In test we don't send emails
config :link_shortener, LinkShortener.Mailer, adapter: Swoosh.Adapters.Test
@ -38,3 +38,10 @@ config :phoenix, :plug_init_mode, :runtime
# Enable helpful, but potentially expensive runtime checks
config :phoenix_live_view,
enable_expensive_runtime_checks: true
config :wallaby,
otp_app: :link_shortener,
screenshot_on_failure: true,
screenshot_dir: "screenshots",
driver: Wallaby.Selenium

@ -12,7 +12,7 @@ defmodule LinkShortenerWeb.Endpoint do
]
socket "/live", Phoenix.LiveView.Socket,
websocket: [connect_info: [session: @session_options]],
websocket: [connect_info: [:user_agent, session: @session_options]],
longpoll: [connect_info: [session: @session_options]]
# Serve at "/" the static files from "priv/static" directory.

@ -1,2 +1,5 @@
ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(LinkShortener.Repo, :manual)
{:ok, _} = Application.ensure_all_started(:wallaby)
Application.put_env(:wallaby, :base_url, LinkShortenerWeb.Endpoint.url)

Loading…
Cancel
Save