Add the configuration for wallaby.
This commit is contained in:
+8
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user