mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
more pauses
This commit is contained in:
@@ -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],
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user