mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-21 01:01:05 +08:00
test fix
This commit is contained in:
parent
637a798018
commit
9720f675cb
@ -17,7 +17,9 @@ test("change events work as expected", async ({ page }) => {
|
||||
await expect(change_text).toContainText("1");
|
||||
|
||||
await page.getByLabel("Draw button").first().click();
|
||||
const canvas = page.locator("#image_editor canvas").first();
|
||||
const canvas = page.locator("canvas").first();
|
||||
await canvas.waitFor({ state: 'attached' });
|
||||
await canvas.waitFor({ state: 'visible' });
|
||||
await canvas.click({ position: { x: 100, y: 100 } });
|
||||
await expect(change_text).toContainText("2");
|
||||
|
||||
@ -38,7 +40,7 @@ test("input events work as expected", async ({ page }) => {
|
||||
await expect(input_text).toContainText("1");
|
||||
|
||||
await page.getByLabel("Draw button").first().click();
|
||||
const canvas = page.locator("#image_editor canvas").first();
|
||||
const canvas = page.locator("canvas").first();
|
||||
await canvas.click({ position: { x: 100, y: 100 } });
|
||||
await expect(input_text).toContainText("2");
|
||||
|
||||
@ -55,7 +57,7 @@ test("apply events work as expected", async ({ page }) => {
|
||||
const apply_button = page.getByLabel("Save changes").first();
|
||||
|
||||
await page.getByLabel("Draw button").first().click();
|
||||
const canvas = page.locator("#image_editor canvas").first();
|
||||
const canvas = page.locator("canvas").first();
|
||||
await canvas.click({ position: { x: 100, y: 100 } });
|
||||
await apply_button.click();
|
||||
await expect(apply_text).toContainText("1");
|
||||
|
Loading…
Reference in New Issue
Block a user