Skip to content

Commit 8b922a6

Browse files
Less flaky
1 parent 1cb0c16 commit 8b922a6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎tests/test_graphical_appstore_focus.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
wait_for_focus,
2929
)
3030
from mpos.ui import focus_direction
31-
from mpos.ui.testing import wait_for_render
31+
from mpos.ui.testing import find_dropdown_widget, wait_for_widget
3232

3333

3434
# ---------------------------------------------------------------------------
@@ -83,7 +83,11 @@ class TestAppStoreFocus(unittest.TestCase):
8383
def setUp(self):
8484
result = AppManager.start_app("com.micropythonos.appstore")
8585
self.assertTrue(result, "AppStore failed to launch")
86-
wait_for_render(40)
86+
dropdown = wait_for_widget(
87+
lambda: find_dropdown_widget(lv.screen_active()),
88+
timeout=10,
89+
)
90+
self.assertIsNotNone(dropdown, "AppStore category dropdown never appeared")
8791
activity = _get_appstore_activity()
8892
self.assertIsNotNone(activity, "Could not get AppStore activity instance")
8993
_inject_fake_apps(activity)

0 commit comments

Comments
 (0)