Skip to content

Commit 2bab743

Browse files
committed
Cleanup tests
1 parent e02721a commit 2bab743

File tree

3 files changed

+3
-77
lines changed

3 files changed

+3
-77
lines changed

tests/playwright/shiny/bookmark/modules/app-core-recursive.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def value():
5555
@reactive.effect
5656
@reactive.event(input.btn1, input.btn2, input.dyn1, input.dyn2, ignore_init=True)
5757
async def _():
58-
# print("app-Bookmarking!")
5958
await session.bookmark()
6059

6160
session.bookmark.exclude.append("btn2")
@@ -68,7 +67,6 @@ def _(state: BookmarkState) -> None:
6867

6968
@session.bookmark.on_restore
7069
def _(restore_state: RestoreState) -> None:
71-
# print("app-Restore state:", restore_state.values)
7270

7371
if "btn2" in restore_state.values:
7472

@@ -86,7 +84,6 @@ def _(restore_state: RestoreState) -> None:
8684

8785

8886
def app_ui(request: Request) -> ui.Tag:
89-
# print("app-Making UI")
9087
return ui.page_fixed(
9188
ui.output_code("bookmark_store"),
9289
"Click Buttons to update bookmark",
@@ -103,22 +100,7 @@ def server(input: Inputs, output: Outputs, session: Session):
103100
def bookmark_store():
104101
return f"{session.bookmark.store}"
105102

106-
@session.bookmark.on_bookmark
107-
async def on_bookmark(state: BookmarkState) -> None:
108-
print(
109-
"app-On Bookmark",
110-
"\nInputs: ",
111-
await state.input._serialize(exclude=state.exclude, state_dir=None),
112-
"\nValues: ",
113-
state.values,
114-
"\n\n",
115-
)
116-
# session.bookmark.update_query_string()
117-
118-
pass
119-
120103
session.bookmark.on_bookmarked(session.bookmark.update_query_string)
121-
# session.bookmark.on_bookmarked(session.bookmark.show_modal)
122104

123105

124106
SHINY_BOOKMARK_STORE: Literal["url", "server"] = os.getenv(

tests/playwright/shiny/bookmark/modules/app-core.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ def mod_btn(idx: int):
3030
ui.output_ui("ui_html"),
3131
ui.output_code("value"),
3232
width="200px",
33-
# fill=True,
34-
# fillable=True,
35-
# height="75px",
3633
),
3734
ui.hr(),
3835
)
@@ -60,7 +57,6 @@ def value():
6057
@reactive.effect
6158
@reactive.event(input.btn1, input.btn2, input.dyn1, input.dyn2, ignore_init=True)
6259
async def _():
63-
# print("app-Bookmarking!")
6460
await session.bookmark()
6561

6662
session.bookmark.exclude.append("btn2")
@@ -73,7 +69,6 @@ def _(state: BookmarkState) -> None:
7369

7470
@session.bookmark.on_restore
7571
def _(restore_state: RestoreState) -> None:
76-
# print("app-Restore state:", restore_state.values)
7772

7873
if "btn2" in restore_state.values:
7974

@@ -88,15 +83,10 @@ def _(restore_state: RestoreState) -> None:
8883

8984

9085
def app_ui(request: Request) -> ui.Tag:
91-
# print("app-Making UI")
9286
return ui.page_fixed(
9387
ui.output_code("bookmark_store"),
9488
"Click Button to update bookmark",
95-
# ui.input_action_button("btn", "Button"),
9689
*[mod_btn(f"mod{i}", i) for i in reversed(range(k))],
97-
# ui.input_radio_buttons("btn", "Button", choices=["a", "b", "c"], selected="a"),
98-
# ui.output_code("code"),
99-
# ui.input_bookmark_button(),
10090
)
10191

10292

@@ -110,26 +100,7 @@ def bookmark_store():
110100
for i in reversed(range(k)):
111101
btn_server(f"mod{i}", i)
112102

113-
@session.bookmark.on_bookmark
114-
async def on_bookmark(state: BookmarkState) -> None:
115-
# print(
116-
# "app-On Bookmark",
117-
# "\nInputs: ",
118-
# await state.input._serialize(exclude=state.exclude, state_dir=None),
119-
# "\nValues: ",
120-
# state.values,
121-
# "\n\n",
122-
# )
123-
# session.bookmark.update_query_string()
124-
125-
pass
126-
127103
session.bookmark.on_bookmarked(session.bookmark.update_query_string)
128-
# session.bookmark.on_bookmarked(session.bookmark.show_modal)
129-
130-
# @render.code
131-
# def code():
132-
# return f"{input.btn()}"
133104

134105

135106
SHINY_BOOKMARK_STORE: Literal["url", "server"] = os.getenv(

tests/playwright/shiny/bookmark/modules/app-express.py

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -89,33 +89,6 @@ def _(restore_state: RestoreState) -> None:
8989
recursive_mod(f"mod{i}", i)
9090

9191

92-
# ui.input_radio_buttons("btn", "Button", choices=["a", "b", "c"], selected="a")
93-
94-
95-
# @render.code
96-
# def code():
97-
# return f"{input.btn()}"
98-
99-
100-
# ui.input_bookmark_button()
101-
102-
103-
# @session.bookmark.on_bookmark
104-
# async def on_bookmark(state: BookmarkState) -> None:
105-
# print(
106-
# "app-On Bookmark",
107-
# "\nInputs: ",
108-
# await state.input._serialize(exclude=state.exclude, state_dir=None),
109-
# "\nValues: ",
110-
# state.values,
111-
# "\n\n",
112-
# )
113-
# # session.bookmark.update_query_string()
114-
115-
116-
@session.bookmark.on_bookmarked
117-
async def _(url: str):
118-
await session.bookmark.update_query_string(url)
119-
120-
121-
# session.bookmark.on_bookmarked(session.bookmark.show_modal)
92+
# @session.bookmark.on_bookmarked
93+
# async def _(url: str):
94+
# await session.bookmark.update_query_string(url)

0 commit comments

Comments
 (0)