Skip to content

Commit e2e9a8e

Browse files
committed
Debugging search filter
1 parent c276b28 commit e2e9a8e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33

44
@module.ui
5-
def reprex_selectize_ui():
6-
return ui.input_selectize("x", "Selectize", choices=[], multiple=True)
5+
def reprex_selectize_ui(label: str):
6+
return ui.input_selectize("x", label, choices=[], multiple=True)
77

88

99
@module.server
@@ -21,7 +21,8 @@ def _():
2121

2222

2323
app_ui = ui.page_fluid(
24-
reprex_selectize_ui("serverside"), reprex_selectize_ui("clientside")
24+
reprex_selectize_ui("serverside", "Server"),
25+
reprex_selectize_ui("clientside", "Client"),
2526
)
2627

2728

tests/playwright/shiny/components/selectize/test_selectize.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# import pytest
2-
from playwright.sync_api import Page
2+
from playwright.sync_api import Page, expect
33

44
from shiny.playwright import controller
55
from shiny.run import ShinyAppProc
@@ -19,3 +19,6 @@ def test_selectize(page: Page, local_app: ShinyAppProc) -> None:
1919
selectize_menu2.expect_multiple(True)
2020
selectize_menu2.set(["Foo 0", "Foo 1"])
2121
selectize_menu2.expect_selected(["Foo 0", "Foo 1"])
22+
23+
expect(page.locator("css=input")).to_have_count(2)
24+
expect(page.locator("css=input").first).to_have_attribute("placeholder", "Search")

0 commit comments

Comments
 (0)