mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Implement scroll_to_center method.
This commit is contained in:
@@ -409,4 +409,10 @@ def test_scroll_visible(snap_compare):
|
||||
|
||||
|
||||
def test_scroll_to_center(snap_compare):
|
||||
# READ THIS IF THIS TEST FAILS:
|
||||
# While https://github.com/Textualize/textual/issues/2254 is open, the snapshot
|
||||
# this is being compared against is INCORRECT.
|
||||
# The correct output for this snapshot test would show a couple of containers
|
||||
# scrolled so that the red string >>bullseye<< is centered on the screen.
|
||||
# When this snapshot "breaks" because #2254 is fixed, this snapshot can be updated.
|
||||
assert snap_compare(SNAPSHOT_APPS_DIR / "scroll_to_center.py", press=["s"])
|
||||
|
||||
Reference in New Issue
Block a user