mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge branch 'main' into fix-texlog-maxlines
This commit is contained in:
@@ -66,22 +66,11 @@ def test_input_and_focus(snap_compare):
|
||||
]
|
||||
assert snap_compare("docs/examples/widgets/input.py", press=press)
|
||||
|
||||
# Assert that the state of the Input is what we'd expect
|
||||
app: App = snap_compare.app
|
||||
input: Input = app.query_one(Input)
|
||||
assert input.value == "Darren"
|
||||
assert input.cursor_position == 6
|
||||
assert input.view_position == 0
|
||||
|
||||
|
||||
def test_buttons_render(snap_compare):
|
||||
# Testing button rendering. We press tab to focus the first button too.
|
||||
assert snap_compare("docs/examples/widgets/button.py", press=["tab"])
|
||||
|
||||
app = snap_compare.app
|
||||
button: Button = app.query_one(Button)
|
||||
assert app.focused is button
|
||||
|
||||
|
||||
def test_datatable_render(snap_compare):
|
||||
press = ["tab", "down", "down", "right", "up", "left"]
|
||||
@@ -100,6 +89,10 @@ def test_textlog_max_lines(snap_compare):
|
||||
assert snap_compare("tests/snapshots/textlog_max_lines.py", press=list("abcde"))
|
||||
|
||||
|
||||
def test_fr_units(snap_compare):
|
||||
assert snap_compare("tests/snapshots/fr_units.py")
|
||||
|
||||
|
||||
# --- CSS properties ---
|
||||
# We have a canonical example for each CSS property that is shown in their docs.
|
||||
# If any of these change, something has likely broken, so snapshot each of them.
|
||||
|
||||
Reference in New Issue
Block a user