-
Notifications
You must be signed in to change notification settings - Fork 100
Make input_selectize work correctly within a module #1091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
d596dda
535aa6c
90a9a74
3decd4f
f5690d1
e7780e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
from controls import InputSelectize | ||
from playwright.sync_api import Page, expect | ||
|
||
app = create_doc_example_core_fixture("input_select") | ||
app = create_doc_example_core_fixture("input_selectize") | ||
|
||
|
||
def test_input_selectize_kitchen(page: Page, app: ShinyAppProc) -> None: | ||
|
@@ -13,27 +13,30 @@ def test_input_selectize_kitchen(page: Page, app: ShinyAppProc) -> None: | |
expect(state.loc_label).to_have_text("Choose a state:") | ||
state.expect_label("Choose a state:") | ||
|
||
state.expect_choices(["NY", "NJ", "CT", "WA", "OR", "CA", "MN", "WI", "IA"]) | ||
state.expect_choice_labels( | ||
[ | ||
"New York", | ||
"New Jersey", | ||
"Connecticut", | ||
"Washington", | ||
"Oregon", | ||
"California", | ||
"Minnesota", | ||
"Wisconsin", | ||
"Iowa", | ||
] | ||
) | ||
state.expect_choice_groups(["East Coast", "West Coast", "Midwest"]) | ||
|
||
state.expect_selected("NY") | ||
state.expect_multiple(False) | ||
|
||
state.expect_width(None) | ||
|
||
state.set("IA") | ||
|
||
state.expect_selected("IA") | ||
# TODO: This test was being run against input_select, not input_selectize | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feels off to me. I'd like double check this in the morning before we merge the PR. Everything else is great! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup. To my knowledge, selectize.js changed how it stores options / selected values. Either way, if we would have used the correct selectize testing class, the error would have been surfaced earlier. Yes, we should do this in a followup PR as the changes are not related to this Issue |
||
# and none of these expectations pass. We need to add additional test methods | ||
# for the InputSelectize class to test this behaviour. | ||
# https://github.com/posit-dev/py-shiny/issues/1100 | ||
|
||
# state.expect_choices(["NY", "NJ", "CT", "WA", "OR", "CA", "MN", "WI", "IA"]) | ||
# state.expect_choice_labels( | ||
# [ | ||
# "New York", | ||
# "New Jersey", | ||
# "Connecticut", | ||
# "Washington", | ||
# "Oregon", | ||
# "California", | ||
# "Minnesota", | ||
# "Wisconsin", | ||
# "Iowa", | ||
# ] | ||
# state.expect_choice_groups(["East Coast", "West Coast", "Midwest"]) | ||
|
||
# state.expect_multiple(True) | ||
|
||
# state.expect_width(None) | ||
|
||
# state.set("Iowa") | ||
|
||
# state.expect_selected("IA") |
Uh oh!
There was an error while loading. Please reload this page.