more pauses

This commit is contained in:
Will McGugan
2025-09-28 15:37:05 +01:00
parent 26610ef5f8
commit 6b982019a3
3 changed files with 4 additions and 4 deletions

View File

@@ -230,7 +230,6 @@ class Pilot(Generic[ReturnType]):
True if no selector was specified or if the click landed on the selected
widget, False otherwise.
"""
await self.app.wait_for_refresh()
try:
return await self._post_mouse_events(
[MouseDown, MouseUp, Click],

View File

@@ -130,7 +130,7 @@ class FooterKey(Widget):
label_text.stylize_before(self.rich_style)
return label_text
async def on_mouse_down(self) -> None:
def on_mouse_down(self) -> None:
if self._disabled:
self.app.bell()
else:

View File

@@ -89,10 +89,11 @@ async def test_modal_pop_screen():
app = ModalApp()
async with app.run_test() as pilot:
# Pause to ensure the footer is fully composed to avoid flakiness in CI
await pilot.pause(0.4)
await pilot.pause()
await app.wait_for_refresh()
await pilot.pause()
# Check clicking the footer brings up the quit screen
await pilot.click(Footer)
await pilot.click(Footer, offset=(1, 0))
await pilot.pause()
assert isinstance(pilot.app.screen, QuitScreen)
# Check activating the quit button exits the app