Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
APB9785 committed Jan 14, 2025
1 parent 5fe44de commit 032717e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/beacon/live_admin/live/page_editor_live/new_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ defmodule Beacon.LiveAdmin.PageEditorLive.NewTest do
test "create new page and patch to edit page", %{conn: conn} do

Check failure on line 16 in test/beacon/live_admin/live/page_editor_live/new_test.exs

View workflow job for this annotation

GitHub Actions / test: OTP 25.1 | Elixir 1.14.0 | Phoenix 1.7.0 | LV 0.20.2 | PG 13.0-alpine

test create new page and patch to edit page (Beacon.LiveAdmin.PageEditorLive.NewTest)

Check failure on line 16 in test/beacon/live_admin/live/page_editor_live/new_test.exs

View workflow job for this annotation

GitHub Actions / test: OTP 27 | Elixir 1.17 | Phoenix ~> 1.7 | LV ~> 1.0 | PG 16.4-alpine

test create new page and patch to edit page (Beacon.LiveAdmin.PageEditorLive.NewTest)
{:ok, live, _html} = live(conn, "/admin/site_a/pages/new")

live
|> form("#page-form", page: %{path: "/my/page", title: "My Page", format: "heex"})
|> render_submit(%{page: %{"template" => "<div>test</div>"}, save: "save"})
{:ok, live, _html} =
live
|> form("#page-form", page: %{path: "/my/page", title: "My Page", format: "heex"})
|> render_submit(%{page: %{"template" => "<div>test</div>"}, save: "save"})
|> follow_redirect(conn)

assert_patch(live)
assert has_element?(live, "#flash", "Page saved successfully")
assert has_element?(live, "h1", "Edit Page")
assert has_element?(live, "button", "Save Changes")
Expand Down

0 comments on commit 032717e

Please sign in to comment.