From 0c7738c1964f4b36b6a7a9eb848af3003af2ab95 Mon Sep 17 00:00:00 2001 From: TomJGooding <101601846+TomJGooding@users.noreply.github.com> Date: Mon, 29 Sep 2025 12:09:34 +0100 Subject: [PATCH 1/3] test(modal): add sanity check for flaky test in CI --- tests/test_modal.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_modal.py b/tests/test_modal.py index e33fe29973..dcb1b8c074 100644 --- a/tests/test_modal.py +++ b/tests/test_modal.py @@ -89,11 +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() + await pilot.pause(0.4) await app.wait_for_refresh() - await pilot.pause() # Check clicking the footer brings up the quit screen - await pilot.click(Footer, offset=(1, 0)) + footer_key_clicked = await pilot.mouse_down("FooterKey") + assert footer_key_clicked is True # Sanity check await pilot.pause() assert isinstance(pilot.app.screen, QuitScreen) # Check activating the quit button exits the app From 80dc94ff64d1bb244dd8073e2812e74f92aff055 Mon Sep 17 00:00:00 2001 From: TomJGooding <101601846+TomJGooding@users.noreply.github.com> Date: Mon, 29 Sep 2025 12:29:49 +0100 Subject: [PATCH 2/3] test(modal): try reducing the pause in flaky test --- tests/test_modal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_modal.py b/tests/test_modal.py index dcb1b8c074..cb8aff03ae 100644 --- a/tests/test_modal.py +++ b/tests/test_modal.py @@ -89,7 +89,7 @@ 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() # Check clicking the footer brings up the quit screen footer_key_clicked = await pilot.mouse_down("FooterKey") From 3186ae6fecd5ed12c51a95983fa662ec8ce5ed7a Mon Sep 17 00:00:00 2001 From: TomJGooding <101601846+TomJGooding@users.noreply.github.com> Date: Mon, 29 Sep 2025 12:45:13 +0100 Subject: [PATCH 3/3] test(modal): increase pause again in flaky test --- tests/test_modal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_modal.py b/tests/test_modal.py index cb8aff03ae..dcb1b8c074 100644 --- a/tests/test_modal.py +++ b/tests/test_modal.py @@ -89,7 +89,7 @@ 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() + await pilot.pause(0.4) await app.wait_for_refresh() # Check clicking the footer brings up the quit screen footer_key_clicked = await pilot.mouse_down("FooterKey")