feat: Crumbs by Bretzel — self-hostable notes app MVP

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-05 21:16:45 +01:00
committed by Frederic Cabassut
commit 1becc17724
89 changed files with 11359 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
import { test, expect } from './helpers/fixtures.js';
test.describe('Dark Mode', () => {
test('Scenario: Dark mode can be toggled on and off', async ({ authenticatedPage: page }) => {
// When the user enables dark mode
await page.getByTestId('theme-toggle').click();
// Then the application is displayed in dark mode
const isDark = await page.evaluate(() =>
document.documentElement.classList.contains('dark')
);
expect(isDark).toBe(true);
// When the user disables dark mode
await page.getByTestId('theme-toggle').click();
// Then the application is displayed in light mode
const isLight = await page.evaluate(() =>
!document.documentElement.classList.contains('dark')
);
expect(isLight).toBe(true);
});
test('Scenario: Theme preference is remembered across page loads', async ({ authenticatedPage: page }) => {
// When the user enables dark mode
await page.getByTestId('theme-toggle').click();
// Then the preference is persisted
const theme = await page.evaluate(() => localStorage.getItem('theme'));
expect(theme).toBeTruthy();
});
});