This commit is contained in:
Will McGugan
2022-10-29 11:44:31 +01:00
parent 264b4fe733
commit 2afb00f5b3
5 changed files with 35 additions and 26 deletions

View File

@@ -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"]