From 63ae78129fccdfa9c3fa3f4cbb9a0aa1f14268ec Mon Sep 17 00:00:00 2001 From: Willem van den Ende Date: Tue, 7 Jul 2026 13:33:50 +0100 Subject: [PATCH] fixed test - clicking on line instead of parts in svg --- app/test/firehose_web/live/microprints_live_test.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test/firehose_web/live/microprints_live_test.exs b/app/test/firehose_web/live/microprints_live_test.exs index d42ec78..6c9723b 100644 --- a/app/test/firehose_web/live/microprints_live_test.exs +++ b/app/test/firehose_web/live/microprints_live_test.exs @@ -90,9 +90,9 @@ defmodule FirehoseWeb.MicroprintsLiveTest do assert html =~ ~s(phx-value-path="#{file_a}") assert html =~ "Collapse" - # Highlight a line in file B via direct event (avoids brittle DOM selector) - view - |> render_click("highlight_line", %{"line" => "1", "path" => file_b}) + # Highlight a line in file B by dispatching the highlight_line event + # (microprint renders multiple rect segments per line, element() can't pick one) + render_click(view, "highlight_line", %{"line" => "1", "path" => file_b}) # file A should be collapsed when highlighting a different file html = render(view)