Skip to content

Commit 2086f4a

Browse files
committed
Updating all camelcase before .loc edits
1 parent 8d4f201 commit 2086f4a

File tree

4 files changed

+28
-30
lines changed

4 files changed

+28
-30
lines changed

tests/playwright/shiny/components/dynamic_navs/app.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
app_ui = ui.page_sidebar(
44
ui.sidebar(
55
ui.input_action_button("add", "Add 'Dynamic' tab"),
6-
ui.input_action_button("removeFoo", "Remove 'Foo' tabs"),
7-
ui.input_action_button("addFoo", "Add New 'Foo' tab"),
8-
ui.input_action_button("hideTab", "Hide 'Foo' tab"),
9-
ui.input_action_button("showTab", "Show 'Foo' tab"),
10-
ui.input_action_button("hideMenu", "Hide 'Static' nav_menu"),
11-
ui.input_action_button("showMenu", "Show 'Static' nav_menu"),
6+
ui.input_action_button("remove_foo", "Remove 'Foo' tabs"),
7+
ui.input_action_button("add_foo", "Add New 'Foo' tab"),
8+
ui.input_action_button("hide_tab", "Hide 'Foo' tab"),
9+
ui.input_action_button("show_tab", "Show 'Foo' tab"),
10+
ui.input_action_button("hide_menu", "Hide 'Static' nav_menu"),
11+
ui.input_action_button("show_menu", "Show 'Static' nav_menu"),
1212
),
1313
ui.navset_tab(
1414
ui.nav_panel("Hello", "This is the hello tab", value="Hello"),
@@ -53,14 +53,14 @@ def _():
5353
)
5454

5555
@reactive.effect
56-
@reactive.event(input.removeFoo)
56+
@reactive.event(input.remove_foo)
5757
def _():
5858
ui.remove_nav_panel("tabs", target="Foo")
5959

6060
@reactive.effect
61-
@reactive.event(input.addFoo)
61+
@reactive.event(input.add_foo)
6262
def _():
63-
n = str(input.addFoo())
63+
n = str(input.add_foo())
6464
ui.insert_nav_panel(
6565
"tabs",
6666
ui.nav_panel("Foo-" + n, "Foo-" + n, value="Foo"),
@@ -70,22 +70,22 @@ def _():
7070
)
7171

7272
@reactive.effect
73-
@reactive.event(input.hideTab)
73+
@reactive.event(input.hide_tab)
7474
def _():
7575
ui.update_nav_panel("tabs", target="Foo", method="hide")
7676

7777
@reactive.effect
78-
@reactive.event(input.showTab)
78+
@reactive.event(input.show_tab)
7979
def _():
8080
ui.update_nav_panel("tabs", target="Foo", method="show")
8181

8282
@reactive.effect
83-
@reactive.event(input.hideMenu)
83+
@reactive.event(input.hide_menu)
8484
def _():
8585
ui.update_nav_panel("tabs", target="Menu", method="hide")
8686

8787
@reactive.effect
88-
@reactive.event(input.showMenu)
88+
@reactive.event(input.show_menu)
8989
def _():
9090
ui.update_nav_panel("tabs", target="Menu", method="show")
9191

tests/playwright/shiny/components/dynamic_navs/test_navs_dynamic.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from shiny.run import ShinyAppProc
77

88

9-
@pytest.mark.flaky(reruns=3, reruns_delay=2)
109
def test_dynamic_navs(page: Page, local_app: ShinyAppProc) -> None:
1110
page.goto(local_app.url)
1211

@@ -21,7 +20,7 @@ def test_dynamic_navs(page: Page, local_app: ShinyAppProc) -> None:
2120
["Hello", "Foo", "Static1", "Static2"]
2221
)
2322
# Click add-foo to add a new Foo tab
24-
addfoo = controller.InputActionButton(page, "addFoo")
23+
addfoo = controller.InputActionButton(page, "add_foo")
2524
addfoo.click()
2625
controller.NavsetTab(page, "tabs").expect_nav_titles(
2726
["Hello", "Foo", "Foo-1", "Static1", "Static2"]
@@ -31,7 +30,7 @@ def test_dynamic_navs(page: Page, local_app: ShinyAppProc) -> None:
3130
expect(navpanel).to_have_text("Foo-1")
3231

3332
# Click hide-tab to hide the Foo tabs
34-
hidetab = controller.InputActionButton(page, "hideTab")
33+
hidetab = controller.InputActionButton(page, "hide_tab")
3534
hidetab.click()
3635

3736
# Expect the Foo tabs to be hidden
@@ -43,7 +42,7 @@ def test_dynamic_navs(page: Page, local_app: ShinyAppProc) -> None:
4342
expect(navpanel).to_be_hidden()
4443

4544
# Click show-tab to show the Foo tabs again
46-
showtab = controller.InputActionButton(page, "showTab")
45+
showtab = controller.InputActionButton(page, "show_tab")
4746
showtab.click()
4847

4948
# Expect the Foo tabs to be visible again
@@ -53,7 +52,7 @@ def test_dynamic_navs(page: Page, local_app: ShinyAppProc) -> None:
5352
expect(navpanel3).to_be_visible()
5453

5554
# Click remove-foo to remove the Foo tabs
56-
removefoo = controller.InputActionButton(page, "removeFoo")
55+
removefoo = controller.InputActionButton(page, "remove_foo")
5756
removefoo.click()
5857
controller.NavsetTab(page, "tabs").expect_nav_titles(
5958
["Hello", "Static1", "Static2"]
@@ -79,15 +78,15 @@ def test_dynamic_navs(page: Page, local_app: ShinyAppProc) -> None:
7978
expect(navpanel3).to_be_visible()
8079

8180
# Click hide-menu to hide the static menu
82-
hidemenu = controller.InputActionButton(page, "hideMenu")
81+
hidemenu = controller.InputActionButton(page, "hide_menu")
8382
hidemenu.click()
8483

8584
# Expect the Menu to be hidden
8685
navpanel3 = controller.NavPanel(page, "tabs", "s1").loc
8786
expect(navpanel3).to_be_hidden()
8887

8988
# Click show-menu to show the static menu again
90-
showmenu = controller.InputActionButton(page, "showMenu")
89+
showmenu = controller.InputActionButton(page, "show_menu")
9190
showmenu.click()
9291

9392
# Expect the Menu to be visible again

tests/playwright/shiny/components/express_navs/app.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ def my_nav(input: Inputs, output: Outputs, session: Session):
77
with ui.navset_card_tab(id="navset"):
88
with ui.nav_panel("Panel 1"):
99
"This is the first panel"
10-
ui.input_action_button("hideTab", "Hide panel 2")
11-
ui.input_action_button("showTab", "Show panel 2")
12-
ui.input_action_button("deleteTabs", "Delete panel 2")
10+
ui.input_action_button("hide_tab", "Hide panel 2")
11+
ui.input_action_button("show_tab", "Show panel 2")
12+
ui.input_action_button("delete_tabs", "Delete panel 2")
1313

1414
@reactive.effect
1515
def _():
@@ -20,17 +20,17 @@ def _():
2020
)
2121

2222
@reactive.effect
23-
@reactive.event(input.showTab)
23+
@reactive.event(input.show_tab)
2424
def _():
2525
ui.update_nav_panel("navset", target="Panel 2", method="show")
2626

2727
@reactive.effect
28-
@reactive.event(input.hideTab)
28+
@reactive.event(input.hide_tab)
2929
def _():
3030
ui.update_nav_panel("navset", target="Panel 2", method="hide")
3131

3232
@reactive.effect
33-
@reactive.event(input.deleteTabs)
33+
@reactive.event(input.delete_tabs)
3434
def _():
3535
ui.remove_nav_panel("navset", "Panel 2")
3636

tests/playwright/shiny/components/express_navs/test_express_navs.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from shiny.run import ShinyAppProc
66

77

8-
@pytest.mark.flaky(reruns=3, reruns_delay=2)
98
def test_dynamic_navs(page: Page, local_app: ShinyAppProc) -> None:
109
page.goto(local_app.url)
1110

@@ -14,7 +13,7 @@ def test_dynamic_navs(page: Page, local_app: ShinyAppProc) -> None:
1413
controller.NavsetTab(page, "bar-navset").expect_nav_titles(["Panel 1", "Panel 2"])
1514

1615
# Click hide-tab to hide Panel 2 in the foo navset
17-
hidetab = controller.InputActionButton(page, "foo-hideTab")
16+
hidetab = controller.InputActionButton(page, "foo-hide_tab")
1817
hidetab.click()
1918

2019
# Expect the Foo's Panel 2 to be hidden
@@ -26,7 +25,7 @@ def test_dynamic_navs(page: Page, local_app: ShinyAppProc) -> None:
2625
expect(navpanel2).to_be_visible()
2726

2827
# Click show-tab to show the foo Panel 2 tab again
29-
showtab = controller.InputActionButton(page, "foo-showTab")
28+
showtab = controller.InputActionButton(page, "foo-show_tab")
3029
showtab.click()
3130

3231
# Expect the Foo Panel 2 tab to be visible again as well as the bar Panel 2
@@ -36,7 +35,7 @@ def test_dynamic_navs(page: Page, local_app: ShinyAppProc) -> None:
3635
expect(navpanel3).to_be_visible()
3736

3837
# Click the remove button to remove the panel 2 in bar
39-
removeTab = controller.InputActionButton(page, "bar-deleteTabs")
38+
removeTab = controller.InputActionButton(page, "bar-delete_tabs")
4039
removeTab.click()
4140

4241
# Check that bar's Panel 2 is gone, but foo's Panel 2 is unaffected

0 commit comments

Comments
 (0)