diff --git a/config/config.exs b/config/config.exs
index 7b13205c0..c63756e58 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -78,7 +78,8 @@ end
if config_env() == :test do
config :live_debugger,
server: true,
- port: 4008
+ port: 4008,
+ unit_test?: true
config :live_debugger, update_checks?: false
diff --git a/lib/live_debugger/app/debugger/callback_tracing/web/components/trace.ex b/lib/live_debugger/app/debugger/callback_tracing/web/components/trace.ex
index f5987d588..99461ee69 100644
--- a/lib/live_debugger/app/debugger/callback_tracing/web/components/trace.ex
+++ b/lib/live_debugger/app/debugger/callback_tracing/web/components/trace.ex
@@ -488,7 +488,7 @@ defmodule LiveDebugger.App.Debugger.CallbackTracing.Web.Components.Trace do
~H"""
<.icon name="icon-info" class="w-4 h-4 shrink-0" />
-
<%= clean_error_message(@error.message) %>
+
<%= clean_error_message(@error.message) %>
"""
end
diff --git a/lib/live_debugger/app/debugger/streams/queries.ex b/lib/live_debugger/app/debugger/streams/queries.ex
index ec96378ce..731c3100e 100644
--- a/lib/live_debugger/app/debugger/streams/queries.ex
+++ b/lib/live_debugger/app/debugger/streams/queries.ex
@@ -7,8 +7,6 @@ defmodule LiveDebugger.App.Debugger.Streams.Queries do
alias LiveDebugger.App.Debugger.Streams.StreamUtils
- require Logger
-
@type streams_result :: %{
functions: [function()],
config: map(),
@@ -16,7 +14,7 @@ defmodule LiveDebugger.App.Debugger.Streams.Queries do
}
@spec fetch_streams_from_render_traces(pid :: pid(), node_id :: TreeNode.id()) ::
- {:ok, streams_result()} | {:error, String.t()}
+ {:ok, streams_result()} | :end_of_table
def fetch_streams_from_render_traces(pid, node_id) do
with {:ok, render_traces} <- fetch_render_traces(pid, node_id),
stream_traces <- StreamUtils.extract_stream_traces(render_traces),
@@ -27,10 +25,6 @@ defmodule LiveDebugger.App.Debugger.Streams.Queries do
else
:end_of_table ->
:end_of_table
-
- error ->
- Logger.error("Failed to fetch streams: #{inspect(error)}")
- {:error, "Failed to fetch streams"}
end
end
diff --git a/lib/live_debugger/app/web/components.ex b/lib/live_debugger/app/web/components.ex
index 76fc43abe..d5a2979f2 100644
--- a/lib/live_debugger/app/web/components.ex
+++ b/lib/live_debugger/app/web/components.ex
@@ -226,7 +226,7 @@ defmodule LiveDebugger.App.Web.Components do
attr(:variant, :string, default: "primary", values: ["primary", "secondary"])
attr(:size, :string, default: "md", values: ["md", "sm"])
attr(:class, :any, default: nil, doc: "Additional classes to add to the button.")
- attr(:rest, :global, include: ~w(disabled))
+ attr(:rest, :global, include: ~w(disabled type))
slot(:inner_block, required: true)
diff --git a/lib/live_debugger/env.ex b/lib/live_debugger/env.ex
index 6e62be809..474bee1c2 100644
--- a/lib/live_debugger/env.ex
+++ b/lib/live_debugger/env.ex
@@ -24,9 +24,8 @@ defmodule LiveDebugger.Env do
def dev?(), do: false
end
- if Mix.env() == :test do
- def unit_test?(), do: not Application.get_env(:live_debugger, :e2e?, false)
- else
- def unit_test?(), do: false
+ def unit_test?() do
+ Application.get_env(:live_debugger, :unit_test?, false) and
+ not Application.get_env(:live_debugger, :e2e?, false)
end
end