File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
tests/integration/callbacks Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -823,3 +823,38 @@ def on_click(_):
823
823
824
824
dash_duo .wait_for_text_to_equal ("#output" , "done" )
825
825
dash_duo .wait_for_text_to_equal ("#running" , "off" )
826
+
827
+
828
+ def test_cbsc020_callback_running_non_existing_component (dash_duo ):
829
+ lock = Lock ()
830
+ app = Dash (__name__ )
831
+
832
+ app .layout = html .Div (
833
+ [
834
+ html .Button ("start" , id = "start" ),
835
+ html .Div (id = "output" ),
836
+ ]
837
+ )
838
+
839
+ @app .callback (
840
+ Output ("output" , "children" ),
841
+ Input ("start" , "n_clicks" ),
842
+ running = [
843
+ [
844
+ Output ("non_existent_component" , "children" ),
845
+ html .B ("on" , id = "content" ),
846
+ "off" ,
847
+ ]
848
+ ],
849
+ prevent_initial_call = True ,
850
+ )
851
+ def on_click (_ ):
852
+ with lock :
853
+ pass
854
+ return "done"
855
+
856
+ dash_duo .start_server (app )
857
+ with lock :
858
+ dash_duo .find_element ("#start" ).click ()
859
+
860
+ dash_duo .wait_for_text_to_equal ("#output" , "done" )
You can’t perform that action at this time.
0 commit comments