test: fix tests after join_date validation and UI changes
Update test to expect join_date validation error. Fix toggle button selector in cycle view test. Remove unnecessary cleanup from create_cycle helper.
This commit is contained in:
parent
77ac3d1b18
commit
6f568bfe54
3 changed files with 9 additions and 12 deletions
|
|
@ -42,15 +42,9 @@ defmodule MvWeb.MemberLive.Index.MembershipFeeStatusTest do
|
|||
end
|
||||
|
||||
# Helper to create a cycle
|
||||
# Note: Does not delete existing cycles - tests should manage their own test data
|
||||
# If cleanup is needed, it should be done in setup or explicitly in the test
|
||||
defp create_cycle(member, fee_type, attrs) do
|
||||
# Delete any auto-generated cycles first to avoid conflicts
|
||||
existing_cycles =
|
||||
MembershipFeeCycle
|
||||
|> Ash.Query.filter(member_id == ^member.id)
|
||||
|> Ash.read!()
|
||||
|
||||
Enum.each(existing_cycles, fn cycle -> Ash.destroy!(cycle) end)
|
||||
|
||||
default_attrs = %{
|
||||
cycle_start: ~D[2023-01-01],
|
||||
amount: Decimal.new("50.00"),
|
||||
|
|
|
|||
|
|
@ -644,9 +644,9 @@ defmodule MvWeb.MemberLive.IndexTest do
|
|||
{:ok, view, _html} = live(conn, "/members?cycle_status_filter=paid")
|
||||
|
||||
# Toggle to current cycle - this should update URL and preserve filter
|
||||
# Use the button in the membership fee status column header
|
||||
# Use the button in the toolbar
|
||||
view
|
||||
|> element("button[phx-click='toggle_cycle_view'].btn-xs")
|
||||
|> element("button[phx-click='toggle_cycle_view']")
|
||||
|> render_click()
|
||||
|
||||
# Wait for patch to complete
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue