Skip to content

Commit

Permalink
snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Sep 11, 2024
1 parent c73016f commit ef2281c
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions tests/snapshot_tests/test_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ async def run_before(pilot):
pilot.app.query(Input).first().cursor_blink = False

assert snap_compare(
SNAPSHOT_APPS_DIR / "masked_input.py", press=["A","B","C","0","1","-","D","E"], run_before=run_before
SNAPSHOT_APPS_DIR / "masked_input.py",
press=["A", "B", "C", "0", "1", "-", "D", "E"],
run_before=run_before,
)


Expand Down Expand Up @@ -1688,7 +1690,9 @@ def on_mount(self) -> None:
assert snap_compare(TextAreaExample(), press=["ctrl+m", "escape"])


async def test_app_focus_style(snap_compare):
def test_app_focus_style(snap_compare):
"""Test that app blur style can be selected."""

class FocusApp(App):
CSS = """
Label {
Expand All @@ -1700,13 +1704,13 @@ class FocusApp(App):
App:focus {
.blurred {
visibility: hidden;
}
}
}
App:blur {
.focussed {
visibility: hidden;
}
}
}
"""
Expand Down

0 comments on commit ef2281c

Please sign in to comment.