Files
sencho/frontend/src/whats-new/entries.test.ts
T
Anso fe003d5c49 fix(whats-new): backfill entries for unannounced 0.97.0 features (#1804)
* fix(whats-new): backfill entries for unannounced 0.97.0 features

entries.json shipped empty in the What's New scaffolding (#1767), so the
top-bar icon stayed hidden through the 0.97.0 release despite several
notable features going out. Add entries for the ones that read as genuine
news: SSO-only auth, itemized fleet prune plans, the Audit Log, Fleet
Secrets, ntfy notifications, and the resizable file explorer.

* fix(whats-new): add screenshots to the backfilled entries

Each entry now carries a screenshot captured live against a running
Sencho instance, cropped to the relevant panel. Real usernames, the
client IP, and the real ntfy topic were scrubbed before capture.
2026-08-08 17:51:54 -04:00

25 lines
872 B
TypeScript

import { describe, it, expect } from 'vitest';
import rawEntries from './entries.json';
import { isWhatsNewEntry, WHATS_NEW_CAP } from './types';
// These are authoring guards on the committed data, not tests of behaviour:
// they fail the build when a hand-written entry is malformed, duplicated, or
// pushes the file past the cap. The loader's own behaviour is covered in
// loader.test.ts.
describe('whats-new entries.json', () => {
it('contains only valid entries', () => {
for (const entry of rawEntries) {
expect(isWhatsNewEntry(entry)).toBe(true);
}
});
it('has unique ids', () => {
const ids = rawEntries.map((e) => (e as { id: string }).id);
expect(new Set(ids).size).toBe(ids.length);
});
it(`does not exceed the ${WHATS_NEW_CAP}-entry cap`, () => {
expect(rawEntries.length).toBeLessThanOrEqual(WHATS_NEW_CAP);
});
});