Skip to content

Commit 6b98201

Browse files
committed
more pauses
1 parent 26610ef commit 6b98201

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/textual/pilot.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ async def click(
230230
True if no selector was specified or if the click landed on the selected
231231
widget, False otherwise.
232232
"""
233-
await self.app.wait_for_refresh()
234233
try:
235234
return await self._post_mouse_events(
236235
[MouseDown, MouseUp, Click],

src/textual/widgets/_footer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def render(self) -> Text:
130130
label_text.stylize_before(self.rich_style)
131131
return label_text
132132

133-
async def on_mouse_down(self) -> None:
133+
def on_mouse_down(self) -> None:
134134
if self._disabled:
135135
self.app.bell()
136136
else:

tests/test_modal.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,11 @@ async def test_modal_pop_screen():
8989
app = ModalApp()
9090
async with app.run_test() as pilot:
9191
# Pause to ensure the footer is fully composed to avoid flakiness in CI
92-
await pilot.pause(0.4)
92+
await pilot.pause()
9393
await app.wait_for_refresh()
94+
await pilot.pause()
9495
# Check clicking the footer brings up the quit screen
95-
await pilot.click(Footer)
96+
await pilot.click(Footer, offset=(1, 0))
9697
await pilot.pause()
9798
assert isinstance(pilot.app.screen, QuitScreen)
9899
# Check activating the quit button exits the app

0 commit comments

Comments
 (0)