Skip to content

Commit b5306c1

Browse files
committed
test: fix failed tests
1 parent 70d1659 commit b5306c1

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

tests/system/small/test_anywidget.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,8 @@ def test_widget_sort_should_sort_ascending_on_first_click(
774774
Given a widget, when a column header is clicked for the first time,
775775
then the data should be sorted by that column in ascending order.
776776
"""
777-
table_widget.sort_column = "id"
778-
table_widget.sort_ascending = True
777+
table_widget.sort_ascending = [True]
778+
table_widget.sort_columns = ["id"]
779779

780780
expected_slice = paginated_pandas_df.sort_values("id", ascending=True).iloc[0:2]
781781
html = table_widget.table_html
@@ -790,11 +790,11 @@ def test_widget_sort_should_sort_descending_on_second_click(
790790
Given a widget sorted by a column, when the same column header is clicked again,
791791
then the data should be sorted by that column in descending order.
792792
"""
793-
table_widget.sort_column = "id"
794-
table_widget.sort_ascending = True
793+
table_widget.sort_ascending = [True]
794+
table_widget.sort_columns = ["id"]
795795

796796
# Second click
797-
table_widget.sort_ascending = False
797+
table_widget.sort_ascending = [False]
798798

799799
expected_slice = paginated_pandas_df.sort_values("id", ascending=False).iloc[0:2]
800800
html = table_widget.table_html
@@ -809,12 +809,12 @@ def test_widget_sort_should_switch_column_and_sort_ascending(
809809
Given a widget sorted by a column, when a different column header is clicked,
810810
then the data should be sorted by the new column in ascending order.
811811
"""
812-
table_widget.sort_column = "id"
813-
table_widget.sort_ascending = True
812+
table_widget.sort_ascending = [True]
813+
table_widget.sort_columns = ["id"]
814814

815815
# Click on a different column
816-
table_widget.sort_column = "value"
817-
table_widget.sort_ascending = True
816+
table_widget.sort_ascending = [True]
817+
table_widget.sort_columns = ["value"]
818818

819819
expected_slice = paginated_pandas_df.sort_values("value", ascending=True).iloc[0:2]
820820
html = table_widget.table_html
@@ -829,8 +829,8 @@ def test_widget_sort_should_be_maintained_after_pagination(
829829
Given a sorted widget, when the user navigates to the next page,
830830
then the sorting should be maintained.
831831
"""
832-
table_widget.sort_column = "id"
833-
table_widget.sort_ascending = True
832+
table_widget.sort_ascending = [True]
833+
table_widget.sort_columns = ["id"]
834834

835835
# Go to the second page
836836
table_widget.page = 1
@@ -848,8 +848,8 @@ def test_widget_sort_should_reset_on_page_size_change(
848848
Given a sorted widget, when the page size is changed,
849849
then the sorting should be reset.
850850
"""
851-
table_widget.sort_column = "id"
852-
table_widget.sort_ascending = True
851+
table_widget.sort_ascending = [True]
852+
table_widget.sort_columns = ["id"]
853853

854854
table_widget.page_size = 3
855855

0 commit comments

Comments
 (0)