feat: consolidate database management work
Add catalog-owned logical relationships and runtime snapshots, extend the database-management UI and validation coverage, and document the updated operational workflow. Keep active sensitive-generation status in a tooltip and indicator, and update the layout E2E to follow the history action in its new database-scoped location.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { readFileSync, readdirSync } from "node:fs";
|
||||
|
||||
import { expect, test } from "vitest";
|
||||
|
||||
const sourceDirectory = "src/shell/database-management";
|
||||
const styles = readFileSync(`${sourceDirectory}/FleetLedgerShell.css`, "utf8");
|
||||
|
||||
test("uses operational body text for every available-command list", () => {
|
||||
const availableCommandLists = readdirSync(sourceDirectory)
|
||||
.filter((fileName) => fileName.endsWith(".tsx") && !fileName.includes(".test."))
|
||||
.flatMap((fileName) => {
|
||||
const source = readFileSync(`${sourceDirectory}/${fileName}`, "utf8");
|
||||
const matches = source.match(
|
||||
/<select\b[\s\S]*?<option value="">Choose an action…<\/option>[\s\S]*?<\/select>/g,
|
||||
);
|
||||
return (matches ?? []).map((markup) => ({ fileName, markup }));
|
||||
});
|
||||
|
||||
expect(availableCommandLists.map(({ fileName }) => fileName).sort()).toEqual([
|
||||
"DatabaseRelationships.tsx",
|
||||
"FleetActionSelector.tsx",
|
||||
]);
|
||||
for (const { markup } of availableCommandLists) {
|
||||
expect(markup).toContain('className="thot-fleet-action-selector__select"');
|
||||
}
|
||||
|
||||
expect(styles).toMatch(
|
||||
/\.thot-fleet-action-selector__select\s*\{[^}]*font-size:\s*0\.9375rem;/s,
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user