Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
blockscout/apps/explorer_web/test/support/feature_case.ex

29 lines
654 B

defmodule ExplorerWeb.FeatureCase do
use ExUnit.CaseTemplate
using do
quote do
use Wallaby.DSL
alias Explorer.Repo
import Ecto
import Ecto.Changeset
import Ecto.Query
import ExplorerWeb.Router.Helpers
import Explorer.Factory
end
end
setup tags do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Explorer.Repo)
unless tags[:async] do
Ecto.Adapters.SQL.Sandbox.mode(Explorer.Repo, {:shared, self()})
end
metadata = Phoenix.Ecto.SQL.Sandbox.metadata_for(Explorer.Repo, self())
{:ok, session} = Wallaby.start_session(metadata: metadata)
{:ok, session: session}
end
end