diff --git a/solara/test/pytest_plugin.py b/solara/test/pytest_plugin.py index 0c7cf371a..09ad9ad93 100644 --- a/solara/test/pytest_plugin.py +++ b/solara/test/pytest_plugin.py @@ -175,11 +175,12 @@ def solara_test(solara_server, solara_app, page_session: "playwright.sync_api.Pa assert len(keys) == 1, "expected only one context, got %s" % keys context = solara.server.app.contexts[keys[0]] with context: + test_output_warmup = widgets.Output() test_output = widgets.Output() page_session.locator("text=Test in solara").wait_for() - context.container.children[0].children[1].children[1].children = [test_output] # type: ignore + context.container.children[0].children[1].children[1].children = [test_output_warmup] # type: ignore try: - with test_output: + with test_output_warmup: warmup() button = page_session.locator(".solara-warmup-widget") button.wait_for() @@ -187,6 +188,8 @@ def solara_test(solara_server, solara_app, page_session: "playwright.sync_api.Pa button.click() button.wait_for(state="detached") page_session.evaluate("document.fonts.ready") + context.container.children[0].children[1].children[1].children = [test_output] # type: ignore + with test_output: yield finally: test_output.close() diff --git a/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-flask-chromium-linux-changed-reference.png b/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-flask-chromium-linux-changed-reference.png deleted file mode 100644 index 3b1ffc23d..000000000 Binary files a/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-flask-chromium-linux-changed-reference.png and /dev/null differ diff --git a/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-flask-chromium-linux-ipywidgets-7-reference.png b/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-flask-chromium-linux-ipywidgets-7-reference.png new file mode 100644 index 000000000..ce75f1307 Binary files /dev/null and b/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-flask-chromium-linux-ipywidgets-7-reference.png differ diff --git a/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-flask-chromium-linux-reference.png b/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-flask-chromium-linux-ipywidgets-8-reference.png similarity index 100% rename from tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-flask-chromium-linux-reference.png rename to tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-flask-chromium-linux-ipywidgets-8-reference.png diff --git a/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-starlette-chromium-linux-changed-reference.png b/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-starlette-chromium-linux-changed-reference.png deleted file mode 100644 index 3b1ffc23d..000000000 Binary files a/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-starlette-chromium-linux-changed-reference.png and /dev/null differ diff --git a/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-starlette-chromium-linux-reference.png b/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-starlette-chromium-linux-reference.png deleted file mode 100644 index 2c03a86a7..000000000 Binary files a/tests/ui/snapshots/tests/integration/latex_test.py/test_widget_latex_solara-starlette-chromium-linux-reference.png and /dev/null differ