Skip to content

Commit 0279f17

Browse files
committed
test: fix flaky test_focus_on_click snaphot test
Remove the button animation in the `test_focus_on_click` snapshot test causing flakiness in CI.
1 parent 87ce5f5 commit 0279f17

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/snapshot_tests/__snapshots__/test_snapshots/test_focus_on_click.svg

Lines changed: 4 additions & 4 deletions
Loading

tests/snapshot_tests/test_snapshots.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4744,8 +4744,7 @@ async def action_clear(self) -> None:
47444744
def test_focus_on_click(snap_compare) -> None:
47454745
"""Test focus on click may be prevented.
47464746
4747-
You should see a button in a non-focused stated
4748-
4747+
You should see a button in a non-focused state.
47494748
"""
47504749

47514750
class NonFocusButton(Button):
@@ -4758,6 +4757,7 @@ def compose(self) -> ComposeResult:
47584757
yield NonFocusButton("Click")
47594758

47604759
async def run_before(pilot: Pilot) -> None:
4760+
pilot.app.query_one(NonFocusButton).active_effect_duration = 0
47614761
await pilot.pause()
47624762
await pilot.click(NonFocusButton)
47634763

0 commit comments

Comments
 (0)