diff --git a/js/app/test/image_component_events.spec.ts b/js/app/test/image_component_events.spec.ts index 6b4a699b4bddd..d7b8676436aa7 100644 --- a/js/app/test/image_component_events.spec.ts +++ b/js/app/test/image_component_events.spec.ts @@ -66,11 +66,14 @@ test("Image copy from clipboard dispatches upload event.", async ({ page }) => { }); await page.getByLabel("Paste from clipboard").click(); - await Promise.all([ - page.waitForResponse( - (resp) => resp.url().includes("/clipboard.png") && resp.status() === 200 - ) - ]); + if (!process.env.GRADIO_E2E_TEST_LITE) { + // Lite hooks the HTTP request to the image, so we can't wait for it. + await Promise.all([ + page.waitForResponse( + (resp) => resp.url().includes("/clipboard.png") && resp.status() === 200 + ) + ]); + } await expect(page.getByLabel("# Change Events").first()).toHaveValue("1"); await expect(page.getByLabel("# Upload Events")).toHaveValue("1"); });