Files
SnapOtter/tests/e2e/theme.spec.ts
T
Siddharth Kumar Sah 80e536bcf8 chore: remove dead code, add test infrastructure, update docs
- Delete 3 dead files: use-batch-processor.ts, use-i18n.ts, smart-crop.ts (AI package)
- Remove dead getJobProgress function and unused runPythonScript wrapper
- Remove 6 unused imports across API and web apps
- Remove unused shared types (ImageFormat, AppConfig, ApiError, HealthResponse, JobProgress)
  and constants (SUPPORTED_INPUT_FORMATS/OUTPUT_FORMATS, DEFAULT_OUTPUT_FORMAT)
- Remove unused store method (setOriginalBlobUrl) and clean AI package re-exports
- Add test infrastructure: vitest config, unit/integration/e2e tests, fixtures, screenshots
- Add Docker test infrastructure: Dockerfile.test, docker-compose.test.yml
- Add download_models.py for pre-baking AI model weights in Docker
- Add filename sanitization utility (apps/api/src/lib/filename.ts)
- Update .gitignore to exclude coverage/, *.tsbuildinfo, .superpowers/, test artifacts
- Update .dockerignore to exclude test/coverage/IDE artifacts from builds
- Update docs: remove smart crop from AI docs (uses Sharp directly), update bridge docs
2026-03-23 11:46:45 +08:00

25 lines
912 B
TypeScript

import { test, expect } from "./helpers";
test.describe("Theme System", () => {
test("page defaults to light theme", async ({ loggedInPage: page }) => {
// Check that html element does not have 'dark' class by default
const html = page.locator("html");
const classList = await html.getAttribute("class");
// Default is light, so 'dark' should not be present initially
// (unless system preference is dark)
expect(classList).toBeDefined();
});
test("footer has theme toggle buttons", async ({ loggedInPage: page }) => {
// Footer has a "Toggle Theme" button fixed at bottom-right
const themeBtn = page.locator("button[title='Toggle Theme']");
await expect(themeBtn).toBeVisible({ timeout: 10_000 });
});
test("privacy policy link is in footer", async ({
loggedInPage: page,
}) => {
await expect(page.getByText("Privacy Policy")).toBeVisible();
});
});