Skip to content

Commit

Permalink
fix id in test
Browse files Browse the repository at this point in the history
  • Loading branch information
APB9785 committed Apr 27, 2024
1 parent 6d5cb6b commit 47fc124
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/beacon/live_admin/live/live_data_editor_live/index_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ defmodule Beacon.LiveAdmin.LiveDataEditorLive.IndexTest do
|> form("#live-data-path-search")
|> render_change(%{"search" => %{"query" => ld1.path}})

assert has_element?(view, "live-data-table-row-#{ld1.id}")
refute has_element?(view, "live-data-table-row-#{ld2.id}")
assert has_element?(view, "#live-data-table-row-#{ld1.id}")
refute has_element?(view, "#live-data-table-row-#{ld2.id}")

view
|> form("#live-data-path-search")
|> render_change(%{"search" => %{"query" => ld2.path}})

refute has_element?(view, "live-data-table-row-#{ld1.id}")
assert has_element?(view, "live-data-table-row-#{ld2.id}")
refute has_element?(view, "#live-data-table-row-#{ld1.id}")
assert has_element?(view, "#live-data-table-row-#{ld2.id}")
end

test "create new path", %{conn: conn} do

Check failure on line 45 in test/beacon/live_admin/live/live_data_editor_live/index_test.exs

View workflow job for this annotation

GitHub Actions / test: OTP 25.1 | Elixir 1.13.4 | Phoenix 1.7.0 | LiveView 0.20.2

test create new path (Beacon.LiveAdmin.LiveDataEditorLive.IndexTest)

Check failure on line 45 in test/beacon/live_admin/live/live_data_editor_live/index_test.exs

View workflow job for this annotation

GitHub Actions / test: OTP 26 | Elixir 1.16 | Phoenix ~> 1.7 | LiveView ~> 0.20

test create new path (Beacon.LiveAdmin.LiveDataEditorLive.IndexTest)
Expand All @@ -58,7 +58,7 @@ defmodule Beacon.LiveAdmin.LiveDataEditorLive.IndexTest do
assert render(view) =~ "/my/fun/path"
end

test "edit existing path", %{conn: conn, live_data: [ld1, ld2]} do
test "edit existing path", %{conn: conn, live_data: [ld1, _ld2]} do

Check failure on line 61 in test/beacon/live_admin/live/live_data_editor_live/index_test.exs

View workflow job for this annotation

GitHub Actions / test: OTP 25.1 | Elixir 1.13.4 | Phoenix 1.7.0 | LiveView 0.20.2

test edit existing path (Beacon.LiveAdmin.LiveDataEditorLive.IndexTest)

Check failure on line 61 in test/beacon/live_admin/live/live_data_editor_live/index_test.exs

View workflow job for this annotation

GitHub Actions / test: OTP 26 | Elixir 1.16 | Phoenix ~> 1.7 | LiveView ~> 0.20

test edit existing path (Beacon.LiveAdmin.LiveDataEditorLive.IndexTest)
{:ok, view, _html} = live(conn, "/admin/site_a/live_data/edit/#{ld1.id}")

new_path = "/testposts/:post_id"
Expand Down

0 comments on commit 47fc124

Please sign in to comment.