Skip to content

Commit

Permalink
Fix js/app/test/image_component_events.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
whitphx committed Feb 20, 2024
1 parent 81de3d5 commit 94f2bb5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions js/app/test/image_component_events.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
Expand Down

0 comments on commit 94f2bb5

Please sign in to comment.