Fix failing tests after filter refactoring
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Update tests to use new cycle_status_filter parameter instead of membership_fee_filter. Fix button selector for toggle_cycle_view to target the header button. Fix edit cycle amount test to click on span element instead of button.
This commit is contained in:
parent
46fb12c3f4
commit
e3d615acb8
2 changed files with 6 additions and 5 deletions
|
|
@ -120,7 +120,7 @@ defmodule MvWeb.MemberLive.IndexMembershipFeeStatusTest do
|
||||||
|
|
||||||
# Toggle to current cycle (use the button in the header, not the one in the column)
|
# Toggle to current cycle (use the button in the header, not the one in the column)
|
||||||
view
|
view
|
||||||
|> element("button[phx-click='toggle_cycle_view'].btn-sm")
|
|> element("button[phx-click='toggle_cycle_view'].btn.gap-2")
|
||||||
|> render_click()
|
|> render_click()
|
||||||
|
|
||||||
html = render(view)
|
html = render(view)
|
||||||
|
|
@ -200,7 +200,7 @@ defmodule MvWeb.MemberLive.IndexMembershipFeeStatusTest do
|
||||||
refute Enum.empty?(cycles1)
|
refute Enum.empty?(cycles1)
|
||||||
refute Enum.empty?(cycles2)
|
refute Enum.empty?(cycles2)
|
||||||
|
|
||||||
{:ok, _view, html} = live(conn, "/members?membership_fee_filter=unpaid_last")
|
{:ok, _view, html} = live(conn, "/members?cycle_status_filter=unpaid")
|
||||||
|
|
||||||
assert html =~ "UnpaidMember"
|
assert html =~ "UnpaidMember"
|
||||||
refute html =~ "PaidMember"
|
refute html =~ "PaidMember"
|
||||||
|
|
@ -234,7 +234,8 @@ defmodule MvWeb.MemberLive.IndexMembershipFeeStatusTest do
|
||||||
refute Enum.empty?(cycles1)
|
refute Enum.empty?(cycles1)
|
||||||
refute Enum.empty?(cycles2)
|
refute Enum.empty?(cycles2)
|
||||||
|
|
||||||
{:ok, _view, html} = live(conn, "/members?membership_fee_filter=unpaid_current")
|
{:ok, _view, html} =
|
||||||
|
live(conn, "/members?cycle_status_filter=unpaid&show_current_cycle=true")
|
||||||
|
|
||||||
assert html =~ "UnpaidCurrent"
|
assert html =~ "UnpaidCurrent"
|
||||||
refute html =~ "PaidCurrent"
|
refute html =~ "PaidCurrent"
|
||||||
|
|
|
||||||
|
|
@ -219,9 +219,9 @@ defmodule MvWeb.MemberLive.MembershipFeeIntegrationTest do
|
||||||
|> element("button[phx-click='switch_tab'][phx-value-tab='membership_fees']")
|
|> element("button[phx-click='switch_tab'][phx-value-tab='membership_fees']")
|
||||||
|> render_click()
|
|> render_click()
|
||||||
|
|
||||||
# Open edit modal
|
# Open edit modal by clicking on the amount span
|
||||||
view
|
view
|
||||||
|> element("button[phx-click='edit_cycle_amount'][phx-value-cycle_id='#{cycle.id}']")
|
|> element("span[phx-click='edit_cycle_amount'][phx-value-cycle_id='#{cycle.id}']")
|
||||||
|> render_click()
|
|> render_click()
|
||||||
|
|
||||||
# Update amount
|
# Update amount
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue