fix(test): use date relative to now in ContextMenu event fixture (BIT-33405) #309
@@ -5,6 +5,10 @@ import { EventsPanel } from "./EventsPanel.js";
|
||||
import { PhotoContextMenu } from "./PhotoContextMenu.js";
|
||||
|
||||
function event(id: string, title: string): EventSummary {
|
||||
const startsAt = new Date(Date.now() - 86_400_000);
|
||||
const iso = startsAt.toISOString();
|
||||
const at = (offsetMs: number) =>
|
||||
new Date(startsAt.getTime() + offsetMs).toISOString();
|
||||
return {
|
||||
id,
|
||||
organizationId: "org",
|
||||
@@ -20,9 +24,9 @@ function event(id: string, title: string): EventSummary {
|
||||
competitionCode: null,
|
||||
round: null,
|
||||
matchNumber: null,
|
||||
startsAt: "2026-11-21T10:56:00.000Z",
|
||||
ingestFrom: "2026-11-21T08:56:00.000Z",
|
||||
ingestUntil: "2026-11-21T14:56:00.000Z",
|
||||
startsAt: iso,
|
||||
ingestFrom: at(-2 * 3_600_000),
|
||||
ingestUntil: at(4 * 3_600_000),
|
||||
iptcTemplate: {},
|
||||
archivedAt: null,
|
||||
photographers: [],
|
||||
|
||||
Reference in new issue
Block a user