mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-15 00:11:15 +03:00
clean up
This commit is contained in:
parent
b0c772352a
commit
826e2ec91e
@ -98,7 +98,7 @@ export const test = base.extend<FrigateFixtures>({
|
||||
collector.assertClean();
|
||||
} else if (collector.errors.length > 0) {
|
||||
// Soft mode: attach errors to the test report so they're visible
|
||||
// without failing the run. Used during the rollout phase.
|
||||
// without failing the run.
|
||||
await testInfo.attach("collected-errors.txt", {
|
||||
body: collector.errors
|
||||
.map((e) => `[${e.kind}] ${e.message}${e.url ? ` (${e.url})` : ""}`)
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Lint script for e2e specs. Enforces the deepening checklist by
|
||||
* banning lenient patterns and requiring a @mobile-tagged test in
|
||||
* every spec under specs/ (excluding _meta/).
|
||||
* Lint script for e2e specs. Bans lenient test patterns and requires
|
||||
* a @mobile-tagged test in every spec under specs/ (excluding _meta/).
|
||||
*
|
||||
* Banned patterns:
|
||||
* - page.waitForTimeout( — use expect().toPass() or waitFor instead
|
||||
@ -16,9 +15,9 @@
|
||||
* @mobile rule: every .spec.ts under specs/ (not specs/_meta/) must
|
||||
* contain at least one test title or describe with the substring "@mobile".
|
||||
*
|
||||
* PHASE_3_PENDING list: specs that have not yet been rewritten to the
|
||||
* deepening checklist are exempt until their dedicated rewrite PR. Each
|
||||
* entry MUST be removed when its corresponding spec is rewritten.
|
||||
* Specs in PENDING_REWRITE are exempt from all rules until they are
|
||||
* rewritten with proper assertions and mobile coverage. Remove each
|
||||
* entry when its spec is updated.
|
||||
*/
|
||||
|
||||
import { readFileSync, readdirSync, statSync } from "node:fs";
|
||||
@ -29,9 +28,9 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const SPECS_DIR = resolve(__dirname, "..", "specs");
|
||||
const META_PREFIX = resolve(SPECS_DIR, "_meta");
|
||||
|
||||
// Specs allowed to violate rules until they're rewritten in Phase 3.
|
||||
// Each entry MUST be removed when its corresponding spec is rewritten.
|
||||
const PHASE_3_PENDING = new Set([
|
||||
// Specs exempt from lint rules until they are rewritten with proper
|
||||
// assertions and mobile coverage. Remove each entry when its spec is updated.
|
||||
const PENDING_REWRITE = new Set([
|
||||
"auth.spec.ts",
|
||||
"chat.spec.ts",
|
||||
"classification.spec.ts",
|
||||
@ -90,7 +89,7 @@ function walk(dir) {
|
||||
|
||||
function lintFile(file) {
|
||||
const basename = file.split("/").pop();
|
||||
if (PHASE_3_PENDING.has(basename)) return [];
|
||||
if (PENDING_REWRITE.has(basename)) return [];
|
||||
if (file.includes("/specs/settings/")) return [];
|
||||
|
||||
const errors = [];
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
/**
|
||||
* Export page tests — deepened per the test deepening spec.
|
||||
* Export page tests.
|
||||
*
|
||||
* Covers the deepening checklist:
|
||||
* 1. Clean render (auto via error fixture)
|
||||
* 2. Mobile + desktop parity (@mobile test)
|
||||
* 3. Primary interactions: search, delete, case open, case close
|
||||
* 4. Empty / loading / error states (via mock-overrides)
|
||||
* 5. No lenient waits — only real conditions
|
||||
* 6. Data-driven assertions against fixtures/mock-data/exports.json
|
||||
* Covers rendering, search, delete confirmation, empty/loading/error
|
||||
* states, and mobile-specific interactions (video pane, case detail).
|
||||
*/
|
||||
|
||||
import { test, expect } from "../fixtures/frigate-test";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user