MCPcopy Index your code
hub / github.com/plotly/dash / test_rdps007_one_prop_changed

Function test_rdps007_one_prop_changed

tests/integration/renderer/test_persistence.py:274–296  ·  view source on GitHub ↗
(dash_duo)

Source from the content-addressed store, hash-verified

272
273
274def 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
299def test_rdps008_unsaved_part_changed(dash_duo):

Callers

nothing calls this directly

Calls 6

DashClass · 0.90
check_table_namesFunction · 0.85
rename_and_hideFunction · 0.85
find_elementMethod · 0.80
start_serverMethod · 0.45
clickMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…