mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-12 12:40:29 +08:00
Fix flake in e2e chatbot test (#8946)
* Fix flake * Fix flakes * Fix test'
This commit is contained in:
parent
00dcd1084c
commit
a544a66008
@ -236,8 +236,11 @@ for (const msg_format of ["tuples", "messages"]) {
|
||||
await page.getByTestId("textbox").click();
|
||||
await page.getByTestId("textbox").fill("hello");
|
||||
await page.keyboard.press("Enter");
|
||||
await page.getByLabel("like", { exact: true }).click();
|
||||
await page.getByLabel("dislike", { exact: true }).click();
|
||||
await expect(
|
||||
page.getByTestId("bot").first().getByRole("paragraph")
|
||||
).toBeVisible();
|
||||
await page.getByLabel("like", { exact: true }).first().click();
|
||||
await page.getByLabel("dislike", { exact: true }).first().click();
|
||||
|
||||
expect(await page.getByLabel("clicked dislike").count()).toEqual(1);
|
||||
expect(await page.getByLabel("clicked like").count()).toEqual(0);
|
||||
@ -257,10 +260,7 @@ for (const msg_format of ["tuples", "messages"]) {
|
||||
"./test/files/cheetah1.jpg",
|
||||
"./test/files/cheetah1.jpg"
|
||||
]);
|
||||
expect
|
||||
.poll(async () => await page.locator("thumbnail-image").count(), {
|
||||
timeout: 5000
|
||||
})
|
||||
.toEqual(2);
|
||||
|
||||
await expect(page.locator(".thumbnail-image")).toHaveCount(2);
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user