From 8dd90a4f15cb5a742f7d2f263a03b464153b6424 Mon Sep 17 00:00:00 2001 From: Karan Gathani Date: Mon, 22 Sep 2025 19:58:37 -0700 Subject: [PATCH 1/2] fixture is no longer a valid value for asyncio --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 9d80d8374..38662673e 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,7 +1,7 @@ [pytest] asyncio_mode=strict # Used for ./tests/pytest/asyncio_prevent.py -asyncio_default_fixture_loop_scope=fixture +asyncio_default_fixture_loop_scope=function testpaths=tests/pytest/ ; Note: Browsers are set within `./Makefile` addopts = --strict-markers --durations=6 --durations-min=5.0 --numprocesses auto From 39708dd94d22a18adbd60da341b99801fa177b5a Mon Sep 17 00:00:00 2001 From: Karan Gathani Date: Thu, 25 Sep 2025 07:54:35 -0700 Subject: [PATCH 2/2] =?UTF-8?q?added=20an=20explicit=20wait=20for=20the=20?= =?UTF-8?q?=E2=80=9CPress=20Enter=20to=20start=20the=20stream=E2=80=9D=20d?= =?UTF-8?q?efault=20text=20before=20submitting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/chat/stream-result/test_chat_stream_result.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/playwright/shiny/components/chat/stream-result/test_chat_stream_result.py b/tests/playwright/shiny/components/chat/stream-result/test_chat_stream_result.py index eaa08fc57..773eef0bb 100644 --- a/tests/playwright/shiny/components/chat/stream-result/test_chat_stream_result.py +++ b/tests/playwright/shiny/components/chat/stream-result/test_chat_stream_result.py @@ -16,6 +16,8 @@ def test_validate_chat_stream_result(page: Page, local_app: ShinyAppProc) -> Non expect(chat.loc).to_be_visible(timeout=10 * 1000) + chat.expect_user_input("Press Enter to start the stream", timeout=30 * 1000) + chat.send_user_input() messages = [ @@ -34,4 +36,4 @@ def test_validate_chat_stream_result(page: Page, local_app: ShinyAppProc) -> Non chat.expect_messages(re.compile(r"\s*".join(messages)), timeout=30 * 1000) # Verify that the stream result is as expected - stream_result.expect.to_contain_text("Message 9") + stream_result.expect.to_contain_text("Message 9", timeout=30 * 1000)