This is my first time using Wallaby and I am not sure how to resolve this issue - (DBConnection.OwnershipError) cannot find ownership process for #PID<0.564.0>.
This is my login_test.exs
defmodule E2E.LoginTest do
use ExUnit.Case, async: false
use Wallaby.Feature
import Wallaby.Browser
import Wallaby.Query, only: [text_field: 1, button: 1, css: 2]
alias Wallaby.{Element, Query}
setup do
# Explicitly get a connection before each test
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Calorie.Repo)
end
test "a user can register with the system" do
{:ok, session} = Wallaby.start_session()
session
|> visit("http://localhost:4000/users/new")
|> fill_in(text_field("Name"), with: "test2")
|> fill_in(text_field("Username"), with: "test2")
|> fill_in(text_field("Password"), with: "123Pasword123")
|> find(Query.text("Create User"), fn el -> Element.click(el) end)
Process.sleep(20_000)
assert_text(session, "Listing Users")
end
end
I will be grateful for explanation and help.