From 68bf8a4134db15bc1d4b2e789598b57bf9c2cb1a Mon Sep 17 00:00:00 2001 From: shvix Date: Fri, 10 May 2024 05:36:37 +0200 Subject: [PATCH] test(blocks): use FileChooser to set input files --- tests/attachment.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/attachment.spec.ts b/tests/attachment.spec.ts index 6e35ee408056..7f46cf22d729 100644 --- a/tests/attachment.spec.ts +++ b/tests/attachment.spec.ts @@ -60,8 +60,10 @@ function getAttachment(page: Page) { await type(page, 'file', 100); await expect(slashMenu).toBeVisible(); + const fileChooser = page.waitForEvent('filechooser'); await pressEnter(page); - await page.setInputFiles("input[type='file']", FILE_PATH); + await (await fileChooser).setFiles(FILE_PATH); + // Try to break the undo redo test await captureHistory(page);