Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ defmodule LiveDebugger.App.Debugger.AsyncJobs.Web.AsyncJobsLive do
<%= async_jobs_failed(@async_jobs) %>
</:failed>
<div :if={Enum.empty?(async_jobs)} class="w-full flex items-center justify-center">
<span class=" text-secondary-text">No async jobs found</span>
<span class=" text-secondary-text">No active async jobs found</span>
</div>
<.async_job
:for={async_job <- async_jobs}
Expand Down Expand Up @@ -148,6 +148,12 @@ defmodule LiveDebugger.App.Debugger.AsyncJobs.Web.AsyncJobsLive do
|> noreply()
end

def handle_async(:fetch_async_jobs, {:ok, {:error, :not_alive_or_not_a_liveview}}, socket) do
socket
|> assign(:async_jobs, AsyncResult.ok([]))
|> noreply()
end

def handle_async(:fetch_async_jobs, {:ok, {:error, reason}}, socket) do
socket
|> assign(:async_jobs, AsyncResult.failed(AsyncResult.loading(), reason))
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/async_jobs_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ defmodule LiveDebugger.E2E.AsyncJobsTest do

defp async_job_name(name), do: css("#async-jobs p.font-medium", text: name)

defp no_async_jobs(), do: css("#async-jobs", text: "No async jobs found")
defp no_async_jobs(), do: css("#async-jobs", text: "No active async jobs found")

defp node_module_info(text),
do: css("#node-inspector-basic-info-current-node-module", text: text)
Expand Down