Add MVP operational readiness checks
This commit is contained in:
61
tests/ops-quality-source.test.ts
Normal file
61
tests/ops-quality-source.test.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import test from "node:test";
|
||||
|
||||
function source(path: string) {
|
||||
return readFileSync(join(process.cwd(), ...path.split("/")), "utf8");
|
||||
}
|
||||
|
||||
test("settings page surfaces integration status instead of a placeholder", () => {
|
||||
const pageSource = source("app/dashboard/settings/page.tsx");
|
||||
const componentSource = source("components/settings/operations-readiness.tsx");
|
||||
const helperSource = source("lib/operational-readiness.ts");
|
||||
|
||||
assert.doesNotMatch(pageSource, /DashboardPlaceholderPage/);
|
||||
assert.match(pageSource, /OperationsReadiness/);
|
||||
|
||||
for (const label of [
|
||||
"Google",
|
||||
"PageSpeed",
|
||||
"OpenRouter",
|
||||
"Playwright",
|
||||
"SMTP",
|
||||
"Convex Jobs",
|
||||
"Rybbit",
|
||||
"Konfiguration fehlt",
|
||||
]) {
|
||||
assert.match(`${componentSource}\n${helperSource}`, new RegExp(label));
|
||||
}
|
||||
});
|
||||
|
||||
test("verification notes cover critical MVP flows", () => {
|
||||
const docPath = join(process.cwd(), "docs", "verification.md");
|
||||
assert.equal(existsSync(docPath), true);
|
||||
const doc = readFileSync(docPath, "utf8");
|
||||
|
||||
for (const label of [
|
||||
"Login",
|
||||
"Kampagnenlauf",
|
||||
"Audit-Generierung",
|
||||
"Freigabe",
|
||||
"Versand",
|
||||
"Follow-up",
|
||||
"Analytics",
|
||||
]) {
|
||||
assert.match(doc, new RegExp(label));
|
||||
}
|
||||
});
|
||||
|
||||
test("Coolify deployment notes cover env vars, Playwright dependencies, port, and domains", () => {
|
||||
const docPath = join(process.cwd(), "docs", "coolify-deployment.md");
|
||||
assert.equal(existsSync(docPath), true);
|
||||
const doc = readFileSync(docPath, "utf8");
|
||||
|
||||
assert.match(doc, /Environment Variables/);
|
||||
assert.match(doc, /TASK8_BROWSER_ASSET_URL/);
|
||||
assert.match(doc, /Playwright/);
|
||||
assert.match(doc, /Port 3000/);
|
||||
assert.match(doc, /NEXT_PUBLIC_APP_URL/);
|
||||
assert.match(doc, /Domain/);
|
||||
});
|
||||
Reference in New Issue
Block a user