Skip to content
Snippets Groups Projects

Implement tests for FR-19 and FR-20

Merged kerdo requested to merge 29-fr-19-save-last-5-searches into main
4 files
+ 82
36
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -168,6 +168,28 @@ defmodule PropertySearchContext do
{:ok, state}
end
and_ ~r/^I go to the homepage$/, fn state ->
navigate_to("/")
{:ok, state}
end
then_ ~r/^I should not see a search button$/, fn state ->
refute visible_in_page? ~r/Search/
els = find_all_elements(:id, "search_button")
assert length(els) == 0
{:ok, state}
end
and_ ~r/^I go to the search URL$/, fn state ->
navigate_to("/search")
{:ok, state}
end
then_ ~r/^I should be redirected to the login page$/, fn state ->
assert current_path() == "/login"
{:ok, state}
end
defp setup_session(email, password) do
navigate_to("/login")
fill_field({:id, "email"}, email)
Loading