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:
parent
2eff93ee4a
commit
5b0881afa1
1 changed files with 6 additions and 5 deletions
|
|
@ -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 =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue