File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
tests/playwright/shiny/components/dynamic_navs Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 2525
2626
2727def server (input : Inputs , output : Outputs , session : Session ):
28+
29+ @reactive .effect
30+ def _ ():
31+ ui .insert_nav_panel (
32+ "tabs" ,
33+ "Stringy Panel" ,
34+ target = "Foo" ,
35+ position = "before" ,
36+ )
37+ ui .insert_nav_panel (
38+ "tabs" ,
39+ "Stringier Panel" ,
40+ target = "s2" ,
41+ position = "before" ,
42+ )
43+
2844 @reactive .effect ()
2945 @reactive .event (input .add )
3046 def _ ():
Original file line number Diff line number Diff line change 1010def test_dynamic_navs (page : Page , local_app : ShinyAppProc ) -> None :
1111 page .goto (local_app .url )
1212
13+ # String insertion as panels worked correctly
14+ expect (page .get_by_text ("Stringy Panel" )).to_be_visible ()
15+ page .get_by_role ("button" , name = "Menu" , exact = True ).click ()
16+ expect (page .get_by_text ("Stringier Panel" )).to_be_visible ()
17+ page .get_by_role ("button" , name = "Menu" , exact = True ).click ()
18+
1319 # Page begins with 2 tabs: "Hello" and "Foo" and a nav menu with 2 static items.
1420 navset_tab = controller .NavsetTab (page , "tabs" )
1521
You can’t perform that action at this time.
0 commit comments