test: adapt tests to reflect implementation details
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simon 2026-01-27 23:40:12 +01:00
parent 5e0b6580ae
commit 9991291b2f
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2
7 changed files with 98 additions and 71 deletions

View file

@ -31,7 +31,7 @@ defmodule MvWeb.GroupLive.IntegrationTest do
}
view
|> form("form", group: form_data)
|> form("#group-form", group: form_data)
|> render_submit()
# Get the created group by name using current user (tests authorization)
@ -54,7 +54,7 @@ defmodule MvWeb.GroupLive.IntegrationTest do
}
view
|> form("form", group: form_data)
|> form("#group-form", group: form_data)
|> render_submit()
# View again via slug (should still work with original slug)
@ -63,7 +63,7 @@ defmodule MvWeb.GroupLive.IntegrationTest do
assert html =~ "Updated Workflow Test Group"
assert html =~ "Updated description"
# Slug should remain unchanged
assert html =~ original_slug || html =~ "workflow-test-group"
assert html =~ original_slug or html =~ "workflow-test-group"
end
test "create group → add members → view (member count updated)", %{
@ -78,7 +78,7 @@ defmodule MvWeb.GroupLive.IntegrationTest do
}
view
|> form("form", group: form_data)
|> form("#group-form", group: form_data)
|> render_submit()
# Get the created group using current user (tests authorization)
@ -102,9 +102,9 @@ defmodule MvWeb.GroupLive.IntegrationTest do
{:ok, _view, html} = live(conn, "/groups/#{group.slug}")
# Member count should be 2
assert html =~ "2" || html =~ gettext("Members")
assert html =~ member1.first_name || html =~ member1.last_name
assert html =~ member2.first_name || html =~ member2.last_name
assert html =~ "2" or html =~ gettext("Members") or html =~ "Mitglieder"
assert html =~ member1.first_name or html =~ member1.last_name
assert html =~ member2.first_name or html =~ member2.last_name
end
test "create group → add members → delete (cascade works)", %{
@ -119,7 +119,7 @@ defmodule MvWeb.GroupLive.IntegrationTest do
}
view
|> form("form", group: form_data)
|> form("#group-form", group: form_data)
|> render_submit()
# Get the created group using current user (tests authorization)