diff --git a/shiny/playwright/controller/_input_controls.py b/shiny/playwright/controller/_input_controls.py index a3fde3dfa..9fe5510d4 100644 --- a/shiny/playwright/controller/_input_controls.py +++ b/shiny/playwright/controller/_input_controls.py @@ -1026,6 +1026,7 @@ def expect_choices( arr_name="choices", arr=choices, timeout=timeout, + alt_verify=True, ) def expect_selected( @@ -1234,6 +1235,7 @@ def expect_choices( arr=choices, key="data-value", timeout=timeout, + alt_verify=True, ) def expect_selected( diff --git a/tests/playwright/shiny/inputs/input_kitchensink/input_select/test_input_select_kitchensink.py b/tests/playwright/shiny/inputs/input_kitchensink/input_select/test_input_select_kitchensink.py index 05c4cce41..1cae7ff20 100644 --- a/tests/playwright/shiny/inputs/input_kitchensink/input_select/test_input_select_kitchensink.py +++ b/tests/playwright/shiny/inputs/input_kitchensink/input_select/test_input_select_kitchensink.py @@ -58,19 +58,17 @@ def test_input_select_kitchensink(page: Page, local_app: ShinyAppProc) -> None: ] ) - # TODO-karan; Debug why this does not complete - # page.set_default_timeout(100) - # select_with_custom_size_and_dict.expect_choices( - # [ - # "Orange", - # "Lemon", - # "Lime", - # "Strawberry", - # "Blueberry", - # "Raspberry", - # ], - # ) - # select_with_custom_size_and_dict.expect_size("4") + select_with_custom_size_and_dict.expect_choices( + [ + "Orange", + "Lemon", + "Lime", + "Strawberry", + "Blueberry", + "Raspberry", + ], + ) + select_with_custom_size_and_dict.expect_size("4") # # # TODO-karan; Should we implement this? Seems like the only way to determine which choices belong to which groups. While we're at it, we might as well test the labels. # # select_with_custom_size_and_dict.expect_choices({ diff --git a/tests/playwright/shiny/inputs/input_kitchensink/input_selectize/test_input_selectize_kitchensink.py b/tests/playwright/shiny/inputs/input_kitchensink/input_selectize/test_input_selectize_kitchensink.py index cd45eab01..7561873cb 100644 --- a/tests/playwright/shiny/inputs/input_kitchensink/input_selectize/test_input_selectize_kitchensink.py +++ b/tests/playwright/shiny/inputs/input_kitchensink/input_selectize/test_input_selectize_kitchensink.py @@ -9,8 +9,7 @@ def test_input_selectize_kitchensink(page: Page, local_app: ShinyAppProc) -> Non basic_selectize = controller.InputSelectize(page, "basic_selectize") basic_select_txt = controller.OutputText(page, "basic_result_txt") - # # TODO-karan; Debug why this does not complete - # basic_selectize.expect_choices(["Apple", "Banana", "Cherry", "Date", "Elderberry"]) + basic_selectize.expect_choices(["Apple", "Banana", "Cherry", "Date", "Elderberry"]) basic_selectize.expect_choice_labels( [ "Apple", @@ -27,10 +26,9 @@ def test_input_selectize_kitchensink(page: Page, local_app: ShinyAppProc) -> Non selectize_with_label = controller.InputSelectize(page, "selectize_with_label") selectize_with_label_txt = controller.OutputText(page, "selectize_with_label_txt") - # # TODO-karan; Debug why this does not complete - # selectize_with_label.expect_choices( - # ["apple", "banana", "cherry", "date", "elderberry"] - # ) + selectize_with_label.expect_choices( + ["apple", "banana", "cherry", "date", "elderberry"] + ) selectize_with_label.expect_choice_labels( [ "Apple", @@ -74,10 +72,9 @@ def test_input_selectize_kitchensink(page: Page, local_app: ShinyAppProc) -> Non selectize_width_close_button_txt.expect_value("Orange") selectize_width_close_button.expect_width("400px") selectize_width_close_button.expect_choice_groups(["Citrus", "Berries"]) - # # TODO-karan; Debug why this does not complete - # selectize_width_close_button.expect_choices( - # ["Orange", "Lemon", "Lime", "Strawberry", "Blueberry", "Raspberry"] - # ) + selectize_width_close_button.expect_choices( + ["Orange", "Lemon", "Lime", "Strawberry", "Blueberry", "Raspberry"] + ) selectize_width_close_button.expect_choice_labels( [ "Sweet and tangy",