Skip to content

Commit 5dfcc4d

Browse files
committed
utilize the alt_verify flag for more test cases
1 parent 8a60787 commit 5dfcc4d

File tree

3 files changed

+20
-23
lines changed

3 files changed

+20
-23
lines changed

shiny/playwright/controller/_input_controls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,7 @@ def expect_choices(
10261026
arr_name="choices",
10271027
arr=choices,
10281028
timeout=timeout,
1029+
alt_verify=True,
10291030
)
10301031

10311032
def expect_selected(
@@ -1234,6 +1235,7 @@ def expect_choices(
12341235
arr=choices,
12351236
key="data-value",
12361237
timeout=timeout,
1238+
alt_verify=True,
12371239
)
12381240

12391241
def expect_selected(

tests/playwright/shiny/inputs/input_kitchensink/input_select/test_input_select_kitchensink.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,17 @@ def test_input_select_kitchensink(page: Page, local_app: ShinyAppProc) -> None:
5858
]
5959
)
6060

61-
# TODO-karan; Debug why this does not complete
62-
# page.set_default_timeout(100)
63-
# select_with_custom_size_and_dict.expect_choices(
64-
# [
65-
# "Orange",
66-
# "Lemon",
67-
# "Lime",
68-
# "Strawberry",
69-
# "Blueberry",
70-
# "Raspberry",
71-
# ],
72-
# )
73-
# select_with_custom_size_and_dict.expect_size("4")
61+
select_with_custom_size_and_dict.expect_choices(
62+
[
63+
"Orange",
64+
"Lemon",
65+
"Lime",
66+
"Strawberry",
67+
"Blueberry",
68+
"Raspberry",
69+
],
70+
)
71+
select_with_custom_size_and_dict.expect_size("4")
7472

7573
# # # 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.
7674
# # select_with_custom_size_and_dict.expect_choices({

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

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ def test_input_selectize_kitchensink(page: Page, local_app: ShinyAppProc) -> Non
99

1010
basic_selectize = controller.InputSelectize(page, "basic_selectize")
1111
basic_select_txt = controller.OutputText(page, "basic_result_txt")
12-
# # TODO-karan; Debug why this does not complete
13-
# basic_selectize.expect_choices(["Apple", "Banana", "Cherry", "Date", "Elderberry"])
12+
basic_selectize.expect_choices(["Apple", "Banana", "Cherry", "Date", "Elderberry"])
1413
basic_selectize.expect_choice_labels(
1514
[
1615
"Apple",
@@ -27,10 +26,9 @@ def test_input_selectize_kitchensink(page: Page, local_app: ShinyAppProc) -> Non
2726

2827
selectize_with_label = controller.InputSelectize(page, "selectize_with_label")
2928
selectize_with_label_txt = controller.OutputText(page, "selectize_with_label_txt")
30-
# # TODO-karan; Debug why this does not complete
31-
# selectize_with_label.expect_choices(
32-
# ["apple", "banana", "cherry", "date", "elderberry"]
33-
# )
29+
selectize_with_label.expect_choices(
30+
["apple", "banana", "cherry", "date", "elderberry"]
31+
)
3432
selectize_with_label.expect_choice_labels(
3533
[
3634
"Apple",
@@ -74,10 +72,9 @@ def test_input_selectize_kitchensink(page: Page, local_app: ShinyAppProc) -> Non
7472
selectize_width_close_button_txt.expect_value("Orange")
7573
selectize_width_close_button.expect_width("400px")
7674
selectize_width_close_button.expect_choice_groups(["Citrus", "Berries"])
77-
# # TODO-karan; Debug why this does not complete
78-
# selectize_width_close_button.expect_choices(
79-
# ["Orange", "Lemon", "Lime", "Strawberry", "Blueberry", "Raspberry"]
80-
# )
75+
selectize_width_close_button.expect_choices(
76+
["Orange", "Lemon", "Lime", "Strawberry", "Blueberry", "Raspberry"]
77+
)
8178
selectize_width_close_button.expect_choice_labels(
8279
[
8380
"Sweet and tangy",

0 commit comments

Comments
 (0)