Events 2.4.0 frontend, deploy and docs: Linked products, linked events, seo
- Site settings → Linked products (Connect, Show events from, Publish my events), help, command palette. - Events from linked products on /events, the home and campus pages, and /events/linked/<product>/<id> (markdown with HTML off, canonical to the origin, no JSON-LD, not in the sitemap). - Event page JSON-LD from @crosscode/seo; lib/eventSchema.ts removed. - Readiness check for linked products' sync; e2e spec with a fake Church Website (not run yet: needs the e2e Postgres). - crosscode: install and build the shared packages Events uses first (an older tag still builds as before); scripts/tests/events.bats. - Release notes, changelogs, handovers, hub-protocol.md, and the plan's "Changes while building". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -484,3 +484,37 @@ describe('protocol v2 heartbeat', () => {
|
||||
expect(await store.publicKeyStatus()).toBe('saved');
|
||||
});
|
||||
});
|
||||
|
||||
// ─── The event page's JSON-LD (@crosscode/seo, replacing frontend/src/lib/eventSchema.ts) ──
|
||||
|
||||
describe('event JSON-LD from crosscode.event/1', () => {
|
||||
test('matches what the event page sent before 2.4.0, with the price range from main tickets only', () => {
|
||||
const { eventJsonLd } = require('@crosscode/seo');
|
||||
const row = eventRow({ id: '00000000-0000-4000-8000-0000000000aa' });
|
||||
const built = buildCrosscodeEvent(row, new Map(), ctx());
|
||||
// As the page calls it (events/[id]/page.tsx).
|
||||
const ld = eventJsonLd({ ...built.event, description: row.description }, {
|
||||
pageUrl: `https://events.hope.test/events/${row.id}`,
|
||||
organizer: { name: 'Hope Family Church', url: 'https://events.hope.test' },
|
||||
priceRange: built.priceRangeCents,
|
||||
offerUrl: `https://events.hope.test/register/${row.id}`,
|
||||
validFrom: row.goLiveAt.toISOString(),
|
||||
});
|
||||
expect(ld).toEqual({
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'Event',
|
||||
name: 'Youth Camp',
|
||||
description: row.description,
|
||||
startDate: row.startDate.toISOString(),
|
||||
endDate: row.endDate.toISOString(),
|
||||
eventStatus: 'https://schema.org/EventScheduled',
|
||||
eventAttendanceMode: 'https://schema.org/OfflineEventAttendanceMode',
|
||||
location: { '@type': 'Place', name: 'Camp Wartburg', address: 'Camp Wartburg' },
|
||||
image: ['https://events.hope.test/api/uploads/camp.jpg'],
|
||||
url: `https://events.hope.test/events/${row.id}`,
|
||||
organizer: { '@type': 'Organization', name: 'Hope Family Church', url: 'https://events.hope.test' },
|
||||
// Before 2.4.0 the add-on T-shirt (R120) made this 120.00–450.00.
|
||||
offers: { '@type': 'AggregateOffer', lowPrice: '300.00', highPrice: '450.00', priceCurrency: 'ZAR', availability: 'https://schema.org/InStock', url: `https://events.hope.test/register/${row.id}`, validFrom: row.goLiveAt.toISOString() },
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user