(dash_duo)
| 272 | |
| 273 | |
| 274 | def test_rdps007_one_prop_changed(dash_duo): |
| 275 | app = Dash(__name__) |
| 276 | app.layout = html.Div( |
| 277 | [html.Button("hide/show cols", id="hide-cols"), html.Div(id="container")] |
| 278 | ) |
| 279 | |
| 280 | @app.callback(Output("container", "children"), [Input("hide-cols", "n_clicks")]) |
| 281 | def hide_cols(n): |
| 282 | return simple_table(hidden_columns=["c0"] if (n or 0) % 2 else []) |
| 283 | |
| 284 | dash_duo.start_server(app) |
| 285 | check_table_names(dash_duo, ["a", "b"]) |
| 286 | |
| 287 | rename_and_hide(dash_duo) |
| 288 | check_table_names(dash_duo, [NEW_NAME]) |
| 289 | |
| 290 | dash_duo.find_element("#hide-cols").click() |
| 291 | # hidden_columns gets the new value |
| 292 | check_table_names(dash_duo, ["b"]) |
| 293 | |
| 294 | dash_duo.find_element("#hide-cols").click() |
| 295 | # back to original hidden_columns, but saved value won't come back |
| 296 | check_table_names(dash_duo, [NEW_NAME, "b"]) |
| 297 | |
| 298 | |
| 299 | def test_rdps008_unsaved_part_changed(dash_duo): |
nothing calls this directly
no test coverage detected
searching dependent graphs…