File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
tests/integration/callbacks Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,8 @@ def on_click(*args):
346
346
if not ctx .triggered :
347
347
raise PreventUpdate
348
348
for btn in btns :
349
- if btn in ctx .triggered_ids .values ():
349
+ if btn in ctx .triggered_prop_ids .values ():
350
+ assert btn == ctx .triggered_id
350
351
return f"Just clicked { btn } "
351
352
352
353
dash_duo .start_server (app )
@@ -372,11 +373,15 @@ def test_cbcx008_triggered_id_pmc(dash_duo):
372
373
)
373
374
def func (n_clicks ):
374
375
if ctx .triggered :
375
- triggered_id , dict_id = next (iter (ctx .triggered_ids .items ()))
376
+ triggered_id , dict_id = next (iter (ctx .triggered_prop_ids .items ()))
377
+
378
+ assert dict_id == ctx .triggered_id
379
+
376
380
if dict_id == {"type" : "btn" , "index" : "myindex" }:
377
381
return dict_id ["index" ]
378
382
379
383
dash_duo .start_server (app )
384
+
380
385
dash_duo .find_element (
381
386
'#\\ {\\ "index\\ "\\ :\\ "myindex\\ "\\ ,\\ "type\\ "\\ :\\ "btn\\ "\\ }'
382
387
).click ()
You can’t perform that action at this time.
0 commit comments