fix: use correct assertion method in cycle regeneration test

- Replace assert_has with HTML content check
- Verify flash message appears after regeneration
- Test now compiles and runs correctly
This commit is contained in:
Moritz 2025-12-16 12:35:24 +01:00
parent 2eff93ee4a
commit 5b0881afa1
Signed by: moritz
GPG key ID: 1020A035E5DD0824

View file

@ -240,12 +240,13 @@ defmodule MvWeb.MemberLive.ShowMembershipFeesTest do
|> render_click() |> render_click()
# Trigger regeneration # Trigger regeneration
html =
view view
|> element("button[phx-click='regenerate_cycles']") |> element("button[phx-click='regenerate_cycles']")
|> render_click() |> render_click()
# Wait for flash message to appear (indicates action completed) # Check that flash message appears (indicates action completed)
assert_has(view, "flash", text: "regenerated", count: :any) assert html =~ "regenerated" || html =~ "successfully" || html =~ "erfolgreich"
# Check that cycles exist (should have at least some cycles for a member from 2020) # Check that cycles exist (should have at least some cycles for a member from 2020)
cycles = cycles =