From f3f6c53fa25618793881bf68db09b8320c8534b8 Mon Sep 17 00:00:00 2001 From: Iisakki Rotko Date: Fri, 29 Sep 2023 15:34:55 +0200 Subject: [PATCH] fix: tests in jupyter notebook being very flaky --- solara/test/pytest_plugin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/solara/test/pytest_plugin.py b/solara/test/pytest_plugin.py index 8a0709251..9ed4add44 100644 --- a/solara/test/pytest_plugin.py +++ b/solara/test/pytest_plugin.py @@ -424,6 +424,7 @@ def run(f: Callable): \n""" write_notebook([code_setup, code_from_function(f)], notebook_path) page_session.goto(base_url + f"/notebooks/notebook.ipynb?v={count}") + page_session.locator(".prompt_container >> nth=0").wait_for() page_session.locator("text=Kernel starting, please wait...").wait_for(state="detached") page_session.locator("Kernel Ready").wait_for(state="detached") page_session.locator('css=[data-jupyter-action="jupyter-notebook:run-cell-and-select-next"]').click()