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();
|
collector.assertClean();
|
||||||
} else if (collector.errors.length > 0) {
|
} else if (collector.errors.length > 0) {
|
||||||
// Soft mode: attach errors to the test report so they're visible
|
// 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", {
|
await testInfo.attach("collected-errors.txt", {
|
||||||
body: collector.errors
|
body: collector.errors
|
||||||
.map((e) => `[${e.kind}] ${e.message}${e.url ? ` (${e.url})` : ""}`)
|
.map((e) => `[${e.kind}] ${e.message}${e.url ? ` (${e.url})` : ""}`)
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
/**
|
/**
|
||||||
* Lint script for e2e specs. Enforces the deepening checklist by
|
* Lint script for e2e specs. Bans lenient test patterns and requires
|
||||||
* banning lenient patterns and requiring a @mobile-tagged test in
|
* a @mobile-tagged test in every spec under specs/ (excluding _meta/).
|
||||||
* every spec under specs/ (excluding _meta/).
|
|
||||||
*
|
*
|
||||||
* Banned patterns:
|
* Banned patterns:
|
||||||
* - page.waitForTimeout( — use expect().toPass() or waitFor instead
|
* - page.waitForTimeout( — use expect().toPass() or waitFor instead
|
||||||
@ -16,9 +15,9 @@
|
|||||||
* @mobile rule: every .spec.ts under specs/ (not specs/_meta/) must
|
* @mobile rule: every .spec.ts under specs/ (not specs/_meta/) must
|
||||||
* contain at least one test title or describe with the substring "@mobile".
|
* 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
|
* Specs in PENDING_REWRITE are exempt from all rules until they are
|
||||||
* deepening checklist are exempt until their dedicated rewrite PR. Each
|
* rewritten with proper assertions and mobile coverage. Remove each
|
||||||
* entry MUST be removed when its corresponding spec is rewritten.
|
* entry when its spec is updated.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { readFileSync, readdirSync, statSync } from "node:fs";
|
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 SPECS_DIR = resolve(__dirname, "..", "specs");
|
||||||
const META_PREFIX = resolve(SPECS_DIR, "_meta");
|
const META_PREFIX = resolve(SPECS_DIR, "_meta");
|
||||||
|
|
||||||
// Specs allowed to violate rules until they're rewritten in Phase 3.
|
// Specs exempt from lint rules until they are rewritten with proper
|
||||||
// Each entry MUST be removed when its corresponding spec is rewritten.
|
// assertions and mobile coverage. Remove each entry when its spec is updated.
|
||||||
const PHASE_3_PENDING = new Set([
|
const PENDING_REWRITE = new Set([
|
||||||
"auth.spec.ts",
|
"auth.spec.ts",
|
||||||
"chat.spec.ts",
|
"chat.spec.ts",
|
||||||
"classification.spec.ts",
|
"classification.spec.ts",
|
||||||
@ -90,7 +89,7 @@ function walk(dir) {
|
|||||||
|
|
||||||
function lintFile(file) {
|
function lintFile(file) {
|
||||||
const basename = file.split("/").pop();
|
const basename = file.split("/").pop();
|
||||||
if (PHASE_3_PENDING.has(basename)) return [];
|
if (PENDING_REWRITE.has(basename)) return [];
|
||||||
if (file.includes("/specs/settings/")) return [];
|
if (file.includes("/specs/settings/")) return [];
|
||||||
|
|
||||||
const errors = [];
|
const errors = [];
|
||||||
|
|||||||
@ -1,13 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Export page tests — deepened per the test deepening spec.
|
* Export page tests.
|
||||||
*
|
*
|
||||||
* Covers the deepening checklist:
|
* Covers rendering, search, delete confirmation, empty/loading/error
|
||||||
* 1. Clean render (auto via error fixture)
|
* states, and mobile-specific interactions (video pane, case detail).
|
||||||
* 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
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { test, expect } from "../fixtures/frigate-test";
|
import { test, expect } from "../fixtures/frigate-test";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user