@@ -10,9 +10,12 @@ def global_callback_error_handler(err):
10
10
app .layout = [
11
11
html .Button ("start" , id = "start-local" ),
12
12
html .Button ("start-global" , id = "start-global" ),
13
+ html .Button ("start-grouped" , id = "start-grouped" ),
13
14
html .Div (id = "output" ),
14
15
html .Div (id = "output-global" ),
15
16
html .Div (id = "error-message" ),
17
+ # test for #2983
18
+ html .Div ("default-value" , id = "grouped-output" ),
16
19
]
17
20
18
21
def on_callback_error (err ):
@@ -36,6 +39,14 @@ def on_start(_):
36
39
def on_start_global (_ ):
37
40
raise Exception ("global error" )
38
41
42
+ @app .callback (
43
+ output = dict (test = Output ("grouped-output" , "children" )),
44
+ inputs = dict (start = Input ("start-grouped" , "n_clicks" )),
45
+ prevent_initial_call = True ,
46
+ )
47
+ def on_start_grouped (start = 0 ):
48
+ raise Exception ("grouped error" )
49
+
39
50
dash_duo .start_server (app )
40
51
dash_duo .find_element ("#start-local" ).click ()
41
52
@@ -44,3 +55,9 @@ def on_start_global(_):
44
55
45
56
dash_duo .find_element ("#start-global" ).click ()
46
57
dash_duo .wait_for_text_to_equal ("#output-global" , "global: global error" )
58
+
59
+ dash_duo .find_element ("#start-grouped" ).click ()
60
+ dash_duo .wait_for_text_to_equal ("#output-global" , "global: grouped error" )
61
+ dash_duo .wait_for_text_to_equal ("#grouped-output" , "default-value" )
62
+
63
+ assert dash_duo .get_logs () == []
0 commit comments