Skip to content

Commit

Permalink
harden test
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Aug 22, 2024
1 parent 9844d89 commit 7f724f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
12 changes: 0 additions & 12 deletions tests/snapshot_tests/snapshot_apps/help_panel.py

This file was deleted.

17 changes: 12 additions & 5 deletions tests/snapshot_tests/test_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -1467,11 +1467,18 @@ def compose(self) -> ComposeResult:
def test_help_panel(snap_compare):
"""Test help panel."""

assert snap_compare(
SNAPSHOT_APPS_DIR / "help_panel.py",
terminal_size=(100, 30),
press=["ctrl+p", *"keys", "enter"],
)
class HelpPanelApp(App):
def compose(self) -> ComposeResult:
yield Input()

async def run_before(pilot: Pilot):
await pilot.press(App.COMMAND_PALETTE_BINDING)
await pilot.pause()
await pilot.press(*"keys")
await pilot.press("enter")
await pilot.app.workers.wait_for_complete()

assert snap_compare(HelpPanelApp(), terminal_size=(100, 30), run_before=run_before)


def test_scroll_page_down(snap_compare):
Expand Down

0 comments on commit 7f724f7

Please sign in to comment.