This commit is contained in:
parent
f12da8a359
commit
349cee0ce6
19 changed files with 300 additions and 100 deletions
|
|
@ -9,7 +9,8 @@ defmodule MvWeb.JoinLiveTest do
|
|||
Honeypot: form param `"website"` (legit-sounding name per best practice; not "honeypot").
|
||||
Field is hidden via CSS class in app.css (off-screen, no inline styles), type="text".
|
||||
"""
|
||||
use MvWeb.ConnCase, async: true
|
||||
# async: false so LiveView and test share sandbox (submit creates JoinRequest in LiveView process).
|
||||
use MvWeb.ConnCase, async: false
|
||||
import Phoenix.LiveViewTest
|
||||
import Ecto.Query
|
||||
|
||||
|
|
@ -53,6 +54,9 @@ defmodule MvWeb.JoinLiveTest do
|
|||
})
|
||||
|> render_submit()
|
||||
|
||||
# Anti-enumeration delay is applied in LiveView via send_after (100–300 ms); wait for success UI.
|
||||
Process.sleep(400)
|
||||
|
||||
assert count_join_requests() == count_before + 1
|
||||
assert view |> element("[data-testid='join-success-message']") |> has_element?()
|
||||
assert render(view) =~ "saved your details"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue