(hook_cleanup, dash_duo)
| 173 | |
| 174 | |
| 175 | def test_hook009_hook_clientside_callback(hook_cleanup, dash_duo): |
| 176 | hooks.clientside_callback( |
| 177 | "(n) => `Called ${n}`", |
| 178 | Output("hook-output", "children"), |
| 179 | Input("hook-start", "n_clicks"), |
| 180 | prevent_initial_call=True, |
| 181 | ) |
| 182 | |
| 183 | app = Dash() |
| 184 | app.layout = [ |
| 185 | html.Button("start", id="hook-start"), |
| 186 | html.Div(id="hook-output"), |
| 187 | ] |
| 188 | |
| 189 | dash_duo.start_server(app) |
| 190 | |
| 191 | dash_duo.wait_for_element("#hook-start").click() |
| 192 | dash_duo.wait_for_text_to_equal("#hook-output", "Called 1") |
| 193 | |
| 194 | |
| 195 | def test_hook010_hook_custom_data(hook_cleanup, dash_duo): |
nothing calls this directly
no test coverage detected
searching dependent graphs…