mirror of
https://github.com/bretzel-app/crumbs.git
synced 2026-10-12 20:06:57 +02:00
feat: remove dark mode support
Remove ThemeToggle component, theme store, dark: Tailwind variants, and dark color values from NOTE_COLORS. Simplify color logic to use a single bg property. Delete dark mode e2e tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
510d15e548
commit
33a8cd6afc
@@ -1,32 +0,0 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user