refactor: review remarks
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Simon 2026-03-13 17:55:17 +01:00
parent f12da8a359
commit 349cee0ce6
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2
19 changed files with 300 additions and 100 deletions

View file

@ -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 (100300 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"