Skip to content

Commit 8f9aa3a

Browse files
committed
quick scroll on anchor
1 parent 6918ed7 commit 8f9aa3a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tests/snapshot_tests/test_snapshots.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4502,3 +4502,31 @@ def compose(self) -> ComposeResult:
45024502
pass
45034503

45044504
assert snap_compare(EmptyApp())
4505+
4506+
4507+
def test_stream_layout(snap_compare):
4508+
"""Test stream layout."""
4509+
4510+
class StreamApp(App):
4511+
CSS = """
4512+
VerticalScroll {
4513+
layout: stream;
4514+
Label {
4515+
background: blue;
4516+
margin: 1;
4517+
}
4518+
#many-lines {
4519+
max-height: 3;
4520+
}
4521+
}
4522+
"""
4523+
4524+
def compose(self) -> ComposeResult:
4525+
with VerticalScroll():
4526+
yield Label("Hello")
4527+
yield Label("foo\nbar")
4528+
yield Label(
4529+
"\n".join(["Only 3 lines should be visible"] * 100), id="many-lines"
4530+
)
4531+
4532+
assert snap_compare(StreamApp())

0 commit comments

Comments
 (0)