mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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
This commit is contained in:
@@ -10,7 +10,15 @@ test.describe("Navigation", () => {
|
||||
test("sidebar Grid link goes to fullscreen view", async ({
|
||||
loggedInPage: page,
|
||||
}) => {
|
||||
await page.locator("aside").getByText("Grid").click();
|
||||
// Click the Grid link in the sidebar (links to /fullscreen)
|
||||
const gridLink = page.locator("aside").getByText("Grid");
|
||||
// If "Grid" text isn't directly visible (collapsed sidebar), try the link
|
||||
if (await gridLink.isVisible({ timeout: 3000 }).catch(() => false)) {
|
||||
await gridLink.click();
|
||||
} else {
|
||||
// Fallback: navigate via the href directly
|
||||
await page.locator('aside a[href="/fullscreen"]').click();
|
||||
}
|
||||
await expect(page).toHaveURL("/fullscreen");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user