search tags when on click
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -37,6 +37,14 @@ defmodule MemexWeb.ContextLiveTest do
|
||||
assert html =~ context.slug
|
||||
end
|
||||
|
||||
test "searches by tag", %{conn: conn} do
|
||||
{:ok, index_live, html} = live(conn, Routes.context_index_path(conn, :index))
|
||||
|
||||
assert html =~ "example-tag"
|
||||
assert index_live |> element("a", "example-tag") |> render_click()
|
||||
assert_patch(index_live, Routes.context_index_path(conn, :search, "example-tag"))
|
||||
end
|
||||
|
||||
test "saves new context", %{conn: conn} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.context_index_path(conn, :index))
|
||||
|
||||
@ -146,6 +154,14 @@ defmodule MemexWeb.ContextLiveTest do
|
||||
]
|
||||
end
|
||||
|
||||
test "searches by tag", %{conn: conn, context: context} do
|
||||
{:ok, show_live, html} = live(conn, Routes.context_show_path(conn, :show, context.slug))
|
||||
|
||||
assert html =~ "example-tag"
|
||||
assert show_live |> element("a", "example-tag") |> render_click()
|
||||
assert_redirect(show_live, Routes.context_index_path(conn, :search, "example-tag"))
|
||||
end
|
||||
|
||||
test "displays context", %{conn: conn, context: context, note: %{slug: note_slug}} do
|
||||
{:ok, show_live, html} = live(conn, Routes.context_show_path(conn, :show, context.slug))
|
||||
|
||||
|
@ -38,6 +38,14 @@ defmodule MemexWeb.NoteLiveTest do
|
||||
assert html =~ note.slug
|
||||
end
|
||||
|
||||
test "searches by tag", %{conn: conn} do
|
||||
{:ok, index_live, html} = live(conn, Routes.note_index_path(conn, :index))
|
||||
|
||||
assert html =~ "example-tag"
|
||||
assert index_live |> element("a", "example-tag") |> render_click()
|
||||
assert_patch(index_live, Routes.note_index_path(conn, :search, "example-tag"))
|
||||
end
|
||||
|
||||
test "saves new note", %{conn: conn} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.note_index_path(conn, :index))
|
||||
|
||||
@ -147,6 +155,14 @@ defmodule MemexWeb.NoteLiveTest do
|
||||
]
|
||||
end
|
||||
|
||||
test "searches by tag", %{conn: conn, note: note} do
|
||||
{:ok, show_live, html} = live(conn, Routes.note_show_path(conn, :show, note.slug))
|
||||
|
||||
assert html =~ "example-tag"
|
||||
assert show_live |> element("a", "example-tag") |> render_click()
|
||||
assert_redirect(show_live, Routes.note_index_path(conn, :search, "example-tag"))
|
||||
end
|
||||
|
||||
test "displays context", %{
|
||||
conn: conn,
|
||||
backlinked_note: %{slug: backlinked_note_slug},
|
||||
|
@ -48,6 +48,14 @@ defmodule MemexWeb.PipelineLiveTest do
|
||||
assert html =~ pipeline.description
|
||||
end
|
||||
|
||||
test "searches by tag", %{conn: conn} do
|
||||
{:ok, index_live, html} = live(conn, Routes.pipeline_index_path(conn, :index))
|
||||
|
||||
assert html =~ "example-tag"
|
||||
assert index_live |> element("a", "example-tag") |> render_click()
|
||||
assert_patch(index_live, Routes.pipeline_index_path(conn, :search, "example-tag"))
|
||||
end
|
||||
|
||||
test "saves new pipeline", %{conn: conn} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.pipeline_index_path(conn, :index))
|
||||
|
||||
@ -175,6 +183,14 @@ defmodule MemexWeb.PipelineLiveTest do
|
||||
]
|
||||
end
|
||||
|
||||
test "searches by tag", %{conn: conn, pipeline: pipeline} do
|
||||
{:ok, show_live, html} = live(conn, Routes.pipeline_show_path(conn, :show, pipeline.slug))
|
||||
|
||||
assert html =~ "example-tag"
|
||||
assert show_live |> element("a", "example-tag") |> render_click()
|
||||
assert_redirect(show_live, Routes.pipeline_index_path(conn, :search, "example-tag"))
|
||||
end
|
||||
|
||||
test "updates a step", %{conn: conn, pipeline: pipeline, step: step} do
|
||||
{:ok, show_live, _html} = live(conn, Routes.pipeline_show_path(conn, :show, pipeline.slug))
|
||||
|
||||
|
Reference in New Issue
Block a user