So I’m trying to write a pretty basic integration test that clicks a login link, fills in an instagram login, and returns to a logged in home page. Finding and clicking the login link works, but when I get to the instagram login page the session seems to hang. Here’s the entirety of my test:
defmodule LinxtaWeb.LandingPageTest do
use LinxtaWeb.FeatureCase, async: true
import Wallaby.Query
test "can log in", %{session: session} do
session
|> visit("/")
|> find(css(".landing"))
|> assert_has(css(".cta", text: "Start Here"))
|> click(css(".cta"))
# Instagraph login page? Hangs here.
|> fill_in(text_field("username"), with: "sometestusername")
|> fill_in(text_field("password"), with: "sometestpassword")
|> click(button("Log in"))
end
end
I’m using the Chrome driver and when I turn off headless mode the browser seems to be correctly loading the instagram page. I assume that I’m missing something obvious.
My google fu might be a bit weak but I haven’t found anything indicating that this should be a tricky thing to pull off.
Any thoughts/pointers would be rad. Thanks!