Skip to content

Commit 7a9ebff

Browse files
committed
Add test for clear_button plugin with multiple=True
1 parent 657475d commit 7a9ebff

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/playwright/shiny/inputs/input_kitchensink/input_selectize/test_input_selectize_kitchensink.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ def test_input_selectize_kitchensink(page: Page, local_app: ShinyAppProc) -> Non
6060
multiple_selectize_txt.expect_value("")
6161
multiple_selectize.expect_multiple(True)
6262

63+
# Clear again, but now through the clear_button
64+
multiple_selectize.set(multiple_options)
65+
multiple_selectize.expect_selected(["Banana", "Cherry"])
66+
multiple_selectize_txt.expect_value("Banana, Cherry")
67+
multiple_selectize.loc.locator("..").locator(
68+
"> div.plugin-clear_button > a.clear"
69+
).click()
70+
multiple_selectize_txt.expect_value("")
71+
multiple_selectize.expect_multiple(True)
72+
6373
selectize_with_selected = controller.InputSelectize(page, "selectize_with_selected")
6474
selectize_with_selected_txt = controller.OutputText(page, "selected_result_txt")
6575
selectize_with_selected.expect_selected(["Cherry"])

0 commit comments

Comments
 (0)