2022-05-26 04:17:52 +12:00
|
|
|
defmodule AshAdmin.Test.PageLiveTest do
|
|
|
|
use ExUnit.Case, async: false
|
|
|
|
|
|
|
|
import Phoenix.ConnTest
|
|
|
|
import Phoenix.LiveViewTest
|
|
|
|
@endpoint AshAdmin.Test.Endpoint
|
|
|
|
|
|
|
|
setup do
|
|
|
|
%{conn: build_conn()}
|
|
|
|
end
|
|
|
|
|
|
|
|
test "it renders the schema by default", %{conn: conn} do
|
2023-03-26 14:09:46 +13:00
|
|
|
{:ok, _view, html} = live(conn, "/api/admin")
|
2022-05-26 04:17:52 +12:00
|
|
|
|
|
|
|
assert html =~ "Attributes"
|
|
|
|
assert html =~ "body"
|
|
|
|
assert html =~ "String"
|
2023-03-26 14:09:46 +13:00
|
|
|
|
|
|
|
{:ok, _view, html} = live(conn, "/api/admin/test")
|
|
|
|
|
|
|
|
assert html =~ "Attributes"
|
|
|
|
assert html =~ "body"
|
|
|
|
assert html =~ "String"
|
|
|
|
end
|
2022-05-26 04:17:52 +12:00
|
|
|
end
|