Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions playwright/e2e/autosave.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ test('saves after being disconnected for 20 sec.', async ({
await expect(editor.el).toBeVisible()
await editor.typeHeading('Hello world')
await expect(editor.saveIndicator).toHaveAccessibleName(/Unsaved changes/)
setOffline()
await setOffline()
await page.clock.fastForward(20_000)
setOnline()
await setOnline()
await page.clock.fastForward(20_000)
await expect(editor.saveIndicator).not.toHaveAccessibleName(/Unsaved changes/)
// TODO: Why does this not work? await expect(await file.getContent()).toBe('## Hello world')
Expand All @@ -56,9 +56,9 @@ test('saves after being disconnected for 2 minutes', async ({
await expect(editor.el).toBeVisible()
await editor.typeHeading('Hello world')
await expect(editor.saveIndicator).toHaveAccessibleName(/Unsaved changes/)
setOffline()
await setOffline()
await page.clock.fastForward(120_000)
setOnline()
await setOnline()
await page.clock.fastForward(40_000)
await expect(editor.saveIndicator).not.toHaveAccessibleName(/Unsaved changes/)
// TODO: Why does this not work? await expect(await file.getContent()).toBe('## Hello world')
Expand Down
Loading