Skip to content

Commit

Permalink
lint changes to table scroll test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcjohnson committed Jan 27, 2022
1 parent c5cd74b commit 75e938e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions components/dash-table/tests/selenium/test_scrolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,20 @@ def test_scrol002_edit_navigate(test, fixed_rows, fixed_columns, ops):
test.send_keys("abc" + Keys.ENTER)

wait.until(lambda: target.cell(1, 3).is_selected(), 3)
wait.until(lambda: -get_margin(test) == pytest.approx(fixed_width + get_scroll(test), abs=1), 3)
wait.until(
lambda: -get_margin(test)
== pytest.approx(fixed_width + get_scroll(test), abs=1),
3,
)

# alignment is ok after navigating
test.send_keys(Keys.ARROW_DOWN)
test.send_keys(Keys.ARROW_RIGHT)

wait.until(lambda: target.cell(2, 4).is_selected(), 3)
wait.until(lambda: -get_margin(test) == pytest.approx(fixed_width + get_scroll(test), abs=1), 3)
wait.until(
lambda: -get_margin(test)
== pytest.approx(fixed_width + get_scroll(test), abs=1),
3,
)
assert test.get_log_errors() == []

0 comments on commit 75e938e

Please sign in to comment.