mirror of
				https://github.com/Textualize/textual.git
				synced 2025-10-17 02:38:12 +03:00 
			
		
		
		
	test(modal): increase pauses in flaky test (#6116)
* test(modal): increase pauses in flaky test It looks like `test_modal_pop_screen()` has started being flaky in CI. Increase the initial pause to ensure the footer is fully composed when clicked. This seemed to be the fix for a similar flaky test in #6032. * test(modal): wait refresh for flaky test After increasing the pause, this test is still flaky in CI. Try adding a `wait_for_refresh` as well, the same as the fix for a similar flaky test in #6116
This commit is contained in:
		| @@ -86,10 +86,14 @@ Button { | ||||
| async def test_modal_pop_screen(): | ||||
|     # https://github.com/Textualize/textual/issues/4656 | ||||
|  | ||||
|     async with ModalApp().run_test() as pilot: | ||||
|         await pilot.pause() | ||||
|     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 app.wait_for_refresh() | ||||
|         # Check clicking the footer brings up the quit screen | ||||
|         await pilot.click(Footer) | ||||
|         await pilot.pause() | ||||
|         assert isinstance(pilot.app.screen, QuitScreen) | ||||
|         # Check activating the quit button exits the app | ||||
|         await pilot.press("enter") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 TomJGooding
					TomJGooding