test(e2e): hand-made schemas follow the new columns; placing entries never blocks the refresh

This commit is contained in:
Maurice
2026-10-01 15:18:30 +02:00
parent 39074f6d46
commit 62950aed24
6 changed files with 27 additions and 8 deletions
@@ -156,6 +156,15 @@ describe('JourneyPhotoCaptureService', () => {
expect(nameEntryLocation).toHaveBeenCalledWith(7, 'Somewhere Road');
});
it('JPCAP-1003d: placing entries that throws never costs the refresh of the gallery order', async () => {
const { svc, placeEntriesFromPhotos, broadcastJourneyEvent } = build(true);
placeEntriesFromPhotos.mockImplementation(() => { throw new Error('no such column'); });
const error = vi.spyOn(console, 'error').mockImplementation(() => {});
await expect(svc.fill(9, [11], 3)).resolves.toBe(true);
expect(broadcastJourneyEvent).toHaveBeenCalledWith(9, 'journey:photos:updated', {});
expect(error).toHaveBeenCalledWith('[Journey] placing entries from photos failed:', 'no such column');
});
it('JPCAP-1003c: an upload whose backfill throws is logged', async () => {
const { svc } = build(new Error('disk'));
const error = vi.spyOn(console, 'error').mockImplementation(() => {});