Files
gridline/desktop/src/lib/docs-coverage.test.ts
T
adrianbonpin 5607773299
Release / windows (push) Successful in 17m5s
Release / linux (push) Successful in 24m10s
0.8.0: MariaDB + PlanetScale, TimescaleDB, multi-result sets, streaming export, schema diff (#27)
2026-09-11 17:20:41 +00:00

76 lines
3.6 KiB
TypeScript

import { describe, it, expect } from "vitest";
// Import the docs as raw strings (vite/client declares `*?raw`); this keeps the
// test free of a `node:fs` dependency so `tsc` (bun run build) stays clean.
import agents from "../../../AGENTS.md?raw";
import readme from "../../../README.md?raw";
import landing from "../../../www/public/landing.js?raw";
describe("v0.8.0 docs coverage", () => {
it("AGENTS.md marks inline cell editing complete", () => {
expect(agents).toContain("Inline cell editing");
expect(agents).toMatch(/Inline cell editing \| ✅/);
});
it("AGENTS.md marks indexes + constraints complete", () => {
expect(agents).toMatch(/Indexes \(per table\) \| ✅/);
expect(agents).toMatch(/Constraints \(CHECK, UNIQUE beyond PK\/FK\) \| ✅/);
});
it("AGENTS.md marks materialized views complete", () => {
expect(agents).toMatch(/Materialized views \| ✅/);
});
it("AGENTS.md marks stored procedures complete", () => {
expect(agents).toMatch(/Stored procedures \| ✅/);
});
it("AGENTS.md marks favorites + recents + status indicator complete", () => {
expect(agents).toMatch(/Favorites \/ Recent connections \| ✅/);
expect(agents).toMatch(/Connection status indicator on cards \| ✅/);
expect(agents).toMatch(/Move-to-folder bulk action \| ✅/);
});
it("README declares v0.8.0", () => {
expect(readme).toContain("0.8.0");
});
it("AGENTS.md marks schema CRUD complete", () => {
expect(agents).toMatch(/Schema CRUD \| ✅/);
});
it("AGENTS.md marks global object search complete", () => {
expect(agents).toMatch(/Global object search \| ✅/);
});
it("AGENTS.md marks copy-as-DDL complete", () => {
expect(agents).toMatch(/Copy as DDL for any object \| ✅/);
});
it("AGENTS.md marks object dependencies complete", () => {
expect(agents).toMatch(/Object dependencies \| ✅/);
});
it("README notes bundled PostgreSQL tools", () => {
expect(readme.toLowerCase()).toContain("bundled");
});
it("README marks inline editing complete (not Upcoming)", () => {
// Key Features lists inline editing as a shipped feature
expect(readme).toMatch(/- \*\*Inline cell editing\*\* —/);
// comparison-table row for the stage→commit queue carries the Gridline ✅ marker
// (5-column table: Feature | DB Pro | Beekeeper | TablePlus | Gridline)
expect(readme).toMatch(/Changes queue \(stage → commit\)\s*\|[^|]*❌[^|]*\|[^|]*\|[^|]*\|\s*\*\*✅ Queue → Commit All\*\*/);
expect(readme).not.toMatch(/Inline cell editing.*Upcoming/);
});
it("AGENTS.md marks object management CRUD complete", () => {
expect(agents).toMatch(/Object management CRUD \| ✅/);
});
it("AGENTS.md marks the keychain toggle complete", () => {
expect(agents).toMatch(/Enable keychain toggle \| ✅/);
});
it("AGENTS.md marks the Objects view tabbed workspace complete", () => {
expect(agents).toMatch(/Objects view tabbed workspace \| ✅/);
});
it("AGENTS.md marks xlsx/SQLite-dump/cancel/settings-import complete", () => {
expect(agents).toMatch(/Excel \(\.xlsx\) export \| ✅/);
expect(agents).toMatch(/Cancel long-running queries \| ✅/);
expect(agents).toMatch(/Settings export\/import \| ✅/);
});
it("README links to v0.8.0 assets in both download tables", () => {
expect(readme).toContain("releases/download/v0.8.0/");
expect(readme).toContain("Gridline_0.8.0_aarch64.dmg");
expect(readme).toContain("Gridline-0.8.0-1.x86_64.rpm");
});
it("landing.js platform download links point to v0.8.0", () => {
expect(landing).toContain('const version = "0.8.0"');
});
});