From e5d48956f7dbca48154f9a660dc119425641947f Mon Sep 17 00:00:00 2001 From: aliabid94 Date: Fri, 11 Oct 2024 14:47:58 -0700 Subject: [PATCH] Fix functional chatinterface tests (#9657) * chanes * add changeset * Update package.json * delete changeset --------- Co-authored-by: Ali Abid Co-authored-by: gradio-pr-bot Co-authored-by: Abubakar Abid --- js/spa/test/test_chatinterface_streaming_echo.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/spa/test/test_chatinterface_streaming_echo.spec.ts b/js/spa/test/test_chatinterface_streaming_echo.spec.ts index c69fc26560..17f77f0150 100644 --- a/js/spa/test/test_chatinterface_streaming_echo.spec.ts +++ b/js/spa/test/test_chatinterface_streaming_echo.spec.ts @@ -82,7 +82,7 @@ for (const test_case of cases) { ); const api_recorder = await page.locator("#api-recorder"); await api_recorder.click(); - const n_calls = test_case.includes("non_stream") ? 3 : 5; + const n_calls = test_case.includes("non_stream") ? 4 : 6; await expect(page.locator("#num-recorded-api-calls")).toContainText( `🪄 Recorded API Calls [${n_calls}]` ); @@ -104,6 +104,7 @@ test("test stopping generation", async ({ page }) => { await stop_button.click(); await expect(page.locator(".bot.message").first()).toContainText("abc"); + await page.waitForTimeout(1000); const current_content = await page .locator(".bot.message")