Skip to content

Commit

Permalink
test(blocks): use FileChooser to set input files
Browse files Browse the repository at this point in the history
  • Loading branch information
shvixxl committed May 10, 2024
1 parent 70b7881 commit 68bf8a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/attachment.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ function getAttachment(page: Page) {
await type(page, 'file', 100);
await expect(slashMenu).toBeVisible();

const fileChooser = page.waitForEvent('filechooser');

Check failure on line 63 in tests/attachment.spec.ts

View workflow job for this annotation

GitHub Actions / Playground E2E test (1)

attachment.spec.ts:124:1 › can insert attachment from slash menu

1) attachment.spec.ts:124:1 › can insert attachment from slash menu ────────────────────────────── TimeoutError: page.waitForEvent: Timeout 5000ms exceeded while waiting for event "filechooser" =========================== logs =========================== waiting for event "filechooser" ============================================================ 61 | await expect(slashMenu).toBeVisible(); 62 | > 63 | const fileChooser = page.waitForEvent('filechooser'); | ^ 64 | await pressEnter(page); 65 | await (await fileChooser).setFiles(FILE_PATH); 66 | at insertAttachment (/home/runner/work/blocksuite/blocksuite/tests/attachment.spec.ts:63:30) at /home/runner/work/blocksuite/blocksuite/tests/attachment.spec.ts:132:3
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);

Expand Down

0 comments on commit 68bf8a4

Please sign in to comment.