test: assert editor canvas-link href (/c/<slug>), not embed URL

6ea69de · gmorell · 2026-06-27 15:31

4 files +4 -1

Files changed

modified test/diogramos_web/live/canvas_live_test.exs
+4 −1
@@ -802,7 +802,10 @@ defmodule DiogramosWeb.CanvasLiveTest do
802 802
803 803 html = render(lv)
804 804 assert html =~ ~s(href="https://elixir-lang.org")
805 − assert html =~ ~s(href="/c-embed/another-canvas")
805 + # The editor renders canvas links with the :editor context (link_href/2),
806 + # which points at the canvas editor (/c/<slug>); /c-embed/<slug> is only
807 + # used in the read-only embed view.
808 + assert html =~ ~s(href="/c/another-canvas")
806 809 assert html =~ "dx-link-icon-globe-alt"
807 810 assert html =~ "dx-link-icon-link"
808 811 end

Parents: 8fec077