@@ -23,45 +23,6 @@ defmodule LivebookWeb.FileSelectComponentTest do
2323 refute render_component ( FileSelectComponent , attrs ( file: file ) ) =~ ".."
2424 end
2525
26- test "shows loading when changing directories" do
27- file = FileSystem.File . local ( notebooks_path ( ) <> "/" )
28-
29- # Initial render in one directory
30- html = render_component ( FileSelectComponent , attrs ( file: file ) )
31-
32- # Loading should not be shown after initial render
33- refute html =~ ~s( role="status")
34-
35- # Simulate changing to a different directory via send_update with a new file
36- new_file = FileSystem.File . local ( p ( "/" ) )
37-
38- html = render_component ( FileSelectComponent , attrs ( file: new_file ) )
39-
40- # After changing directory, loading should be reset to false after listing
41- refute html =~ ~s( role="status")
42- end
43-
44- test "does not show loading when only running_files changes" do
45- file = FileSystem.File . local ( notebooks_path ( ) <> "/" )
46- running_file = FileSystem.File . local ( notebooks_path ( ) <> "/basic.livemd" )
47-
48- # Initial render with no running files
49- html = render_component ( FileSelectComponent , attrs ( file: file , running_files: [ ] ) )
50-
51- refute html =~ ~s( role="status")
52- # Verify basic.livemd is shown but not marked as running
53- assert html =~ "basic.livemd"
54- refute html =~ "play-circle-line"
55-
56- # Update with running_files changed
57- html = render_component ( FileSelectComponent , attrs ( file: file , running_files: [ running_file ] ) )
58-
59- # Loading should not be shown when only running_files changes
60- refute html =~ ~s( role="status")
61- # Verify basic.livemd is now marked as running
62- assert html =~ "play-circle-line"
63- end
64-
6526 defp attrs ( attrs ) do
6627 Keyword . merge (
6728 [
0 commit comments