Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Commit 1ec42b8

Browse files
committed
test that we can add a task
1 parent 0fb5fa4 commit 1ec42b8

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

e2e/add-to-inbox.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { expect, test } from '@playwright/test';
2+
3+
test('quick-adding a task should send it to the inbox', async ({ page }) => {
4+
await page.goto('/');
5+
6+
await page.getByPlaceholder('What do you need to do?').fill('Buy milk');
7+
await page.getByRole('button', { name: 'Add' }).click();
8+
9+
await page.getByText('Inbox (1)').click();
10+
11+
await expect(page.getByRole('cell', { name: 'Buy milk' })).toBeVisible();
12+
});

e2e/demo.test.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/lib/components/Header.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@
4242
<div class="lg:flex lg:items-center lg:gap-x-6">
4343
{@render link('/', 'Home')}
4444
{@render link('/inbox', `Inbox (${account.current?.root?.inbox?.length ?? 0})`)}
45-
{#if isAuthenticated}
46-
<QuickAdd {addTask} />
47-
{/if}
45+
<QuickAdd {addTask} />
4846
</div>
4947
<div class="lg:flex lg:items-center lg:justify-end lg:gap-x-6">
5048
{#if !isAuthenticated}

0 commit comments

Comments
 (0)