(dash_duo)
| 450 | |
| 451 | |
| 452 | def test_pch005_clientside_duplicate(dash_duo): |
| 453 | app = Dash(__name__) |
| 454 | |
| 455 | app.layout = html.Div( |
| 456 | [ |
| 457 | html.Button("Click 1", id="click1"), |
| 458 | html.Button("Click 2", id="click2"), |
| 459 | html.Div("initial", id="output"), |
| 460 | ] |
| 461 | ) |
| 462 | |
| 463 | app.clientside_callback( |
| 464 | "function() { return 'click1';}", |
| 465 | Output("output", "children", allow_duplicate=True), |
| 466 | Input("click1", "n_clicks"), |
| 467 | prevent_initial_call=True, |
| 468 | ) |
| 469 | app.clientside_callback( |
| 470 | "function() { return 'click2';}", |
| 471 | Output("output", "children", allow_duplicate=True), |
| 472 | Input("click2", "n_clicks"), |
| 473 | prevent_initial_call=True, |
| 474 | ) |
| 475 | dash_duo.start_server(app) |
| 476 | |
| 477 | dash_duo.find_element("#click1").click() |
| 478 | dash_duo.wait_for_text_to_equal("#output", "click1") |
| 479 | |
| 480 | dash_duo.find_element("#click2").click() |
| 481 | dash_duo.wait_for_text_to_equal("#output", "click2") |
| 482 | |
| 483 | |
| 484 | def test_pch006_base_operators(dash_duo): |
nothing calls this directly
no test coverage detected
searching dependent graphs…