The site had no author, no statement of why it exists and nobody accountable for its numbers, which is most of why it reads as machine generated. The page states plainly that its author is not an education expert. The credibility claim is lived experience — a parent going through primary admissions — plus stated provenance for every figure, which is true and cannot be undermined by someone noticing there is no teaching qualification behind it. First name only: the Person JSON-LD carries no familyName, worksFor or affiliation, and a test asserts it stays that way. The footer gains a fourth column, with a tablet breakpoint so four columns pair up rather than crushing before the 768px collapse. The nav is deliberately untouched — its mobile tab bar already carries four items. public/brand/tudor.jpg is NOT in this commit. The page references it and will show a broken image until the photograph is supplied; a stock portrait would defeat the entire point of the work. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017YmbBhr8s7GusjDE12hrZM
35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
import { metadata } from '@/app/(frontend)/about/page';
|
|
import { personJsonLd, organizationJsonLd } from '@/lib/jsonld';
|
|
|
|
describe('/about metadata', () => {
|
|
it('canonicalises to the bare path', () => {
|
|
expect(metadata.alternates?.canonical)
|
|
.toBe('https://www.schoolcompare.co.uk/about');
|
|
});
|
|
});
|
|
|
|
describe('author structured data', () => {
|
|
it('describes a Person with a first name and a photo', () => {
|
|
const person = personJsonLd();
|
|
expect(person['@type']).toBe('Person');
|
|
expect(person.name).toBe('Tudor');
|
|
expect(person.image).toBe('https://www.schoolcompare.co.uk/brand/tudor.jpg');
|
|
expect(person.url).toBe('https://www.schoolcompare.co.uk/about');
|
|
});
|
|
|
|
it('never publishes a surname or an employer', () => {
|
|
// Author identity constraint: first name only. A surname here would be
|
|
// the one place it leaks, since JSON-LD is machine-read and archived.
|
|
const serialised = JSON.stringify(personJsonLd());
|
|
expect(serialised).not.toMatch(/familyName|Sitaru/i);
|
|
expect(serialised).not.toMatch(/worksFor|affiliation/i);
|
|
});
|
|
|
|
it('describes the site as an Organization the Person authors for', () => {
|
|
const org = organizationJsonLd();
|
|
expect(org['@type']).toBe('Organization');
|
|
expect(org.name).toBe('schoolcompare');
|
|
expect(org.url).toBe('https://www.schoolcompare.co.uk');
|
|
});
|
|
});
|