Skip to content

Commit 8f648b0

Browse files
committed
Improve row selection validation in edit mode test
Replaced a fixed timeout with explicit checks for row focus and cell editing state after escaping edit mode. This makes the test more robust and less dependent on timing.
1 parent a806e28 commit 8f648b0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/playwright/shiny/components/data_frame/validate_row_selection_edit_mode/test_validate_row_selection_edit_mode.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ def test_validate_row_selection_in_edit_mode(
6060
page.keyboard.press("Escape")
6161
data_frame._edit_cell_no_save("Temp value", row=1, col=16)
6262
page.keyboard.press("Escape")
63-
# Add a small delay
64-
page.wait_for_timeout(100)
63+
# Wait for the row to be focused again after escaping edit mode
64+
data_frame._expect_row_focus_state(True, row=1)
65+
# Also ensure the cell is no longer in editing state
66+
data_frame.expect_class_state("ready", row=1, col=16)
6567
page.keyboard.press("Enter")
6668
data_frame.expect_class_state(
6769
"editing",

0 commit comments

Comments
 (0)