fix: datafield edit view was shown alongside othe relements
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
faf80bfb4b
commit
9751525a0c
8 changed files with 85 additions and 41 deletions
|
|
@ -123,13 +123,17 @@ defmodule MvWeb.UserLive.IndexTest do
|
|||
{:ok, index_view, _html} = live(conn, "/users")
|
||||
assert render(index_view) =~ "delete-me@example.com"
|
||||
|
||||
# Navigate to user show and trigger delete from Danger zone
|
||||
# Navigate to user show, open delete modal, then confirm in modal (WCAG modal pattern)
|
||||
{:ok, show_view, _html} = live(conn, "/users/#{user.id}")
|
||||
|
||||
show_view
|
||||
|> element("[data-testid=user-delete]")
|
||||
|> render_click()
|
||||
|
||||
show_view
|
||||
|> element("#delete-user-modal button", "Delete")
|
||||
|> render_click()
|
||||
|
||||
# Should redirect to index
|
||||
assert_redirect(show_view, "/users")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue