(dash_duo)
| 209 | |
| 210 | @flaky.flaky(max_runs=3) |
| 211 | def test_rdps005_persisted_props(dash_duo): |
| 212 | app = Dash(__name__) |
| 213 | app.layout = html.Div( |
| 214 | [ |
| 215 | html.Button("toggle persisted_props", id="toggle-table"), |
| 216 | html.Div(id="container"), |
| 217 | ] |
| 218 | ) |
| 219 | |
| 220 | @app.callback(Output("container", "children"), [Input("toggle-table", "n_clicks")]) |
| 221 | def toggle_table(n): |
| 222 | if (n or 0) % 2: |
| 223 | return simple_table(persisted_props=["data", "columns.name"]) |
| 224 | return simple_table() |
| 225 | |
| 226 | dash_duo.start_server(app) |
| 227 | check_table_names(dash_duo, ["a", "b"]) |
| 228 | |
| 229 | rename_and_hide(dash_duo) |
| 230 | check_table_names(dash_duo, [NEW_NAME]) |
| 231 | |
| 232 | dash_duo.find_element("#toggle-table").click() |
| 233 | # hidden_columns not persisted |
| 234 | check_table_names(dash_duo, [NEW_NAME, "b"]) |
| 235 | |
| 236 | dash_duo.find_element("#toggle-table").click() |
| 237 | # back to original persisted_props hidden_columns returns |
| 238 | check_table_names(dash_duo, [NEW_NAME]) |
| 239 | |
| 240 | |
| 241 | def test_rdps006_move_on_page(dash_duo): |
nothing calls this directly
no test coverage detected
searching dependent graphs…